|
@@ -135,6 +135,12 @@ func DialysisApiRegistRouters() {
|
135
|
135
|
beego.Router("/api/patient/getmonitorloglist", &DialysisApiController{}, "Get:GetMonitorLogList")
|
136
|
136
|
|
137
|
137
|
beego.Router("/api/patient/getafterloglist", &DialysisApiController{}, "Get:GetAfterLogList")
|
|
138
|
+
|
|
139
|
+ beego.Router("/api/patient/savegathersetting", &DialysisApiController{}, "Get:SaveGatherSetting")
|
|
140
|
+
|
|
141
|
+ beego.Router("/api/patient/getgathersetting", &DialysisApiController{}, "Get:GetGatherSetting")
|
|
142
|
+
|
|
143
|
+ beego.Router("/api/patient/getdialysisgatherlist", &DialysisApiController{}, "Get:GetDialysisGatherList")
|
138
|
144
|
}
|
139
|
145
|
|
140
|
146
|
func (c *DialysisApiController) GetQueueCall() {
|
|
@@ -7463,3 +7469,134 @@ func (this *DialysisApiController) GetAfterLogList() {
|
7463
|
7469
|
return
|
7464
|
7470
|
}
|
7465
|
7471
|
}
|
|
7472
|
+
|
|
7473
|
+func (this *DialysisApiController) SaveGatherSetting() {
|
|
7474
|
+
|
|
7475
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
7476
|
+ is_index_number, _ := this.GetInt64("is_index_number")
|
|
7477
|
+ fmt.Println("this,23o2332232323232332", is_index_number)
|
|
7478
|
+ is_zone, _ := this.GetInt64("is_zone")
|
|
7479
|
+ is_number, _ := this.GetInt64("is_number")
|
|
7480
|
+ is_birth, _ := this.GetInt64("is_birth")
|
|
7481
|
+ is_age, _ := this.GetInt64("is_age")
|
|
7482
|
+ is_name, _ := this.GetInt64("is_name")
|
|
7483
|
+ is_mode_type, _ := this.GetInt64("is_mode_type")
|
|
7484
|
+ is_prescription_status, _ := this.GetInt64("is_prescription_status")
|
|
7485
|
+ is_admission_number, _ := this.GetInt64("is_admission_number")
|
|
7486
|
+ is_dialysis_no, _ := this.GetInt64("is_dialysis_no")
|
|
7487
|
+ is_dry_weight, _ := this.GetInt64("is_dry_weight")
|
|
7488
|
+ is_dialysis_dialyszers, _ := this.GetInt64("is_dialysis_dialyszers")
|
|
7489
|
+ is_dialysis_strainer, _ := this.GetInt64("is_dialysis_strainer")
|
|
7490
|
+ is_dialysis_irrigation, _ := this.GetInt64("is_dialysis_irrigation")
|
|
7491
|
+ is_calcium, _ := this.GetInt64("is_calcium")
|
|
7492
|
+ is_kalium, _ := this.GetInt64("is_kalium")
|
|
7493
|
+ is_change_nurse, _ := this.GetInt64("is_change_nurse")
|
|
7494
|
+ is_puncture_needle, _ := this.GetInt64("is_puncture_needle")
|
|
7495
|
+ is_anticoagulant, _ := this.GetInt64("is_anticoagulant")
|
|
7496
|
+ is_tube, _ := this.GetInt64("is_tube")
|
|
7497
|
+ is_cuhong, _ := this.GetInt64("is_cuhong")
|
|
7498
|
+ is_zuoka, _ := this.GetInt64("is_zuoka")
|
|
7499
|
+ is_zhetangtie, _ := this.GetInt64("is_zhetangtie")
|
|
7500
|
+ is_paligu, _ := this.GetInt64("is_paligu")
|
|
7501
|
+ is_guhuachun, _ := this.GetInt64("is_guhuachun")
|
|
7502
|
+ is_niaojimei, _ := this.GetInt64("is_niaojimei")
|
|
7503
|
+ is_putaosuangai, _ := this.GetInt64("is_putaosuangai")
|
|
7504
|
+ is_jiaguan, _ := this.GetInt64("is_jiaguan")
|
|
7505
|
+ is_xiongxiewutai, _ := this.GetInt64("is_xiongxiewutai")
|
|
7506
|
+
|
|
7507
|
+ gatherSetting := models.XtDialysisGatherSetting{
|
|
7508
|
+ UserOrgId: orgId,
|
|
7509
|
+ IndexNumber: is_index_number,
|
|
7510
|
+ Zone: is_zone,
|
|
7511
|
+ Number: is_number,
|
|
7512
|
+ Birth: is_birth,
|
|
7513
|
+ Name: is_name,
|
|
7514
|
+ Age: is_age,
|
|
7515
|
+ ModeType: is_mode_type,
|
|
7516
|
+ PrescriptionStatus: is_prescription_status,
|
|
7517
|
+ AdmissionNumber: is_admission_number,
|
|
7518
|
+ DialysisNo: is_dialysis_no,
|
|
7519
|
+ DryWeight: is_dry_weight,
|
|
7520
|
+ DialysisDialyszers: is_dialysis_dialyszers,
|
|
7521
|
+ DialysisStrainer: is_dialysis_strainer,
|
|
7522
|
+ DialysisIrrigation: is_dialysis_irrigation,
|
|
7523
|
+ Calcium: is_calcium,
|
|
7524
|
+ Kalium: is_kalium,
|
|
7525
|
+ ChangeNurse: is_change_nurse,
|
|
7526
|
+ PunctureNeedle: is_puncture_needle,
|
|
7527
|
+ Anticoagulant: is_anticoagulant,
|
|
7528
|
+ Tube: is_tube,
|
|
7529
|
+ Cuhong: is_cuhong,
|
|
7530
|
+ Zuoka: is_zuoka,
|
|
7531
|
+ Zhetangtie: is_zhetangtie,
|
|
7532
|
+ Paligu: is_paligu,
|
|
7533
|
+ Guhuachun: is_guhuachun,
|
|
7534
|
+ Niaojimei: is_niaojimei,
|
|
7535
|
+ Putaosuangai: is_putaosuangai,
|
|
7536
|
+ Jiaguan: is_jiaguan,
|
|
7537
|
+ Xiongxiewutai: is_xiongxiewutai,
|
|
7538
|
+ Ctime: time.Now().Unix(),
|
|
7539
|
+ Mtime: time.Now().Unix(),
|
|
7540
|
+ Status: 1,
|
|
7541
|
+ }
|
|
7542
|
+ //查询该机构有没有设置
|
|
7543
|
+ gatherSettingOne, _ := service.GetGatherSettingByOrgId(orgId)
|
|
7544
|
+ if gatherSettingOne.ID == 0 {
|
|
7545
|
+ service.CreateGather(gatherSetting)
|
|
7546
|
+ } else {
|
|
7547
|
+ gatherSetting.ID = gatherSettingOne.ID
|
|
7548
|
+ service.SaveGather(gatherSetting)
|
|
7549
|
+ }
|
|
7550
|
+
|
|
7551
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
7552
|
+ "gatherSetting": gatherSetting,
|
|
7553
|
+ })
|
|
7554
|
+ return
|
|
7555
|
+}
|
|
7556
|
+
|
|
7557
|
+func (this *DialysisApiController) GetGatherSetting() {
|
|
7558
|
+
|
|
7559
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
7560
|
+
|
|
7561
|
+ gatherSetting, _ := service.GetGatherSetting(orgId)
|
|
7562
|
+
|
|
7563
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
7564
|
+ "gatherSetting": gatherSetting,
|
|
7565
|
+ })
|
|
7566
|
+ return
|
|
7567
|
+}
|
|
7568
|
+
|
|
7569
|
+func (this *DialysisApiController) GetDialysisGatherList() {
|
|
7570
|
+
|
|
7571
|
+ keyword := this.GetString("keywords")
|
|
7572
|
+
|
|
7573
|
+ limit, _ := this.GetInt64("limit")
|
|
7574
|
+
|
|
7575
|
+ page, _ := this.GetInt64("page")
|
|
7576
|
+
|
|
7577
|
+ partion_type := this.GetString("partition_id")
|
|
7578
|
+ idSplit := strings.Split(partion_type, ",")
|
|
7579
|
+ schedule_type, _ := this.GetInt64("schedule_type")
|
|
7580
|
+
|
|
7581
|
+ start_time := this.GetString("schedule_date")
|
|
7582
|
+ timeLayout := "2006-01-02"
|
|
7583
|
+ loc, _ := time.LoadLocation("Local")
|
|
7584
|
+ startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
7585
|
+
|
|
7586
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
7587
|
+
|
|
7588
|
+ scheduids := this.GetString("ids")
|
|
7589
|
+ var ids []string
|
|
7590
|
+ if scheduids != "" {
|
|
7591
|
+ ids = strings.Split(scheduids, ",")
|
|
7592
|
+ }
|
|
7593
|
+
|
|
7594
|
+ list, total, _ := service.GetDialysisGatherList(keyword, limit, page, idSplit, schedule_type, startTime.Unix(), orgId, ids)
|
|
7595
|
+ gatherSetting, _ := service.GetGatherSetting(orgId)
|
|
7596
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
7597
|
+ "list": list,
|
|
7598
|
+ "total": total,
|
|
7599
|
+ "gatherSetting": gatherSetting,
|
|
7600
|
+ })
|
|
7601
|
+ return
|
|
7602
|
+}
|