|
@@ -142,6 +142,7 @@ func (c *HisApiController) GetHisPatientList() {
|
142
|
142
|
patients, _ := service.GetScheduleHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
143
|
143
|
patients_two, _ := service.GetHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
144
|
144
|
patients = append(patients, patients_two...)
|
|
145
|
+ patients = RemoveRepeatedPatient(patients)
|
145
|
146
|
|
146
|
147
|
var total_one int64
|
147
|
148
|
var total_two int64
|
|
@@ -244,6 +245,11 @@ func (c *HisApiController) GetHisPatientInfo() {
|
244
|
245
|
case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
245
|
246
|
patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
246
|
247
|
order, _ := service.GetHisOrder(admin.CurrentOrgId, number, patient_id)
|
|
248
|
+
|
|
249
|
+ doctors, _ := service.GetHisAdminUserDoctors(admin.CurrentOrgId)
|
|
250
|
+ //获取所有科室信息
|
|
251
|
+ department, _ := service.GetAllDepartMent(admin.CurrentOrgId)
|
|
252
|
+
|
247
|
253
|
c.ServeSuccessJSON(map[string]interface{}{
|
248
|
254
|
"his_info": his_patient_info,
|
249
|
255
|
"xt_info": xt_patient_info,
|
|
@@ -252,6 +258,8 @@ func (c *HisApiController) GetHisPatientInfo() {
|
252
|
258
|
"info": patientPrescriptionInfo,
|
253
|
259
|
"month_prescriptions": monthPrescriptions,
|
254
|
260
|
"order": order,
|
|
261
|
+ "doctors": doctors,
|
|
262
|
+ "department": department,
|
255
|
263
|
})
|
256
|
264
|
return
|
257
|
265
|
|
|
@@ -2990,3 +2998,20 @@ func (c *HisApiController) GetHisUnRegisterPatientList() {
|
2990
|
2998
|
})
|
2991
|
2999
|
|
2992
|
3000
|
}
|
|
3001
|
+
|
|
3002
|
+func RemoveRepeatedPatient(patient []*service.Patients) (newArr []*service.Patients) {
|
|
3003
|
+ newArr = make([]*service.Patients, 0)
|
|
3004
|
+ for i := 0; i < len(patient); i++ {
|
|
3005
|
+ repeat := false
|
|
3006
|
+ for j := i + 1; j < len(patient); j++ {
|
|
3007
|
+ if patient[i].ID == patient[j].ID {
|
|
3008
|
+ repeat = true
|
|
3009
|
+ break
|
|
3010
|
+ }
|
|
3011
|
+ }
|
|
3012
|
+ if !repeat {
|
|
3013
|
+ newArr = append(newArr, patient[i])
|
|
3014
|
+ }
|
|
3015
|
+ }
|
|
3016
|
+ return
|
|
3017
|
+}
|