28169 2 viikkoa sitten
vanhempi
commit
bd0d3ebec8
3 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  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 Näytä tiedosto


+ 3 - 0
controllers/patient_api_controller.go Näytä tiedosto

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

+ 7 - 0
service/patient_dataconfig_service.go Näytä tiedosto

@@ -175,3 +175,10 @@ func GetPatientByIDThree(orgID int64, patientID int64) (*models.Patients, error)
175 175
 	}
176 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
+}