|
@@ -92,6 +92,8 @@ func (this *DialysisAPIController) AddMonitorRecord() {
|
92
|
92
|
dialysate_flow, _ := this.GetFloat("dialysate_flow")
|
93
|
93
|
urr := this.GetString("urr")
|
94
|
94
|
blood_sugar, _ := this.GetFloat("blood_sugar")
|
|
95
|
+ monitor_anticoagulant, _ := this.GetInt64("monitor_anticoagulant")
|
|
96
|
+ monitor_anticoagulant_value := this.GetString("monitor_anticoagulant_value")
|
95
|
97
|
adminInfo := this.GetMobileAdminUserInfo()
|
96
|
98
|
patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
|
97
|
99
|
if getPatientErr != nil {
|
|
@@ -146,6 +148,8 @@ func (this *DialysisAPIController) AddMonitorRecord() {
|
146
|
148
|
DialysateFlow: dialysate_flow,
|
147
|
149
|
Urr: urr,
|
148
|
150
|
BloodSugar: blood_sugar,
|
|
151
|
+ MonitorAnticoagulant: monitor_anticoagulant,
|
|
152
|
+ MonitorAnticoagulantValue: monitor_anticoagulant_value,
|
149
|
153
|
}
|
150
|
154
|
|
151
|
155
|
err := service.CreateMonitor(&record)
|
|
@@ -240,7 +244,8 @@ func (this *DialysisAPIController) EditMonitorRecord() {
|
240
|
244
|
urr := this.GetString("urr")
|
241
|
245
|
blood_sugar, _ := this.GetFloat("blood_sugar")
|
242
|
246
|
adminInfo := this.GetMobileAdminUserInfo()
|
243
|
|
-
|
|
247
|
+ monitor_anticoagulant, _ := this.GetInt64("monitor_anticoagulant")
|
|
248
|
+ monitor_anticoagulant_value := this.GetString("monitor_anticoagulant_value")
|
244
|
249
|
monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
|
245
|
250
|
if err != nil {
|
246
|
251
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -288,6 +293,8 @@ func (this *DialysisAPIController) EditMonitorRecord() {
|
288
|
293
|
monitor.DialysateFlow = dialysate_flow
|
289
|
294
|
monitor.Urr = urr
|
290
|
295
|
monitor.BloodSugar = blood_sugar
|
|
296
|
+ monitor.MonitorAnticoagulant = monitor_anticoagulant
|
|
297
|
+ monitor.MonitorAnticoagulantValue = monitor_anticoagulant_value
|
291
|
298
|
err = service.UpdateMonitor(monitor)
|
292
|
299
|
if err != nil {
|
293
|
300
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeMonitorUpdate)
|