|
@@ -77,6 +77,7 @@ func HisProjectRouters() {
|
77
|
77
|
beego.Router("/api/hispatient/getallhispatient", &HisProjectApiController{}, "Get:GetAllHisPatient")
|
78
|
78
|
beego.Router("/api/hispatient/getchargeprint", &HisProjectApiController{}, "Get:GetChargePrint")
|
79
|
79
|
beego.Router("/api/hispatient/gettodayschedulepatient", &HisProjectApiController{}, "Get:GetTodaySchedulePatient")
|
|
80
|
+ beego.Router("/api/hispatient/gethispatientdetail", &HisProjectApiController{}, "Get:GetHisPatientDetail")
|
80
|
81
|
}
|
81
|
82
|
|
82
|
83
|
func (this *HisProjectApiController) SaveProject() {
|
|
@@ -1035,20 +1036,22 @@ func (this *HisProjectApiController) GetDoctorAdvicePrint() {
|
1035
|
1036
|
loc, _ := time.LoadLocation("Local")
|
1036
|
1037
|
theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
1037
|
1038
|
recordDateTime := theTime.Unix()
|
1038
|
|
- advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime)
|
1039
|
|
- //
|
|
1039
|
+ fmt.Println("recordDateTime-----------", recordDateTime)
|
|
1040
|
+ prescription_id, _ := this.GetInt64("prescription_id")
|
|
1041
|
+ advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, prescription_id)
|
|
1042
|
+
|
1040
|
1043
|
doctorPorject, err := service.GetDoctorProjectItem(patient_id, recordDateTime)
|
1041
|
1044
|
patient, err := service.GetBloodPatientByPatient(patient_id)
|
1042
|
|
- //hisPatient, err := service.GetHisPatientById(patient_id)
|
|
1045
|
+ prescriptionInfo, err := service.GetPrscriptionInfo(patient_id, recordDateTime)
|
1043
|
1046
|
if err != nil {
|
1044
|
1047
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateConfig)
|
1045
|
1048
|
return
|
1046
|
1049
|
}
|
1047
|
1050
|
this.ServeSuccessJSON(map[string]interface{}{
|
1048
|
|
- "advicePrint": advicePrint,
|
1049
|
|
- //"hisPatient":hisPatient,
|
1050
|
|
- "patient": patient,
|
1051
|
|
- "doctorPorject": doctorPorject,
|
|
1051
|
+ "advicePrint": advicePrint,
|
|
1052
|
+ "patient": patient,
|
|
1053
|
+ "doctorPorject": doctorPorject,
|
|
1054
|
+ "prescriptionInfo": prescriptionInfo,
|
1052
|
1055
|
})
|
1053
|
1056
|
}
|
1054
|
1057
|
|
|
@@ -1347,3 +1350,16 @@ func (this *HisProjectApiController) GetTodaySchedulePatient() {
|
1347
|
1350
|
"patient": patient,
|
1348
|
1351
|
})
|
1349
|
1352
|
}
|
|
1353
|
+
|
|
1354
|
+func (this *HisProjectApiController) GetHisPatientDetail() {
|
|
1355
|
+ patient_id, _ := this.GetInt64("patient_id")
|
|
1356
|
+
|
|
1357
|
+ hisPatient, err := service.GetHisPatientById(patient_id)
|
|
1358
|
+ if err != nil {
|
|
1359
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateConfig)
|
|
1360
|
+ return
|
|
1361
|
+ }
|
|
1362
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1363
|
+ "hisPatient": hisPatient,
|
|
1364
|
+ })
|
|
1365
|
+}
|