|
@@ -113,10 +113,42 @@ func (this *XcxApiController) GetUserRegister() {
|
113
|
113
|
err := service.CreateXcxAdminUser(role)
|
114
|
114
|
if err == nil {
|
115
|
115
|
mobilePatient, _ := service.GetMobilePatient(mobile, id_card_no)
|
|
116
|
+ template_id, _ := service.GetTemplateMode(mobilePatient.UserOrgId)
|
|
117
|
+ //处方
|
|
118
|
+ prescripition_config, _ := service.GetPrescripionFieldConfig(mobilePatient.UserOrgId)
|
|
119
|
+
|
|
120
|
+ //接诊评估
|
|
121
|
+ receive_treatement_config, _ := service.GetReceiveTreatmentAssess(mobilePatient.UserOrgId)
|
|
122
|
+
|
|
123
|
+ //透前评估
|
|
124
|
+ dialysis_befor, _ := service.GetDialysisBefor(mobilePatient.UserOrgId)
|
|
125
|
+
|
|
126
|
+ //透析上机
|
|
127
|
+ dialysis_order, _ := service.GetDialysisOrderConfig(mobilePatient.UserOrgId)
|
|
128
|
+
|
|
129
|
+ //透析监测
|
|
130
|
+ monitor_record, _ := service.GetMonitorRecordConfig(mobilePatient.UserOrgId)
|
|
131
|
+
|
|
132
|
+ //透后评估
|
|
133
|
+ dialysis_after, _ := service.GetDialysisAfeterConfig(mobilePatient.UserOrgId)
|
|
134
|
+
|
|
135
|
+ treate_ment, _ := service.GetTreatMentConfig(mobilePatient.UserOrgId)
|
|
136
|
+ var configList interface{}
|
|
137
|
+ configList, _ = service.GetConfigList(mobilePatient.UserOrgId)
|
116
|
138
|
this.ServeSuccessJSON(map[string]interface{}{
|
117
|
|
- "role": role,
|
118
|
|
- "is_bind": true,
|
119
|
|
- "patient": mobilePatient,
|
|
139
|
+ "role": role,
|
|
140
|
+ "is_bind": true,
|
|
141
|
+ "patient": mobilePatient,
|
|
142
|
+ "template_id": template_id,
|
|
143
|
+ "user_org_id": mobilePatient.UserOrgId,
|
|
144
|
+ "prescripition_config": prescripition_config,
|
|
145
|
+ "receive_treatement_config": receive_treatement_config,
|
|
146
|
+ "dialysis_befor": dialysis_befor,
|
|
147
|
+ "dialysis_order": dialysis_order,
|
|
148
|
+ "monitor_record": monitor_record,
|
|
149
|
+ "dialysis_after": dialysis_after,
|
|
150
|
+ "treate_ment": treate_ment,
|
|
151
|
+ "configList": configList,
|
120
|
152
|
})
|
121
|
153
|
} else {
|
122
|
154
|
this.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -126,9 +158,41 @@ func (this *XcxApiController) GetUserRegister() {
|
126
|
158
|
}
|
127
|
159
|
} else if errcode == nil {
|
128
|
160
|
mobilePatient, _ := service.GetMobilePatient(mobile, id_card_no)
|
|
161
|
+ template_id, _ := service.GetTemplateMode(mobilePatient.UserOrgId)
|
|
162
|
+ //处方
|
|
163
|
+ prescripition_config, _ := service.GetPrescripionFieldConfig(mobilePatient.UserOrgId)
|
|
164
|
+
|
|
165
|
+ //接诊评估
|
|
166
|
+ receive_treatement_config, _ := service.GetReceiveTreatmentAssess(mobilePatient.UserOrgId)
|
|
167
|
+
|
|
168
|
+ //透前评估
|
|
169
|
+ dialysis_befor, _ := service.GetDialysisBefor(mobilePatient.UserOrgId)
|
|
170
|
+
|
|
171
|
+ //透析上机
|
|
172
|
+ dialysis_order, _ := service.GetDialysisOrderConfig(mobilePatient.UserOrgId)
|
|
173
|
+
|
|
174
|
+ //透析监测
|
|
175
|
+ monitor_record, _ := service.GetMonitorRecordConfig(mobilePatient.UserOrgId)
|
|
176
|
+
|
|
177
|
+ //透后评估
|
|
178
|
+ dialysis_after, _ := service.GetDialysisAfeterConfig(mobilePatient.UserOrgId)
|
|
179
|
+
|
|
180
|
+ treate_ment, _ := service.GetTreatMentConfig(mobilePatient.UserOrgId)
|
|
181
|
+ var configList interface{}
|
|
182
|
+ configList, _ = service.GetConfigList(mobilePatient.UserOrgId)
|
129
|
183
|
this.ServeSuccessJSON(map[string]interface{}{
|
130
|
|
- "is_bind": true,
|
131
|
|
- "patient": mobilePatient,
|
|
184
|
+ "is_bind": true,
|
|
185
|
+ "patient": mobilePatient,
|
|
186
|
+ "template_id": template_id,
|
|
187
|
+ "user_org_id": mobilePatient.UserOrgId,
|
|
188
|
+ "prescripition_config": prescripition_config,
|
|
189
|
+ "receive_treatement_config": receive_treatement_config,
|
|
190
|
+ "dialysis_befor": dialysis_befor,
|
|
191
|
+ "dialysis_order": dialysis_order,
|
|
192
|
+ "monitor_record": monitor_record,
|
|
193
|
+ "dialysis_after": dialysis_after,
|
|
194
|
+ "treate_ment": treate_ment,
|
|
195
|
+ "list": configList,
|
132
|
196
|
})
|
133
|
197
|
}
|
134
|
198
|
|
|
@@ -173,17 +237,81 @@ func (this *XcxApiController) GetLoginInfor() {
|
173
|
237
|
user_admin, errcodes := service.GetXcxMobileInformation(mobile)
|
174
|
238
|
if errcodes == gorm.ErrRecordNotFound {
|
175
|
239
|
info, _ := service.GetMobilePatientInfo(mobile)
|
|
240
|
+ template_id, _ := service.GetTemplateMode(info.UserOrgId)
|
|
241
|
+ //处方
|
|
242
|
+ prescripition_config, _ := service.GetPrescripionFieldConfig(info.UserOrgId)
|
|
243
|
+
|
|
244
|
+ //接诊评估
|
|
245
|
+ receive_treatement_config, _ := service.GetReceiveTreatmentAssess(info.UserOrgId)
|
|
246
|
+
|
|
247
|
+ //透前评估
|
|
248
|
+ dialysis_befor, _ := service.GetDialysisBefor(info.UserOrgId)
|
|
249
|
+
|
|
250
|
+ //透析上机
|
|
251
|
+ dialysis_order, _ := service.GetDialysisOrderConfig(info.UserOrgId)
|
|
252
|
+
|
|
253
|
+ //透析监测
|
|
254
|
+ monitor_record, _ := service.GetMonitorRecordConfig(info.UserOrgId)
|
|
255
|
+
|
|
256
|
+ //透后评估
|
|
257
|
+ dialysis_after, _ := service.GetDialysisAfeterConfig(info.UserOrgId)
|
|
258
|
+
|
|
259
|
+ treate_ment, _ := service.GetTreatMentConfig(info.UserOrgId)
|
|
260
|
+ var configList interface{}
|
|
261
|
+ configList, _ = service.GetConfigList(info.UserOrgId)
|
176
|
262
|
this.ServeSuccessJSON(map[string]interface{}{
|
177
|
|
- "patient": info,
|
178
|
|
- "role": user_admin,
|
179
|
|
- "is_bind": false,
|
|
263
|
+ "patient": info,
|
|
264
|
+ "template_id": template_id,
|
|
265
|
+ "user_org_id": info.UserOrgId,
|
|
266
|
+ "prescripition_config": prescripition_config,
|
|
267
|
+ "receive_treatement_config": receive_treatement_config,
|
|
268
|
+ "dialysis_befor": dialysis_befor,
|
|
269
|
+ "dialysis_order": dialysis_order,
|
|
270
|
+ "monitor_record": monitor_record,
|
|
271
|
+ "dialysis_after": dialysis_after,
|
|
272
|
+ "treate_ment": treate_ment,
|
|
273
|
+ "role": user_admin,
|
|
274
|
+ "is_bind": false,
|
|
275
|
+ "list": configList,
|
180
|
276
|
})
|
181
|
277
|
} else if errcodes == nil {
|
182
|
278
|
info, _ := service.GetPatientListByPatientId(user_admin.PatientId)
|
|
279
|
+ template_id, _ := service.GetTemplateMode(info.UserOrgId)
|
|
280
|
+ //处方
|
|
281
|
+ prescripition_config, _ := service.GetPrescripionFieldConfig(info.UserOrgId)
|
|
282
|
+
|
|
283
|
+ //接诊评估
|
|
284
|
+ receive_treatement_config, _ := service.GetReceiveTreatmentAssess(info.UserOrgId)
|
|
285
|
+
|
|
286
|
+ //透前评估
|
|
287
|
+ dialysis_befor, _ := service.GetDialysisBefor(info.UserOrgId)
|
|
288
|
+
|
|
289
|
+ //透析上机
|
|
290
|
+ dialysis_order, _ := service.GetDialysisOrderConfig(info.UserOrgId)
|
|
291
|
+
|
|
292
|
+ //透析监测
|
|
293
|
+ monitor_record, _ := service.GetMonitorRecordConfig(info.UserOrgId)
|
|
294
|
+
|
|
295
|
+ //透后评估
|
|
296
|
+ dialysis_after, _ := service.GetDialysisAfeterConfig(info.UserOrgId)
|
|
297
|
+
|
|
298
|
+ treate_ment, _ := service.GetTreatMentConfig(info.UserOrgId)
|
|
299
|
+ var configList interface{}
|
|
300
|
+ configList, _ = service.GetConfigList(info.UserOrgId)
|
183
|
301
|
this.ServeSuccessJSON(map[string]interface{}{
|
184
|
|
- "patient": info,
|
185
|
|
- "role": user_admin,
|
186
|
|
- "is_bind": true,
|
|
302
|
+ "patient": info,
|
|
303
|
+ "role": user_admin,
|
|
304
|
+ "is_bind": true,
|
|
305
|
+ "template_id": template_id,
|
|
306
|
+ "user_org_id": info.UserOrgId,
|
|
307
|
+ "prescripition_config": prescripition_config,
|
|
308
|
+ "receive_treatement_config": receive_treatement_config,
|
|
309
|
+ "dialysis_befor": dialysis_befor,
|
|
310
|
+ "dialysis_order": dialysis_order,
|
|
311
|
+ "monitor_record": monitor_record,
|
|
312
|
+ "dialysis_after": dialysis_after,
|
|
313
|
+ "treate_ment": treate_ment,
|
|
314
|
+ "list": configList,
|
187
|
315
|
})
|
188
|
316
|
}
|
189
|
317
|
|
|
@@ -380,6 +508,7 @@ func (this *XcxApiController) GetMobileSchedule() {
|
380
|
508
|
time_now := time.Now().Format("2006-01-02")
|
381
|
509
|
timeNowUnix, _ := time.ParseInLocation(timeLayout+"15:04:05", time_now+"00:00:00", loc)
|
382
|
510
|
fmt.Println("timeNowUnix", timeNowUnix.Unix())
|
|
511
|
+
|
383
|
512
|
patient, getPatientErr := service.MobileGetPatientDetail(info.UserOrgId, patientID)
|
384
|
513
|
if getPatientErr != nil {
|
385
|
514
|
this.ErrorLog("获取患者信息失败:%v", getPatientErr)
|