Browse Source

2024/6/17

28169 2 weeks ago
parent
commit
bd0d3ebec8
3 changed files with 10 additions and 0 deletions
  1. BIN
      XT_New.exe
  2. 3 0
      controllers/patient_api_controller.go
  3. 7 0
      service/patient_dataconfig_service.go

BIN
XT_New.exe View File


+ 3 - 0
controllers/patient_api_controller.go View File

8580
 
8580
 
8581
 	patient, _ := service.GetPatientByIDOne(orgId, patient_id)
8581
 	patient, _ := service.GetPatientByIDOne(orgId, patient_id)
8582
 
8582
 
8583
+	longAdvice, _ := service.GetLongDoctorAdvice(orgId, patient_id, startTime, endTime)
8584
+
8583
 	this.ServeSuccessJSON(map[string]interface{}{
8585
 	this.ServeSuccessJSON(map[string]interface{}{
8584
 		"prescription":  prescription,
8586
 		"prescription":  prescription,
8585
 		"berfor":        berfor,
8587
 		"berfor":        berfor,
8588
 		"inpectionList": inpectionList,
8590
 		"inpectionList": inpectionList,
8589
 		"dialysisOrder": dialysisOrder,
8591
 		"dialysisOrder": dialysisOrder,
8590
 		"patient":       patient,
8592
 		"patient":       patient,
8593
+		"longAdvice":    longAdvice,
8591
 	})
8594
 	})
8592
 
8595
 
8593
 }
8596
 }

+ 7 - 0
service/patient_dataconfig_service.go View File

175
 	}
175
 	}
176
 	return &patient, nil
176
 	return &patient, nil
177
 }
177
 }
178
+
179
+func GetLongDoctorAdvice(org_id int64, patient_id int64, start_time int64, end_time int64) (advice []*models.DoctorAdvice, err error) {
180
+
181
+	err = XTReadDB().Where("user_org_id = ? and status=1 and patient_id = ? and created_time >=? and created_time<=? and advice_type=1", org_id, patient_id, 1514736000, end_time).Find(&advice).Error
182
+
183
+	return advice, err
184
+}