28169 2 年前
父节点
当前提交
fe7f6182b1

+ 14 - 3
controllers/doctors_api_controller.go 查看文件

@@ -1488,7 +1488,8 @@ func (c *DoctorsApiController) CreateFirstDisease() {
1488 1488
 	diagnostic_basis := dataBody["diagnostic_basis"].(string)
1489 1489
 	differential_diagnosis := dataBody["differential_diagnosis"].(string)
1490 1490
 	treatment_plan := dataBody["treatment_plan"].(string)
1491
-
1491
+	inspect_date := dataBody["inspect_date"].(string)
1492
+	project_id := dataBody["project_id"].(string)
1492 1493
 	orgId := c.GetAdminUserInfo().CurrentOrgId
1493 1494
 	firstdisease := models.XtPatientFirstDisease{
1494 1495
 		Title:                 title,
@@ -1505,6 +1506,8 @@ func (c *DoctorsApiController) CreateFirstDisease() {
1505 1506
 		Ctime:                 time.Now().Unix(),
1506 1507
 		Mtime:                 0,
1507 1508
 		Status:                1,
1509
+		ProjectId:             project_id,
1510
+		InspectDate:           inspect_date,
1508 1511
 	}
1509 1512
 
1510 1513
 	error := service.CreatePatientFirstDisease(firstdisease)
@@ -1543,9 +1546,14 @@ func (c *DoctorsApiController) GetFirstDetailById() {
1543 1546
 
1544 1547
 	id, _ := c.GetInt64("id")
1545 1548
 	list, err := service.GetFirstDetailById(id)
1549
+	ids := strings.Split(list.ProjectId, ",")
1550
+	datelist := strings.Split(list.InspectDate, ",")
1551
+	fmt.Println("list232323232323w", datelist)
1552
+	inspectlist, err := service.GetInspectionItemlist(list.PatientId, datelist, ids)
1546 1553
 	if err == nil {
1547 1554
 		c.ServeSuccessJSON(map[string]interface{}{
1548
-			"detail": list,
1555
+			"detail":      list,
1556
+			"inspectlist": inspectlist,
1549 1557
 		})
1550 1558
 		return
1551 1559
 	}
@@ -1571,7 +1579,8 @@ func (c *DoctorsApiController) UpdateFirstDisease() {
1571 1579
 	diagnostic_basis := dataBody["diagnostic_basis"].(string)
1572 1580
 	differential_diagnosis := dataBody["differential_diagnosis"].(string)
1573 1581
 	treatment_plan := dataBody["treatment_plan"].(string)
1574
-
1582
+	inspect_date := dataBody["inspect_date"].(string)
1583
+	project_id := dataBody["project_id"].(string)
1575 1584
 	orgId := c.GetAdminUserInfo().CurrentOrgId
1576 1585
 	firstdisease := models.XtPatientFirstDisease{
1577 1586
 		Title:                 title,
@@ -1589,6 +1598,8 @@ func (c *DoctorsApiController) UpdateFirstDisease() {
1589 1598
 		Mtime:                 0,
1590 1599
 		Status:                1,
1591 1600
 		ID:                    id,
1601
+		InspectDate:           inspect_date,
1602
+		ProjectId:             project_id,
1592 1603
 	}
1593 1604
 
1594 1605
 	error := service.UpdatePatientFirstDisease(firstdisease, id)

+ 13 - 8
controllers/patient_api_controller.go 查看文件

@@ -84,7 +84,7 @@ func PatientApiRegistRouters() {
84 84
 
85 85
 }
86 86
 
87
-//GetPatientsList 取患者列表
87
+// GetPatientsList 取患者列表
88 88
 func (c *PatientApiController) GetPatientsList() {
89 89
 	var err error
90 90
 	defer func() {
@@ -157,7 +157,7 @@ func (c *PatientApiController) GetPatientsList() {
157 157
 
158 158
 }
159 159
 
160
-//GetPatientTotal
160
+// GetPatientTotal
161 161
 func (c *PatientApiController) GetPatientTotal() {
162 162
 	adminUserInfo := c.GetAdminUserInfo()
163 163
 
@@ -182,7 +182,7 @@ func (c *PatientApiController) GetPatientsAllList() {
182 182
 	return
183 183
 }
184 184
 
185
-//GenerateDialysisNo 生成透析号
185
+// GenerateDialysisNo 生成透析号
186 186
 func (c *PatientApiController) GenerateDialysisNo() {
187 187
 	adminUserInfo := c.GetAdminUserInfo()
188 188
 
@@ -206,7 +206,7 @@ func (c *PatientApiController) GenerateDialysisNo() {
206 206
 	return
207 207
 }
208 208
 
209
-//CreatePatient 创建患者
209
+// CreatePatient 创建患者
210 210
 func (c *PatientApiController) CreatePatient() {
211 211
 	record_date := c.GetString("record_date")
212 212
 	is_infectious, _ := c.GetInt64("is_infectious")
@@ -443,7 +443,7 @@ func (c *PatientApiController) CreatePatient() {
443 443
 	return
444 444
 }
445 445
 
446
-//EditPatient 修改
446
+// EditPatient 修改
447 447
 func (c *PatientApiController) EditPatient() {
448 448
 	id, _ := c.GetInt64("id", 0)
449 449
 
@@ -1074,7 +1074,7 @@ func (c *PatientApiController) DeleteDialysisSolution() {
1074 1074
 	return
1075 1075
 }
1076 1076
 
1077
-//GetDryWeights 取患者干体重调整铺
1077
+// GetDryWeights 取患者干体重调整铺
1078 1078
 func (c *PatientApiController) GetDryWeights() {
1079 1079
 	page, _ := c.GetInt64("page", 1)
1080 1080
 	limit, _ := c.GetInt64("limit", 10)
@@ -1289,9 +1289,9 @@ func (c *PatientApiController) CreateGroupAdvice() {
1289 1289
 	Remark := ""
1290 1290
 	if dataBody["remark"] != nil && reflect.TypeOf(dataBody["remark"]).String() == "string" {
1291 1291
 		remark, _ := dataBody["remark"].(string)
1292
+
1292 1293
 		Remark = remark
1293 1294
 	}
1294
-
1295 1295
 	var advices []*models.GroupAdvice
1296 1296
 	if dataBody["adviceNames"] == nil || reflect.TypeOf(dataBody["adviceNames"]).String() != "[]interface {}" {
1297 1297
 		utils.ErrorLog("adviceNames")
@@ -1323,6 +1323,7 @@ func (c *PatientApiController) CreateGroupAdvice() {
1323 1323
 			return
1324 1324
 		}
1325 1325
 		adviceName, _ := adviceNameM["advice_name"].(string)
1326
+		fmt.Println("adviceceNMAE--------------------------------", adviceName)
1326 1327
 		if len(adviceName) == 0 {
1327 1328
 			utils.ErrorLog("len(advice_name) == 0")
1328 1329
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -1416,6 +1417,10 @@ func (c *PatientApiController) CreateGroupAdvice() {
1416 1417
 			advice.DrugNameId = drug_name_id
1417 1418
 		}
1418 1419
 
1420
+		remark, _ := adviceNameM["remark"].(string)
1421
+		fmt.Println("哦哦撒搜哦搜搜哦remark-----------------------------------", remark)
1422
+		advice.Remark = remark
1423
+
1419 1424
 		if adviceType == 1 {
1420 1425
 
1421 1426
 			if adviceNameM["frequency_type"] != nil || reflect.TypeOf(adviceNameM["frequency_type"]).String() == "float64" {
@@ -3029,7 +3034,7 @@ func (c *PatientApiController) DeleteGroupAdvice() {
3029 3034
 	return
3030 3035
 }
3031 3036
 
3032
-//GetDoctorAdvices 医嘱列表
3037
+// GetDoctorAdvices 医嘱列表
3033 3038
 func (c *PatientApiController) GetDoctorAdvices() {
3034 3039
 	id, _ := c.GetInt64("id", 0)
3035 3040
 	adviceType, _ := c.GetInt64("advice_type", 0)

+ 2 - 0
models/patient_models.go 查看文件

@@ -1818,6 +1818,8 @@ type XtPatientFirstDisease struct {
1818 1818
 	Ctime                 int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
1819 1819
 	Mtime                 int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
1820 1820
 	Status                int64  `gorm:"column:status" json:"status" form:"status"`
1821
+	ProjectId             string `gorm:"column:project_id" json:"project_id" form:"project_id"`
1822
+	InspectDate           string `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
1821 1823
 }
1822 1824
 
1823 1825
 func (XtPatientFirstDisease) TableName() string {

+ 1 - 1
service/patientmanage_service.go 查看文件

@@ -1948,7 +1948,7 @@ func GetFirstDetailById(id int64) (models.XtPatientFirstDisease, error) {
1948 1948
 
1949 1949
 func UpdatePatientFirstDisease(disease models.XtPatientFirstDisease, id int64) error {
1950 1950
 
1951
-	err := XTWriteDB().Model(&models.XtPatientFirstDisease{}).Where("id =? and status = 1", id).Update(map[string]interface{}{"title": disease.Title, "doctor": disease.Doctor, "record_date": disease.RecordDate, "main_content": disease.MainContent, "patient_case": disease.PatientCase, "tentative_diagnosis": disease.TentativeDiagnosis, "diagnostic_basis": disease.DiagnosticBasis, "differential_diagnosis": disease.DifferentialDiagnosis, "treatment_plan": disease.TreatmentPlan}).Error
1951
+	err := XTWriteDB().Model(&models.XtPatientFirstDisease{}).Where("id =? and status = 1", id).Update(map[string]interface{}{"title": disease.Title, "doctor": disease.Doctor, "record_date": disease.RecordDate, "main_content": disease.MainContent, "patient_case": disease.PatientCase, "tentative_diagnosis": disease.TentativeDiagnosis, "diagnostic_basis": disease.DiagnosticBasis, "differential_diagnosis": disease.DifferentialDiagnosis, "treatment_plan": disease.TreatmentPlan, "project_id": disease.ProjectId, "inspect_date": disease.InspectDate}).Error
1952 1952
 	return err
1953 1953
 }
1954 1954