浏览代码

Merge branch '20220812' of http://git.shengws.com/csx/XT_New into 20220812

test_user 2 年前
父节点
当前提交
9fa530ab54

+ 1 - 1
conf/app.conf 查看文件

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9531
3
-runmode =dev
3
+runmode = prod
4 4
 #dev/prod
5 5
 
6 6
 #

+ 26 - 12
controllers/dialysis_api_controller.go 查看文件

@@ -331,6 +331,8 @@ func (c *DialysisApiController) PostPrescription() {
331 331
 	prescription_sodium := c.GetString("prescription_sodium")
332 332
 	start_sodium := c.GetString("start_sodium")
333 333
 	sodium_curve := c.GetString("sodium_curve")
334
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
335
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
334 336
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
335 337
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
336 338
 
@@ -444,6 +446,8 @@ func (c *DialysisApiController) PostPrescription() {
444 446
 		PrescriptionSodium:         prescription_sodium,
445 447
 		StartSodium:                start_sodium,
446 448
 		SodiumCurve:                sodium_curve,
449
+		DialysisFluidFlow:          dialysis_fluid_flow,
450
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
447 451
 	}
448 452
 
449 453
 	//长沙南雅医院,自动生成抗凝剂的临时处方
@@ -462,7 +466,7 @@ func (c *DialysisApiController) PostPrescription() {
462 466
 			AdviceName:            "",                            // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
463 467
 			AdviceDesc:            "",
464 468
 			ReminderDate:          0,
465
-			SingleDose:            5000,
469
+			SingleDose:            anticoagulant_zongliang,
466 470
 			SingleDoseUnit:        "iu",
467 471
 			DrugSpec:              0,
468 472
 			DrugSpecUnit:          "",
@@ -541,7 +545,8 @@ func (c *DialysisApiController) PostPrescription() {
541 545
 			advice.AdviceName = "低分子肝素钠注射液"
542 546
 			// 修改患者临时医嘱里的抗凝剂医嘱
543 547
 			advice.ID = advicePrescription.ID
544
-			service.UpdateDoctorAdvice(&advice)
548
+			service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
549
+			//service.UpdateDoctorAdvice(&advice)
545 550
 		} else {
546 551
 			if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
547 552
 				advice.AdviceName = "低分子肝素钠注射液"
@@ -668,7 +673,7 @@ func (c *DialysisApiController) PostPrescription() {
668 673
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
669 674
 			if advicePrescription.ID > 0 {
670 675
 
671
-				service.UpdateDoctorAdvieById(advicePrescription.ID, prescribing_number)
676
+				service.UpdateDoctorAdvieByIdOne(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
672 677
 
673 678
 				key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
674 679
 				redis := service.RedisClient()
@@ -828,6 +833,8 @@ func (c *DialysisApiController) PostSoulution() {
828 833
 	prescription_sodium := c.GetString("prescription_sodium")
829 834
 	start_sodium := c.GetString("start_sodium")
830 835
 	sodium_curve := c.GetString("sodium_curve")
836
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
837
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
831 838
 	var prescription_doctor int64
832 839
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
833 840
 
@@ -961,6 +968,8 @@ func (c *DialysisApiController) PostSoulution() {
961 968
 		PrescriptionSodium:         prescription_sodium,
962 969
 		SodiumCurve:                sodium_curve,
963 970
 		TreatmentRemark:            treatment_remark,
971
+		DialysisFluidFlow:          dialysis_fluid_flow,
972
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
964 973
 	}
965 974
 
966 975
 	//查询最近透析准备表里是否存在 透析器 灌流器
@@ -1137,6 +1146,8 @@ func (c *DialysisApiController) PostSoulution() {
1137 1146
 		PrescriptionSodium:         prescription_sodium,
1138 1147
 		SodiumCurve:                sodium_curve,
1139 1148
 		TreatmentRemark:            treatment_remark,
1149
+		DialysisFluidFlow:          dialysis_fluid_flow,
1150
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1140 1151
 	}
1141 1152
 
1142 1153
 	//针对河间咸得
@@ -1182,7 +1193,7 @@ func (c *DialysisApiController) PostSoulution() {
1182 1193
 			AdviceName:            "",                            // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
1183 1194
 			AdviceDesc:            "",
1184 1195
 			ReminderDate:          0,
1185
-			SingleDose:            5000,
1196
+			SingleDose:            anticoagulant_zongliang,
1186 1197
 			SingleDoseUnit:        "iu",
1187 1198
 			DrugSpec:              0,
1188 1199
 			DrugSpecUnit:          "",
@@ -1261,7 +1272,7 @@ func (c *DialysisApiController) PostSoulution() {
1261 1272
 			advice.AdviceName = "低分子肝素钠注射液"
1262 1273
 			// 修改患者临时医嘱里的抗凝剂医嘱
1263 1274
 			advice.ID = advicePrescription.ID
1264
-			service.UpdateDoctorAdvice(&advice)
1275
+			service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
1265 1276
 		} else {
1266 1277
 			// 新增患者临时医嘱里的抗凝剂医嘱
1267 1278
 			if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
@@ -4133,7 +4144,7 @@ func (this *DialysisApiController) GetTodayMonitor() {
4133 4144
 			}
4134 4145
 
4135 4146
 			//长沙南雅
4136
-			if adminInfo.CurrentOrgId == 10395 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10340 || adminInfo.CurrentOrgId == 10432 || adminInfo.CurrentOrgId == 10441 || adminInfo.CurrentOrgId == 10445 || adminInfo.CurrentOrgId == 9829 {
4147
+			if adminInfo.CurrentOrgId == 10395 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10340 || adminInfo.CurrentOrgId == 10432 || adminInfo.CurrentOrgId == 10441 || adminInfo.CurrentOrgId == 10445 || adminInfo.CurrentOrgId == 9829 || adminInfo.CurrentOrgId == 10440 {
4137 4148
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 60 / 1000 / float64(totalMin) * 1000)
4138 4149
 
4139 4150
 				record.UltrafiltrationRate = ultrafiltration_rate
@@ -5800,12 +5811,15 @@ func (this *DialysisApiController) GetMobileScheduleList() {
5800 5811
 
5801 5812
 	if len(schedule) > 0 {
5802 5813
 		for _, its := range schedule {
5803
-			prescription, _ := service.GetPrescriptionList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5804
-			its.DialysisPrescription = prescription
5805
-			monitor, _ := service.GetLastMonitorRecordList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5806
-			its.MonitoringRecord = monitor
5807
-			after, _ := service.GetLastAfter(its.PatientId, its.ScheduleDate, its.UserOrgId)
5808
-			its.XtAssessmentAfterDislysis = after
5814
+			//prescription, _ := service.GetPrescriptionList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5815
+			//its.DialysisPrescription = prescription
5816
+			//monitor, _ := service.GetLastMonitorRecordList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5817
+			//its.MonitoringRecord = monitor
5818
+			//after, _ := service.GetLastAfter(its.PatientId, its.ScheduleDate, its.UserOrgId)
5819
+			//its.XtAssessmentAfterDislysis = after
5820
+
5821
+			order, _ := service.GetLastOrder(its.UserOrgId, its.PatientId, its.ScheduleDate)
5822
+			service.UpdateDoctorSix(order.StartTime, order.PatientId, order.DialysisDate, order.UserOrgId)
5809 5823
 		}
5810 5824
 	}
5811 5825
 

+ 4 - 1
controllers/dialysis_record_api_controller.go 查看文件

@@ -554,6 +554,7 @@ type EditMonitorParamObject struct {
554 554
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555 555
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
556 556
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
557
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
557 558
 }
558 559
 
559 560
 // /api/dislysis/monitor/edit [post]
@@ -675,6 +676,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
675 676
 			BloodMonitor:                monitorParam.BloodMonitor,
676 677
 			HeparinAmount:               monitorParam.HeparinAmount,
677 678
 			Dehydration:                 monitorParam.Dehydration,
679
+			FilterPressure:              monitorParam.FilterPressure,
678 680
 		}
679 681
 		createErr := service.CreateMonitor(&monitor)
680 682
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
@@ -759,6 +761,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
759 761
 		monitor.BloodMonitor = monitorParam.BloodMonitor
760 762
 		monitor.HeparinAmount = monitorParam.HeparinAmount
761 763
 		monitor.Dehydration = monitorParam.Dehydration
764
+		monitor.FilterPressure = monitorParam.FilterPressure
762 765
 		updateErr := service.UpdateMonitor(monitor)
763 766
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
764 767
 		redis := service.RedisClient()
@@ -1184,7 +1187,7 @@ func (this *DialysisRecordAPIController) StartDialysis() {
1184 1187
 			}
1185 1188
 
1186 1189
 			//针对蓬安济民
1187
-			if adminUserInfo.CurrentOrgId == 9829 {
1190
+			if adminUserInfo.CurrentOrgId == 9829 || adminUserInfo.CurrentOrgId == 10440 {
1188 1191
 				record.Temperature = 36.5
1189 1192
 				record.PulseFrequency = 80
1190 1193
 			}

+ 43 - 35
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

@@ -786,30 +786,30 @@ func (c *DialysisAPIController) PostDoubleCheck() {
786 786
 		firstCheckDate = firstCheckDateUnix.Unix()
787 787
 	}
788 788
 
789
-	if adminUserInfo.Org.Id == 10340 {
790
-
791
-		list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
792
-		_, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
793
-		if check.ID == 0 {
794
-			if employee_number != list.JobNumber {
795
-				c.ServeSuccessJSON(map[string]interface{}{
796
-					"doubleCheck": check,
797
-					"msg":         "2",
798
-				})
799
-				return
800
-			}
801
-		}
802
-		if check.ID > 0 {
803
-			if employee_number != list.JobNumber {
804
-				c.ServeSuccessJSON(map[string]interface{}{
805
-					"doubleCheck": check,
806
-					"msg":         "2",
807
-				})
808
-				return
809
-			}
810
-		}
811
-
812
-	}
789
+	//if adminUserInfo.Org.Id == 10340 {
790
+	//
791
+	//	list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
792
+	//	_, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
793
+	//	if check.ID == 0 {
794
+	//		if employee_number != list.JobNumber {
795
+	//			c.ServeSuccessJSON(map[string]interface{}{
796
+	//				"doubleCheck": check,
797
+	//				"msg":         "2",
798
+	//			})
799
+	//			return
800
+	//		}
801
+	//	}
802
+	//	if check.ID > 0 {
803
+	//		if employee_number != list.JobNumber {
804
+	//			c.ServeSuccessJSON(map[string]interface{}{
805
+	//				"doubleCheck": check,
806
+	//				"msg":         "2",
807
+	//			})
808
+	//			return
809
+	//		}
810
+	//	}
811
+	//
812
+	//}
813 813
 
814 814
 	doubleCheck := models.DoubleCheck{
815 815
 		UserOrgId:                  adminUserInfo.Org.Id,
@@ -836,13 +836,14 @@ func (c *DialysisAPIController) PostDoubleCheck() {
836 836
 		doubleCheck.CheckTime = checkDate
837 837
 		doubleCheck.Creater = creater
838 838
 		doubleCheck.Modifier = modifier
839
-
839
+		if adminUserInfo.Org.Id == 10340 {
840
+			order, _ := service.GetDialysisOrder(recordDate.Unix(), id, adminUserInfo.Org.Id)
841
+			doubleCheck.Creater = order.StartNurse
842
+		}
840 843
 		err := service.AddSigleDoubleCheck(&doubleCheck)
841 844
 
842 845
 		//针对长沙南雅
843 846
 		if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
844
-			fmt.Println("-----------------------", adminUserInfo.Org.Id)
845
-			fmt.Println("modifier----------------", modifier)
846 847
 			//查询未核对的医嘱
847 848
 			doctorList, _ := service.GetDoctorAdviceCheckList(id, recordDate.Unix(), adminUserInfo.Org.Id)
848 849
 			if len(doctorList) > 0 && modifier > 0 {
@@ -1461,7 +1462,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1461 1462
 	start_sodium := c.GetString("start_sodium")
1462 1463
 	sodium_curve := c.GetString("sodium_curve")
1463 1464
 	treatment_remark := c.GetString("treatment_remark")
1464
-
1465
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
1466
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
1465 1467
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1466 1468
 
1467 1469
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
@@ -1592,6 +1594,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1592 1594
 		SodiumCurve:                sodium_curve,
1593 1595
 		TreatmentRemark:            treatment_remark,
1594 1596
 		PrescriptionSodium:         prescription_sodium,
1597
+		DialysisFluidFlow:          dialysis_fluid_flow,
1598
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1595 1599
 	}
1596 1600
 
1597 1601
 	//查询最近透析准备表里是否存在 透析器 灌流器
@@ -1697,7 +1701,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1697 1701
 				AdviceName:            "",                            // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
1698 1702
 				AdviceDesc:            "",
1699 1703
 				ReminderDate:          0,
1700
-				SingleDose:            5000,
1704
+				SingleDose:            anticoagulant_zongliang,
1701 1705
 				SingleDoseUnit:        "iu",
1702 1706
 				DrugSpec:              0,
1703 1707
 				DrugSpecUnit:          "",
@@ -1776,7 +1780,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1776 1780
 				advice.AdviceName = "低分子肝素钠注射液"
1777 1781
 				// 修改患者临时医嘱里的抗凝剂医嘱
1778 1782
 				advice.ID = advicePrescription.ID
1779
-				service.UpdateDoctorAdvice(&advice)
1783
+				service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
1780 1784
 			} else {
1781 1785
 				if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
1782 1786
 					advice.AdviceName = "低分子肝素钠注射液"
@@ -1893,7 +1897,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1893 1897
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
1894 1898
 			if advicePrescription.ID > 0 {
1895 1899
 
1896
-				service.UpdateDoctorAdvieById(advicePrescription.ID, prescribing_number)
1900
+				service.UpdateDoctorAdvieByIdOne(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
1897 1901
 
1898 1902
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
1899 1903
 				redis := service.RedisClient()
@@ -3008,6 +3012,8 @@ func (c *DialysisAPIController) PostSolution() {
3008 3012
 	dry_water_hour := c.GetString("dry_water_hour")
3009 3013
 	water_machine := c.GetString("water_machine")
3010 3014
 	dialysis_remark := c.GetString("dialysis_remark")
3015
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
3016
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
3011 3017
 	if mode_id > 0 {
3012 3018
 
3013 3019
 		var str string
@@ -3136,6 +3142,8 @@ func (c *DialysisAPIController) PostSolution() {
3136 3142
 		StartSodium:                start_sodium,
3137 3143
 		SodiumCurve:                sodium_curve,
3138 3144
 		TreatmentRemark:            treatment_remark,
3145
+		DialysisFluidFlow:          dialysis_fluid_flow,
3146
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3139 3147
 	}
3140 3148
 
3141 3149
 	_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
@@ -3240,6 +3248,8 @@ func (c *DialysisAPIController) PostSolution() {
3240 3248
 		StartSodium:                start_sodium,
3241 3249
 		SodiumCurve:                sodium_curve,
3242 3250
 		TreatmentRemark:            treatment_remark,
3251
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3252
+		DialysisFluidFlow:          dialysis_fluid_flow,
3243 3253
 	}
3244 3254
 
3245 3255
 	//针对河间咸的
@@ -3278,7 +3288,7 @@ func (c *DialysisAPIController) PostSolution() {
3278 3288
 			AdviceName:            "",                            // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
3279 3289
 			AdviceDesc:            "",
3280 3290
 			ReminderDate:          0,
3281
-			SingleDose:            5000,
3291
+			SingleDose:            prescription.AnticoagulantZongliang,
3282 3292
 			SingleDoseUnit:        "iu",
3283 3293
 			DrugSpec:              0,
3284 3294
 			DrugSpecUnit:          "",
@@ -3358,7 +3368,7 @@ func (c *DialysisAPIController) PostSolution() {
3358 3368
 			advice.AdviceName = "低分子肝素钠注射液"
3359 3369
 			// 修改患者临时医嘱里的抗凝剂医嘱
3360 3370
 			advice.ID = advicePrescription.ID
3361
-			service.UpdateDoctorAdvice(&advice)
3371
+			service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
3362 3372
 		} else {
3363 3373
 			if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
3364 3374
 				advice.AdviceName = "低分子肝素钠注射液"
@@ -6349,7 +6359,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
6349 6359
 	for _, item := range beforePrepares {
6350 6360
 		storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
6351 6361
 		warehouse, _ := service.FindFirstWarehousingInfoByStockTwo(item.GoodId, item.GoodTypeId, storeConfig.StorehouseOutInfo)
6352
-
6353 6362
 		if item.Count > warehouse.Count {
6354 6363
 			goodObj, _ := service.GetGoodInformationByGoodId(item.GoodId)
6355 6364
 			c.ServeSuccessJSON(map[string]interface{}{
@@ -6359,7 +6368,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
6359 6368
 			})
6360 6369
 			return
6361 6370
 		}
6362
-
6363 6371
 	}
6364 6372
 
6365 6373
 	//出库逻辑

+ 4 - 1
controllers/mobile_api_controllers/dialysis_api_controller_extend.go 查看文件

@@ -105,6 +105,7 @@ func (this *DialysisAPIController) AddMonitorRecord() {
105 105
 	blood_thickness, _ := this.GetFloat("blood_thickness")
106 106
 	blood_monitor, _ := this.GetFloat("blood_monitor")
107 107
 	dehydration, _ := this.GetFloat("dehydration")
108
+	filter_pressure := this.GetString("filter_pressure")
108 109
 	adminInfo := this.GetMobileAdminUserInfo()
109 110
 	patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
110 111
 	if getPatientErr != nil {
@@ -170,6 +171,7 @@ func (this *DialysisAPIController) AddMonitorRecord() {
170 171
 		BloodMonitor:                blood_monitor,
171 172
 		HeparinAmount:               heparin_amount,
172 173
 		Dehydration:                 dehydration,
174
+		FilterPressure:              filter_pressure,
173 175
 	}
174 176
 
175 177
 	err := service.CreateMonitor(&record)
@@ -283,7 +285,7 @@ func (this *DialysisAPIController) EditMonitorRecord() {
283 285
 	blood_monitor, _ := this.GetFloat("blood_monitor")
284 286
 	heparin_amount, _ := this.GetFloat("heparin_amount")
285 287
 	dehydration, _ := this.GetFloat("dehydration")
286
-	fmt.Println("id232323233232233223232332233223", id)
288
+	filter_pressure := this.GetString("filter_pressure")
287 289
 	monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
288 290
 	if err != nil {
289 291
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
@@ -342,6 +344,7 @@ func (this *DialysisAPIController) EditMonitorRecord() {
342 344
 	monitor.BloodTemperature = blood_temperature
343 345
 	monitor.HeparinAmount = heparin_amount
344 346
 	monitor.Dehydration = dehydration
347
+	monitor.FilterPressure = filter_pressure
345 348
 	err = service.UpdateMonitor(monitor)
346 349
 	key := strconv.FormatInt(adminInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(date, 10) + ":monitor_records"
347 350
 	redis := service.RedisClient()

+ 14 - 7
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

@@ -546,6 +546,7 @@ func (c *PatientApiController) DeleteDoctorAdvice() {
546 546
 }
547 547
 
548 548
 func (c *PatientApiController) ExecDoctorAdvice() {
549
+
549 550
 	execution_time := c.GetString("execution_time")
550 551
 
551 552
 	origin, _ := c.GetInt64("origin", 0)
@@ -1097,6 +1098,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
1097 1098
 
1098 1099
 			//药品管理信息
1099 1100
 			_, drugStockConfig := service.FindDrugStockAutomaticReduceRecordByOrgId(adminInfo.Org.Id)
1101
+
1100 1102
 			storeHouseConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
1101 1103
 			if drugStockConfig.IsOpen == 1 {
1102 1104
 				for _, item := range advices {
@@ -1145,6 +1147,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
1145 1147
 					var prescribing_number_total int64
1146 1148
 
1147 1149
 					config, _ := service.GetDrugOpenConfigOne(adminInfo.Org.Id)
1150
+
1148 1151
 					if config.IsOpen != 1 {
1149 1152
 						//查询该药品是否有库存
1150 1153
 						houseConfig, _ := service.GetAllStoreHouseConfig(advice.UserOrgId)
@@ -1198,6 +1201,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
1198 1201
 
1199 1202
 						if prescribing_number_total <= total {
1200 1203
 							pharmacyConfig, _ := service.FindPharmacyConfig(advice.UserOrgId)
1204
+
1201 1205
 							if medical.IsUse == 2 {
1202 1206
 
1203 1207
 								if config.IsOpen != 1 {
@@ -1265,7 +1269,8 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1265 1269
 	execution_time := c.GetString("execution_time")
1266 1270
 	fmt.Println("execution_time", execution_time)
1267 1271
 	groupno, _ := c.GetInt64("groupno", -1)
1268
-
1272
+	//patient_id, _ := c.GetInt64("patient_id")
1273
+	advice_date, _ := c.GetInt64("advice_date")
1269 1274
 	var ids []string
1270 1275
 	if groupno == 0 {
1271 1276
 		advice_ids := c.GetString("advice_id")
@@ -1339,7 +1344,7 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1339 1344
 		err = service.ModifyExceDoctorAdviceByGroupNo(&advices, groupno, adminUserInfo.Org.Id)
1340 1345
 		redis := service.RedisClient()
1341 1346
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1342
-		fmt.Println("keyThh322323232323232323223", key)
1347
+
1343 1348
 		redis.Set(key, "", time.Second)
1344 1349
 		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
1345 1350
 		redis.Set(keyOne, "", time.Second)
@@ -1348,12 +1353,13 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1348 1353
 
1349 1354
 	} else {
1350 1355
 		err = service.BatchModifyExceOldDoctorAdvice(&advices, ids)
1351
-		err = service.ModifyExceDoctorAdviceByGroupNo(&advices, groupno, adminUserInfo.Org.Id)
1356
+
1357
+		err = service.ModifyExceDoctorAdviceByGroupNoOne(&advices, ids)
1352 1358
 		redis := service.RedisClient()
1353 1359
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1354
-		fmt.Println("keyTwohh322323232323232323223", key)
1360
+
1355 1361
 		redis.Set(key, "", time.Second)
1356
-		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
1362
+		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice_date, 10) + ":advice_list_all"
1357 1363
 		redis.Set(keyOne, "", time.Second)
1358 1364
 
1359 1365
 		defer redis.Close()
@@ -1367,7 +1373,6 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1367 1373
 			ExecutionTime: theTime.Unix(),
1368 1374
 			UpdatedTime:   time.Now().Unix(),
1369 1375
 		}
1370
-		fmt.Println("ids2323232232323", ids)
1371 1376
 		var advicehis models.HisDoctorAdviceInfo
1372 1377
 		service.ModifyExceDoctorAdviceById(&advicesinfo, ids)
1373 1378
 		his_advices, _ := service.FindHisDoctorAdviceByIdOne(adminUserInfo.Org.Id, ids)
@@ -3826,7 +3831,9 @@ func (c *PatientApiController) CreateGroupAdvice() {
3826 3831
 		advice.IsSettle = 2
3827 3832
 
3828 3833
 		if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 9671 {
3829
-
3834
+			if advice.PrescribingNumber == 0 {
3835
+				advice.PrescribingNumber = 1
3836
+			}
3830 3837
 			//查询该患者今日有没有双人核对
3831 3838
 			check, _ := service.MobileGetDoubleCheckSix(adminUserInfo.Org.Id, patientInfo.ID, advice.AdviceDate)
3832 3839
 

+ 2 - 0
models/dialysis.go 查看文件

@@ -759,6 +759,7 @@ type MonitoringRecord struct {
759 759
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
760 760
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
761 761
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
762
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
762 763
 }
763 764
 
764 765
 func (MonitoringRecord) TableName() string {
@@ -1101,6 +1102,7 @@ type DialysisBeforePrepareGoods struct {
1101 1102
 	StorehouseId      int64  `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
1102 1103
 	PatientId         int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
1103 1104
 	OrderId           int64  `gorm:"column:order_id" json:"order_id" form:"order_id"`
1105
+	NewCount          int64  `gorm:"column:new_count" json:"new_count" form:"new_count"`
1104 1106
 }
1105 1107
 
1106 1108
 type NewDialysisBeforePrepareGoods struct {

+ 4 - 0
models/patient_models.go 查看文件

@@ -362,6 +362,8 @@ type DialysisPrescription struct {
362 362
 	PrescriptionSodium         string        `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
363 363
 	StartSodium                string        `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
364 364
 	SodiumCurve                string        `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
365
+	DialysisFluidFlow          string        `gorm:"column:dialysis_fluid_flow" json:"dialysis_fluid_flow" form:"dialysis_fluid_flow"`
366
+	SodiumBicarbonateFlow      string        `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
365 367
 }
366 368
 
367 369
 func (DialysisPrescription) TableName() string {
@@ -574,6 +576,8 @@ type DialysisSolution struct {
574 576
 	PrescriptionSodium         string  `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
575 577
 	StartSodium                string  `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
576 578
 	SodiumCurve                string  `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
579
+	DialysisFluidFlow          string  `gorm:"column:dialysis_fluid_flow" json:"dialysis_fluid_flow" form:"dialysis_fluid_flow"`
580
+	SodiumBicarbonateFlow      string  `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
577 581
 }
578 582
 
579 583
 func (DialysisSolution) TableName() string {

+ 21 - 1
service/dialysis_service.go 查看文件

@@ -1137,6 +1137,19 @@ func ModifyExceDoctorAdviceByGroupNo(m *models.DoctorAdvice, groupNo int64, org_
1137 1137
 	return err
1138 1138
 }
1139 1139
 
1140
+func ModifyExceDoctorAdviceByGroupNoOne(m *models.DoctorAdvice, ids []string) (err error) {
1141
+	ut := writeDb.Begin()
1142
+	err = ut.Model(&models.DoctorAdvice{}).Where("id in(?) and status =1", ids).Updates(map[string]interface{}{"execution_time": m.ExecutionTime}).Error
1143
+	if err != nil {
1144
+		ut.Rollback()
1145
+		return
1146
+	}
1147
+	ut.Commit()
1148
+
1149
+	return err
1150
+
1151
+}
1152
+
1140 1153
 func BatchModifyExceOldDoctorAdvice(m *models.DoctorAdvice, ids []string) (err error) {
1141 1154
 
1142 1155
 	ut := writeDb.Begin()
@@ -2039,6 +2052,13 @@ func GetLastOrder(user_org_id int64, patient_id int64, dialysis_date int64) (mod
2039 2052
 	return twenty, err
2040 2053
 }
2041 2054
 
2055
+func UpdateDoctorSix(start_time int64, patient_id int64, dialysis_date int64, user_org_id int64) (models.DoctorAdvice, error) {
2056
+
2057
+	advice := models.DoctorAdvice{}
2058
+	err := XTWriteDB().Model(&advice).Where("patient_id = ? and advice_date=? and user_org_id =? and status=1 and advice_name ='低分子肝素钠注射液'", patient_id, dialysis_date, user_org_id).Updates(map[string]interface{}{"execution_time": start_time}).Error
2059
+	return advice, err
2060
+}
2061
+
2042 2062
 func GetTodayInforMation(orgid int64, record_date int64) (list []*NewDeviceInformation, err error) {
2043 2063
 
2044 2064
 	err = UserReadDB().Where("user_org_id = ? and date = ? and status = 1", orgid, record_date).Find(&list).Error
@@ -2054,7 +2074,7 @@ func GetFiledConfig(orgid int64) (models.FiledConfig, error) {
2054 2074
 
2055 2075
 func GetDoctorAdviceCheckList(patient_id int64, advice_date int64, user_org_id int64) (doctor []*models.DoctorAdvice, err error) {
2056 2076
 
2057
-	err = XTReadDB().Where("patient_id = ? and advice_date = ? and user_org_id =? and status= 1 and check_state= 0", patient_id, advice_date, user_org_id).Find(&doctor).Error
2077
+	err = XTReadDB().Where("patient_id = ? and advice_date = ? and user_org_id =? and status= 1 and checker= 0", patient_id, advice_date, user_org_id).Find(&doctor).Error
2058 2078
 	return doctor, err
2059 2079
 }
2060 2080
 

+ 1 - 1
service/gobal_config_service.go 查看文件

@@ -1037,7 +1037,7 @@ func GetScheduleConfigById(id int64) (config models.ScheduleConfig, err error) {
1037 1037
 
1038 1038
 func GetMobileScheduleList(orgid int64) (schedule []*models.MyVmBloodSchedule, err error) {
1039 1039
 
1040
-	err = XTReadDB().Where("user_org_id = ? and status= 1 and schedule_date>=1667232000 and schedule_date<=1669737600", orgid).Preload("SchedualPatient", "user_org_id = ? and status = 1", orgid).Find(&schedule).Error
1040
+	err = XTReadDB().Where("user_org_id = ? and status= 1 and schedule_date=1676563200", orgid).Preload("SchedualPatient", "user_org_id = ? and status = 1", orgid).Find(&schedule).Error
1041 1041
 	return schedule, err
1042 1042
 }
1043 1043
 

+ 7 - 0
service/inspection_service.go 查看文件

@@ -46,6 +46,13 @@ func UpdateDoctorAdvieById(id int64, prescription_number float64) (models.Doctor
46 46
 	return advice, err
47 47
 }
48 48
 
49
+func UpdateDoctorAdvieByIdOne(id int64, prescription_number float64, single_dose float64) (models.DoctorAdvice, error) {
50
+
51
+	advice := models.DoctorAdvice{}
52
+	err := XTWriteDB().Model(&advice).Where("id=? and status= 1 ", id).Updates(map[string]interface{}{"prescribing_number": prescription_number, "single_dose": single_dose}).Error
53
+	return advice, err
54
+}
55
+
49 56
 func CreatePatientInspection(inspectins []models.Inspection) (err error) {
50 57
 	if len(inspectins) == 0 {
51 58
 		err = errors.New("Inspections Cant be nil.")

+ 2 - 2
service/mobile_dialysis_service.go 查看文件

@@ -796,9 +796,9 @@ func MobileGetDoctorAdvicesByGroups(orgID int64, patientID int64, recordDate int
796 796
 	// cur_date := time.Now().Format("2006-01-02")
797 797
 	key := strconv.FormatInt(orgID, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate, 10) + ":doctor_advices"
798 798
 	//fmt.Println("key23233232323323wi", key)
799
+	redis.Set(key, "", time.Second)
799 800
 	doctor_advices_str, _ := redis.Get(key).Result()
800
-	redis.Set(doctor_advices_str, "", time.Second)
801
-	redis.Set(doctor_advices_str, "", time.Second)
801
+
802 802
 	if len(doctor_advices_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
803 803
 
804 804
 		err := readDb.Model(&models.DoctorAdvice{}).

+ 6 - 0
service/patient_service.go 查看文件

@@ -994,6 +994,12 @@ func FindPatientLastDryWeightAdjust(orgID int64, id int64) (weight models.DryWei
994 994
 	return
995 995
 }
996 996
 
997
+func UpdateDoctorAdviceById(id int64, prescribing_number float64, single_dose float64) error {
998
+
999
+	err := XTWriteDB().Model(&models.DoctorAdvice{}).Where("id=? and status =1", id).Updates(map[string]interface{}{"prescribing_number": prescribing_number, "single_dose": single_dose}).Error
1000
+	return err
1001
+}
1002
+
997 1003
 func CreateDoctorAdvice(m *models.DoctorAdvice) (err error) {
998 1004
 	return writeDb.Create(m).Error
999 1005
 }

+ 5 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go 查看文件

@@ -103,6 +103,7 @@ type DialysisOrderVM struct {
103 103
 	SchedualType   int64           `gorm:"column:schedual_type" json:"schedual_type"`
104 104
 	WashpipeNurse  int64           `gorm:"column:washpipe_nurse" json:"washpipe_nurse" form:"washpipe_nurse"`
105 105
 	UserOrgId      int64           `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
106
+	QualityNurseId int64           `gorm:"column:quality_nurse_id" json:"quality_nurse_id" form:"quality_nurse_id"`
106 107
 }
107 108
 
108 109
 func (DialysisOrderVM) TableName() string {
@@ -216,6 +217,9 @@ type PrescriptionVM struct {
216 217
 	OxygenFlow                 string  `gorm:"column:oxygen_flow" json:"oxygen_flow" form:"oxygen_flow"`
217 218
 	OxygenTime                 string  `gorm:"column:oxygen_time" json:"oxygen_time" form:"oxygen_time"`
218 219
 	DialysisRemark             string  `gorm:"column:dialysis_remark" json:"dialysis_remark" form:"dialysis_remark"`
220
+	DialysisFluidFlow          string  `gorm:"column:dialysis_fluid_flow" json:"dialysis_fluid_flow" form:"dialysis_fluid_flow"`
221
+	SodiumBicarbonateFlow      string  `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
222
+	DisplaceSpeed              string  `gorm:"column:displace_speed" json:"displace_speed" form:"displace_speed"`
219 223
 }
220 224
 
221 225
 func (PrescriptionVM) TableName() string {
@@ -554,6 +558,7 @@ type MonitoringRecordVM struct {
554 558
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555 559
 	BloodPressureMonitoringSite int64   `gorm:"column:blood_pressure_monitoring_site" json:"blood_pressure_monitoring_site" form:"blood_pressure_monitoring_site"`
556 560
 	UserOrgId                   int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
561
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
557 562
 }
558 563
 
559 564
 func (MonitoringRecordVM) TableName() string {

+ 1 - 1
service/warhouse_service.go 查看文件

@@ -7445,7 +7445,7 @@ func ConsumablesDeliveryTotal(orgID int64, patient_id int64, record_time int64,
7445 7445
 		}
7446 7446
 
7447 7447
 	}
7448
-	fmt.Println("goods_yc2323323223323223232323232332wode", goods_yc)
7448
+
7449 7449
 	if len(goods_yc) > 0 {
7450 7450
 		for _, good_yc := range goods_yc {
7451 7451
 			out, _ := FindStockOutByIsSys(orgID, 1, record_time)