|
@@ -47,7 +47,7 @@ func (this *DialysisParamerterApiController) GetMobileDialysisParameters() {
|
47
|
47
|
if len(keywords) > 0 {
|
48
|
48
|
dialysisSchedule, err, total := service.GetDialysisParametersByKeyword(orgid, keywords, scheduleType, partitionType, page, limit, theTime.Unix())
|
49
|
49
|
//查询今日排班的病人
|
50
|
|
- patient, err := service.GetDialysisTodaySchedulePatient(orgid, theTime.Unix(), page, limit)
|
|
50
|
+ patient, err := service.GetDialysisTodaySchedulePatient(orgid, theTime.Unix(), page, limit, keywords)
|
51
|
51
|
var vlist []interface{}
|
52
|
52
|
var elist []interface{}
|
53
|
53
|
for _, item := range patient {
|
|
@@ -61,6 +61,7 @@ func (this *DialysisParamerterApiController) GetMobileDialysisParameters() {
|
61
|
61
|
"total": total,
|
62
|
62
|
"prescription": vlist,
|
63
|
63
|
"dialysbefor": elist,
|
|
64
|
+ "patient": patient,
|
64
|
65
|
})
|
65
|
66
|
} else {
|
66
|
67
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -69,31 +70,10 @@ func (this *DialysisParamerterApiController) GetMobileDialysisParameters() {
|
69
|
70
|
} else {
|
70
|
71
|
dialysisSchedule, err, total := service.GetDialysisParameter(orgid, theTime.Unix(), scheduleType, partitionType, page, limit)
|
71
|
72
|
//查询今日排班的病人
|
72
|
|
- patient, err := service.GetDialysisTodaySchedulePatient(orgid, theTime.Unix(), page, limit)
|
|
73
|
+ patient, err := service.GetDialysisTodaySchedulePatient(orgid, theTime.Unix(), page, limit, keywords)
|
73
|
74
|
var vlist []interface{}
|
74
|
75
|
var elist []interface{}
|
75
|
76
|
for _, item := range patient {
|
76
|
|
- //查询当前日期的病人是否存在数据
|
77
|
|
- //_, errcode := service.GetToDayDialysisPrescription(item.PatientId, orgid, theTime.Unix())
|
78
|
|
- //if errcode == gorm.ErrRecordNotFound {
|
79
|
|
- // //查询每个病人透析处方的最后一次数据
|
80
|
|
- // prescription, _ := service.GetLastDialysisPrescription(item.PatientId, orgid)
|
81
|
|
- // vlist = append(vlist, prescription)
|
82
|
|
- //} else if errcode == nil {
|
83
|
|
- // //获取当前日期
|
84
|
|
- // prescription, _ := service.GetDialysisPrescriptionList(item.PatientId, orgid, theTime.Unix())
|
85
|
|
- // vlist = append(vlist, prescription)
|
86
|
|
- //}
|
87
|
|
- //
|
88
|
|
- //_, errcodes := service.GetTodayAssessmentBeforDialysis(item.PatientId, orgid, theTime.Unix())
|
89
|
|
- //if errcodes == gorm.ErrRecordNotFound {
|
90
|
|
- // //查询每个病人透前评估的最后一次数据
|
91
|
|
- // dialysis, _ := service.GetLastAssessmentBeforDialysis(item.PatientId, orgid)
|
92
|
|
- // elist = append(elist, dialysis)
|
93
|
|
- //} else if errcodes == nil {
|
94
|
|
- // dialysis, _ := service.GetAssessmentBeforDialysisByStartime(item.PatientId, orgid, theTime.Unix())
|
95
|
|
- // elist = append(elist, dialysis)
|
96
|
|
- //}
|
97
|
77
|
prescription, _ := service.GetDialysisPrescriptionList(item.PatientId, orgid, theTime.Unix())
|
98
|
78
|
vlist = append(vlist, prescription)
|
99
|
79
|
dialysis, _ := service.GetAssessmentBeforDialysisByStartime(item.PatientId, orgid, theTime.Unix())
|
|
@@ -105,6 +85,7 @@ func (this *DialysisParamerterApiController) GetMobileDialysisParameters() {
|
105
|
85
|
"total": total,
|
106
|
86
|
"prescription": vlist,
|
107
|
87
|
"dialysbefor": elist,
|
|
88
|
+ "patient": patient,
|
108
|
89
|
})
|
109
|
90
|
} else {
|
110
|
91
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -173,7 +154,7 @@ func (this *DialysisParamerterApiController) GetMobileCollectList() {
|
173
|
154
|
//获取透析参数数据
|
174
|
155
|
schedule, err, _ := service.GetCollectList(limit, page, partitiontype, scheduletype, startime.Unix(), orgId, keyword)
|
175
|
156
|
//查询今日排班的病人
|
176
|
|
- patient, err := service.GetDialysisTodaySchedulePatient(orgId, startime.Unix(), page, limit)
|
|
157
|
+ patient, err := service.GetDialysisTodaySchedulePatient(orgId, startime.Unix(), page, limit, keyword)
|
177
|
158
|
var vlist []interface{}
|
178
|
159
|
var clist []interface{}
|
179
|
160
|
for _, item := range patient {
|
|
@@ -226,9 +207,8 @@ func (this *DialysisParamerterApiController) GetMobileCollectList() {
|
226
|
207
|
"good_type": goodTypes,
|
227
|
208
|
"total": total,
|
228
|
209
|
"schedule": schedule,
|
229
|
|
- //"consumables": consumables,
|
230
|
|
- "prescription": vlist,
|
231
|
|
- //"reducelist": clist,
|
|
210
|
+ "prescription": vlist,
|
|
211
|
+ "patient": patient,
|
232
|
212
|
})
|
233
|
213
|
return
|
234
|
214
|
|