Browse Source

历史排班

28169 1 year ago
parent
commit
33c86ab318
3 changed files with 14 additions and 138 deletions
  1. 3 129
      controllers/patient_dataconfig_api_controller.go
  2. 1 0
      models/patient_models.go
  3. 10 9
      service/his_service.go

+ 3 - 129
controllers/patient_dataconfig_api_controller.go View File

@@ -48,8 +48,6 @@ func PatientDataConfigAPIControllerRegistRouters() {
48 48
 
49 49
 	beego.Router("/api/patient/getpatientsitemap", &PatientDataConfigAPIController{}, "Get:GetPatientSitemap")
50 50
 
51
-	beego.Router("/api/patient/updatesitemap", &PatientDataConfigAPIController{}, "Post:UpdateSiteMap")
52
-
53 51
 }
54 52
 
55 53
 type PatientDataConfigAPIController struct {
@@ -1590,134 +1588,10 @@ func (this *PatientDataConfigAPIController) GetPatientSitemap() {
1590 1588
 
1591 1589
 	sitemap, _ := service.GetPatientSitemap(patient_id, orgId)
1592 1590
 
1591
+	patients, _ := service.GetPatientByIDOne(orgId, patient_id)
1593 1592
 	this.ServeSuccessJSON(map[string]interface{}{
1594
-		"sitemap": sitemap,
1593
+		"sitemap":  sitemap,
1594
+		"patients": patients,
1595 1595
 	})
1596 1596
 
1597 1597
 }
1598
-
1599
-func (this *PatientDataConfigAPIController) UpdateSiteMap() {
1600
-
1601
-	//dataBody := make(map[string]interface{}, 0)
1602
-	//err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
1603
-	//if err != nil {
1604
-	//	utils.ErrorLog(err.Error())
1605
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1606
-	//	return
1607
-	//}
1608
-	//
1609
-	//is_append := int64(dataBody["is_append"].(float64))
1610
-	//
1611
-	//is_img_v := int64(dataBody["is_img_v"].(float64))
1612
-	//
1613
-	//is_img_a := int64(dataBody["is_img_a"].(float64))
1614
-	//
1615
-	//a_num := dataBody["a_num"].(float64)
1616
-	//
1617
-	//v_num := dataBody["v_num"].(float64)
1618
-	//
1619
-	//text_num := dataBody["text_num"].(float64)
1620
-	//
1621
-	//fangxianga_num := dataBody["fangxianga_num"].(float64)
1622
-	//
1623
-	//fangxianga_left := dataBody["fangxianga_left"].(float64)
1624
-	//
1625
-	//fangxianga_top := dataBody["fangxianga_top"].(float64)
1626
-	//
1627
-	//fangxiangv_left := dataBody["fangxiangv_left"].(float64)
1628
-	//
1629
-	//fangxiangv_top := dataBody["fangxiangv_top"].(float64)
1630
-	//
1631
-	//fuzhua_num := dataBody["fuzhua_num"].(float64)
1632
-	//
1633
-	//fuzhuv_num := dataBody["fuzhuv_num"].(float64)
1634
-	//
1635
-	//xuanzhuan_a := dataBody["xuanzhuan_a"].(float64)
1636
-	//
1637
-	//xuanzhuan_v := dataBody["xuanzhuan_v"].(float64)
1638
-	//
1639
-	//fuzhua_top := dataBody["fuzhua_top"].(float64)
1640
-	//
1641
-	//fuzhua_left := dataBody["fuzhua_left"].(float64)
1642
-	//
1643
-	//fuzhuv_top := dataBody["fuzhuv_top"].(float64)
1644
-	//
1645
-	//fuzhuv_left := dataBody["fuzhuv_left"].(float64)
1646
-	//
1647
-	//a_arr_str := dataBody["a_arr_str"].(string)
1648
-	//
1649
-	//v_arr_str := dataBody["v_arr_str"].(string)
1650
-	//
1651
-	//a_left := dataBody["a_left"].(float64)
1652
-	//
1653
-	//a_top := dataBody["a_top"].(float64)
1654
-	//
1655
-	//v_left := dataBody["v_left"].(float64)
1656
-	//
1657
-	//v_top := dataBody["v_top"].(float64)
1658
-	//
1659
-	//text_arr_str := dataBody["text_arr_str"].(string)
1660
-	//
1661
-	//text_left := dataBody["text_left"].(float64)
1662
-	//
1663
-	//text_top := dataBody["text_top"].(float64)
1664
-	//
1665
-	//scalev_num := dataBody["scalev_num"].(float64)
1666
-	//
1667
-	//scalea_num := dataBody["scalea_num"].(float64)
1668
-	//
1669
-	//value := dataBody["value"].(string)
1670
-	//
1671
-	//patient_id := int64(dataBody["patient_id"].(float64))
1672
-	//
1673
-	//id := int64(dataBody["id"].(float64))
1674
-	//
1675
-	//user_org_id := this.GetAdminUserInfo().CurrentOrgId
1676
-	//
1677
-	//deviceValsualMap := models.XtDeviceValsualMap{
1678
-	//	ID:             id,
1679
-	//	PatientId:      patient_id,
1680
-	//	IsAppend:       is_append,
1681
-	//	IsImgV:         is_img_v,
1682
-	//	IsImgA:         is_img_a,
1683
-	//	ANum:           a_num,
1684
-	//	VNum:           v_num,
1685
-	//	TextNum:        text_num,
1686
-	//	FangxiangaNum:  fangxianga_num,
1687
-	//	FangxiangaLeft: fangxianga_left,
1688
-	//	FangxiangaTop:  fangxianga_top,
1689
-	//	FangxiangvLeft: fangxiangv_left,
1690
-	//	FangxiangvTop:  fangxiangv_top,
1691
-	//	FuzhuaNum:      fuzhua_num,
1692
-	//	FuzhuvNum:      fuzhuv_num,
1693
-	//	XuanzhuanA:     xuanzhuan_a,
1694
-	//	XuanzhuanV:     xuanzhuan_v,
1695
-	//	FuzhuaTop:      fuzhua_top,
1696
-	//	FuzhuaLeft:     fuzhua_left,
1697
-	//	FuzhuvTop:      fuzhuv_top,
1698
-	//	FuzhuvLeft:     fuzhuv_left,
1699
-	//	AArrStr:        a_arr_str,
1700
-	//	VArrStr:        v_arr_str,
1701
-	//	ALeft:          a_left,
1702
-	//	ATop:           a_top,
1703
-	//	VLeft:          v_left,
1704
-	//	VTop:           v_top,
1705
-	//	TextArrStr:     text_arr_str,
1706
-	//	TextLeft:       text_left,
1707
-	//	TextTop:        text_top,
1708
-	//	ScalevNum:      scalev_num,
1709
-	//	ScaleaNum:      scalea_num,
1710
-	//	Value:          value,
1711
-	//	Status:         1,
1712
-	//	UserOrgId:      user_org_id,
1713
-	//}
1714
-	//
1715
-	//err = service.UpdateSiteMap(deviceValsualMap)
1716
-	//
1717
-	//if err != nil {
1718
-	//	this.ServeSuccessJSON(map[string]interface{}{
1719
-	//		"deviceValsualMap": deviceValsualMap,
1720
-	//	})
1721
-	//}
1722
-
1723
-}

+ 1 - 0
models/patient_models.go View File

@@ -229,6 +229,7 @@ type Patients struct {
229 229
 	InfectiousRemark         string  `gorm:"column:infectious_remark" json:"infectious_remark" form:"infectious_remark"`
230 230
 	AllergicHistory          string  `gorm:"column:allergic_history" json:"allergic_history" form:"allergic_history"`
231 231
 	PatientAddress           string  `gorm:"column:patient_address" json:"patient_address" form:"patient_address"`
232
+	FirstLetter              string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
232 233
 }
233 234
 
234 235
 func (Patients) TableName() string {

+ 10 - 9
service/his_service.go View File

@@ -107,15 +107,15 @@ func (VMHisOrder) TableName() string {
107 107
 }
108 108
 
109 109
 type Patients struct {
110
-	ID           int64  `gorm:"column:id" json:"id" form:"id"`
111
-	UserOrgId    int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
112
-	Name         string `gorm:"column:name" json:"name" form:"name"`
113
-	Status       int64  `gorm:"column:status" json:"status" form:"status"`
114
-	IdCardNo     string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
115
-	ScheduleType int64  `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
116
-	Phone        int64  `gorm:"column:phone" json:"phone" form:"phone"`
117
-	Gender       int64  `gorm:"column:gender" json:"gender" form:"gender"`
118
-
110
+	ID                    int64                 `gorm:"column:id" json:"id" form:"id"`
111
+	UserOrgId             int64                 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
112
+	Name                  string                `gorm:"column:name" json:"name" form:"name"`
113
+	Status                int64                 `gorm:"column:status" json:"status" form:"status"`
114
+	IdCardNo              string                `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
115
+	ScheduleType          int64                 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
116
+	Phone                 int64                 `gorm:"column:phone" json:"phone" form:"phone"`
117
+	Gender                int64                 `gorm:"column:gender" json:"gender" form:"gender"`
118
+	FirstLetter           string                `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
119 119
 	Schedule              Schedule              `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"schedule"`
120 120
 	HisPatient            HisPatient            `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
121 121
 	HisPrescription       []*HisPrescription    `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"prescription"`
@@ -202,6 +202,7 @@ type PatientTwo struct {
202 202
 	Schedule              Schedule              `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"schedule"`
203 203
 	HisPatient            []*HisPatientTwo      `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
204 204
 	VMHisPrescriptionInfo VMHisPrescriptionInfo `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"info"`
205
+	FirstLetter           string                `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
205 206
 }
206 207
 
207 208
 func (PatientTwo) TableName() string {