瀏覽代碼

历史排班

28169 10 月之前
父節點
當前提交
b994686a1e

+ 15 - 4
controllers/dialysis_api_controller.go 查看文件

@@ -2668,6 +2668,9 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2668 2668
 				newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
2669 2669
 				newprescribe.Status = 1
2670 2670
 
2671
+				if adminUserInfo.CurrentOrgId == 10579 {
2672
+					newprescribe.Modifier = 0
2673
+				}
2671 2674
 				err := service.AddSigleRecord(&newprescribe)
2672 2675
 
2673 2676
 				//记录日志
@@ -2743,7 +2746,9 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2743 2746
 					newprescribe.Creater = adminUserInfo.AdminUser.Id
2744 2747
 					newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2745 2748
 					newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
2746
-
2749
+					if adminUserInfo.CurrentOrgId == 10579 {
2750
+						newprescribe.Modifier = 0
2751
+					}
2747 2752
 					err := service.AddSigleRecord(&newprescribe)
2748 2753
 					//记录日志
2749 2754
 					byterequest, _ := json.Marshal(newprescribe)
@@ -2786,7 +2791,9 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2786 2791
 					newprescribe.Creater = adminUserInfo.AdminUser.Id
2787 2792
 					newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2788 2793
 					newprescribe.Modifier = adminUserInfo.AdminUser.Id
2789
-
2794
+					if adminUserInfo.CurrentOrgId == 10579 {
2795
+						newprescribe.Modifier = 0
2796
+					}
2790 2797
 					err := service.AddSigleRecord(&newprescribe)
2791 2798
 					//记录日志
2792 2799
 					byterequest, _ := json.Marshal(newprescribe)
@@ -2975,7 +2982,9 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2975 2982
 			newprescribe.TargetUltrafiltration = dewater_amount
2976 2983
 			newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
2977 2984
 			newprescribe.Status = 1
2978
-
2985
+			if adminUserInfo.CurrentOrgId == 10579 {
2986
+				newprescribe.Modifier = 0
2987
+			}
2979 2988
 			err := service.AddSigleRecord(&newprescribe)
2980 2989
 			//记录日志
2981 2990
 			byterequest, _ := json.Marshal(newprescribe)
@@ -3048,7 +3057,9 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
3048 3057
 				newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
3049 3058
 				newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
3050 3059
 				newprescribe.Status = 1
3051
-
3060
+				if adminUserInfo.CurrentOrgId == 10579 {
3061
+					newprescribe.Modifier = 0
3062
+				}
3052 3063
 				err := service.AddSigleRecord(&newprescribe)
3053 3064
 				//记录日志
3054 3065
 				byterequest, _ := json.Marshal(newprescribe)

+ 15 - 12
controllers/his_api_controller.go 查看文件

@@ -211,22 +211,25 @@ func (c *HisApiController) GetFaPiaoNumber() {
211 211
 	fmt.Println(count)
212 212
 	var zero string
213 213
 	number := count + 1
214
-	if number >= 1000 {
215
-		zero = "0000" + strconv.FormatInt(number, 10)
216
-	} else if number >= 10000 {
217
-		zero = "000" + strconv.FormatInt(number, 10)
218
-	} else if number >= 100000 {
219
-		zero = "00" + strconv.FormatInt(number, 10)
220
-	} else if number >= 1000000 {
221
-		zero = "0" + strconv.FormatInt(number, 10)
222
-	} else {
223
-		zero = strconv.FormatInt(number, 10)
224
-	}
214
+
215
+	//if number >= 1000 {
216
+	//        zero = "0000" + strconv.FormatInt(number, 10)
217
+	//} else if number >= 10000 {
218
+	//        zero = "000" + strconv.FormatInt(number, 10)
219
+	//} else if number >= 100000 {
220
+	//        zero = "00" + strconv.FormatInt(number, 10)
221
+	//} else if number >= 1000000 {
222
+	//        zero = "0" + strconv.FormatInt(number, 10)
223
+	//} else {
224
+	zero = "0" + strconv.FormatInt(number, 10)
225
+	//}
226
+
225 227
 	c.ServeSuccessJSON(map[string]interface{}{
226 228
 		"fapiao_number": zero,
227 229
 	})
228 230
 	return
229 231
 }
232
+
230 233
 func (c *HisApiController) ChangeOrderDesc() {
231 234
 	id, _ := c.GetInt64("id")
232 235
 	desc := c.GetString("desc")
@@ -3172,7 +3175,7 @@ func (c *HisApiController) CreateHisPrescription() {
3172 3175
 	var adviceList []models.HisDoctorAdviceInfo
3173 3176
 	var projectList []models.HisPrescriptionProject
3174 3177
 
3175
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 9504 {
3178
+	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10598 {
3176 3179
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3177 3180
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3178 3181
 

+ 23 - 6
controllers/his_export_data_controller.go 查看文件

@@ -113,6 +113,10 @@ func (c *HisExportDataController) GetExportSettleData() {
113 113
 	var treatCostSelfTotal float64 = 0     //治疗费用
114 114
 	var treatCostPartSelfTotal float64 = 0 //治疗费用
115 115
 
116
+	var hiliCostTotal float64 = 0         //护理费
117
+	var hiliCostSelfTotal float64 = 0     //护理费
118
+	var hiliCostPartSelfTotal float64 = 0 //护理费
119
+
116 120
 	decimal.DivisionPrecision = 2
117 121
 
118 122
 	for _, item := range orderInfos {
@@ -122,6 +126,14 @@ func (c *HisExportDataController) GetExportSettleData() {
122 126
 			bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
123 127
 		}
124 128
 
129
+		if item.MedChrgitmType == "07" { //床位费
130
+			hiliCostTotal, _ = decimal.NewFromFloat(hiliCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
131
+			hiliCostSelfTotal, _ = decimal.NewFromFloat(hiliCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
132
+			hiliCostPartSelfTotal, _ = decimal.NewFromFloat(hiliCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
133
+
134
+			//hiliCostSelfTotal = hiliCostTotal
135
+		}
136
+
125 137
 		if c.GetAdminUserInfo().CurrentOrgId == 10188 || c.GetAdminUserInfo().CurrentOrgId == 10217 {
126 138
 			if item.MedChrgitmType == "03" { //检查费
127 139
 				laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
@@ -217,12 +229,17 @@ func (c *HisExportDataController) GetExportSettleData() {
217 229
 		"treatCostTotal":                              treatCostTotal,
218 230
 		"treatCostSelfTotal":                          treatCostSelfTotal,
219 231
 		"treatCostPartSelfTotal":                      treatCostPartSelfTotal,
220
-		"patient":                                     patient,
221
-		"org_name":                                    miConfig.OrgName,
222
-		"org_code":                                    miConfig.Code,
223
-		"num":                                         len(orders),
224
-		"f_time":                                      strings.Split(orders[0].SetlTime, " ")[0],
225
-		"l_time":                                      strings.Split(orders[len(orders)-1].SetlTime, " ")[0],
232
+
233
+		"hiliCostTotal":         hiliCostTotal,
234
+		"hiliCostSelfTotal":     hiliCostSelfTotal,
235
+		"hiliCostPartSelfTotal": hiliCostPartSelfTotal,
236
+
237
+		"patient":  patient,
238
+		"org_name": miConfig.OrgName,
239
+		"org_code": miConfig.Code,
240
+		"num":      len(orders),
241
+		"f_time":   strings.Split(orders[0].SetlTime, " ")[0],
242
+		"l_time":   strings.Split(orders[len(orders)-1].SetlTime, " ")[0],
226 243
 	})
227 244
 
228 245
 }

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

@@ -3404,7 +3404,7 @@ func (this *DialysisAPIController) StartDialysis() {
3404 3404
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3405 3405
 			}
3406 3406
 
3407
-			if adminUserInfo.Org.Id == 10597 { //adminUserInfo.Org.Id == 9538
3407
+			if adminUserInfo.Org.Id == 10597 || adminUserInfo.Org.Id == 10679 { //adminUserInfo.Org.Id == 9538
3408 3408
 				ultrafiltration_rate = math.Floor(prescription.PrescriptionWater / float64(totalMin) * 60 * 1000)
3409 3409
 			}
3410 3410
 
@@ -4443,7 +4443,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4443 4443
 
4444 4444
 			}
4445 4445
 
4446
-			if adminInfo.Org.Id == 10597 {
4446
+			if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10679 {
4447 4447
 				ultrafiltration_rate = math.Floor(prescription.PrescriptionWater / float64(totalMin) * 60 * 1000)
4448 4448
 				record.UltrafiltrationRate = ultrafiltration_rate
4449 4449
 			}
@@ -4519,7 +4519,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4519 4519
 				record.UltrafiltrationRate = ultrafiltration_rate / 1000
4520 4520
 			}
4521 4521
 
4522
-			if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10599 {
4522
+			if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10599 || adminInfo.Org.Id == 10679 {
4523 4523
 				record.UltrafiltrationRate = 0
4524 4524
 			}
4525 4525
 			//if template.TemplateId == 47 {
@@ -4547,7 +4547,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4547 4547
 		}
4548 4548
 	}
4549 4549
 
4550
-	if adminInfo.Org.Id == 10597 {
4550
+	if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10679 {
4551 4551
 		ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
4552 4552
 		record.UltrafiltrationVolume = ultrafiltration_volume
4553 4553
 	}
@@ -5602,7 +5602,7 @@ func (c *DialysisAPIController) CreateRemindDoctorAdvice() {
5602 5602
 			service.CreateDialysisFinish(finish)
5603 5603
 		}
5604 5604
 
5605
-		if adminUserInfo.Org.Id == 10597 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10164 || adminUserInfo.Org.Id == 9671 {
5605
+		if adminUserInfo.Org.Id == 10597 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10164 {
5606 5606
 			list, err := service.CreateMGroupAdviceOne(adminUserInfo.Org.Id, advices, groupNo)
5607 5607
 			for _, item := range advices {
5608 5608
 				byterequest, _ := json.Marshal(item)

+ 25 - 5
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

@@ -2722,13 +2722,16 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2722 2722
 		newprescribe.ID = dialysisPrescription.ID
2723 2723
 
2724 2724
 		if dialysisPrescription.ID == 0 {
2725
-			if adminUserInfo.Org.Id == 10340 {
2725
+			if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10679 {
2726 2726
 				newprescribe.Sodium = 138
2727 2727
 				newprescribe.Bicarbonate = 31.1
2728 2728
 				newprescribe.DialysateFlow = 500
2729 2729
 				newprescribe.PrescribingNumber = 1
2730 2730
 
2731 2731
 			}
2732
+			if adminUserInfo.Org.Id == 10579 {
2733
+				newprescribe.Modifier = 0
2734
+			}
2732 2735
 			err := service.AddSigleRecord(&newprescribe)
2733 2736
 			//记录日志
2734 2737
 			byterequest, _ := json.Marshal(newprescribe)
@@ -2887,11 +2890,14 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2887 2890
 			_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
2888 2891
 			newprescribe.ID = dialysisPrescription.ID
2889 2892
 			if dialysisPrescription.ID == 0 {
2890
-				if adminUserInfo.Org.Id == 10340 {
2893
+				if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10679 {
2891 2894
 					newprescribe.Sodium = 138
2892 2895
 					newprescribe.Bicarbonate = 31.1
2893 2896
 					newprescribe.DialysateFlow = 500
2894 2897
 				}
2898
+				if adminUserInfo.Org.Id == 10579 {
2899
+					newprescribe.Modifier = 0
2900
+				}
2895 2901
 				err := service.AddSigleRecord(&newprescribe)
2896 2902
 
2897 2903
 				//记录日志
@@ -2937,7 +2943,12 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2937 2943
 				appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
2938 2944
 				//
2939 2945
 				if appRole.UserType == 2 || appRole.UserType == 1 {
2940
-					newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2946
+					if adminUserInfo.Org.Id == 10579 {
2947
+						newprescribe.Modifier = 0
2948
+					} else {
2949
+						newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
2950
+					}
2951
+
2941 2952
 					if adminUserInfo.Org.Id == 9882 {
2942 2953
 						newprescribe.Creater = adminUserInfo.AdminUser.Id
2943 2954
 					}
@@ -3042,11 +3053,14 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
3042 3053
 			_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
3043 3054
 			newprescribe.ID = dialysisPrescription.ID
3044 3055
 			if dialysisPrescription.ID == 0 {
3045
-				if adminUserInfo.Org.Id == 10340 {
3056
+				if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10679 {
3046 3057
 					newprescribe.Sodium = 138
3047 3058
 					newprescribe.Bicarbonate = 31.1
3048 3059
 					newprescribe.DialysateFlow = 500
3049 3060
 				}
3061
+				if adminUserInfo.Org.Id == 10579 {
3062
+					newprescribe.Modifier = 0
3063
+				}
3050 3064
 				err := service.AddSigleRecord(&newprescribe)
3051 3065
 				//记录日志
3052 3066
 				byterequest, _ := json.Marshal(newprescribe)
@@ -3162,11 +3176,14 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
3162 3176
 			}
3163 3177
 
3164 3178
 			if dialysisPrescription.ID == 0 {
3165
-				if adminUserInfo.Org.Id == 10340 {
3179
+				if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10679 {
3166 3180
 					newprescribe.Sodium = 138
3167 3181
 					newprescribe.Bicarbonate = 31.1
3168 3182
 					newprescribe.DialysateFlow = 500
3169 3183
 				}
3184
+				if adminUserInfo.Org.Id == 10579 {
3185
+					newprescribe.Modifier = 0
3186
+				}
3170 3187
 				err := service.AddSigleRecord(&newprescribe)
3171 3188
 
3172 3189
 				//获取key,清空redis
@@ -3206,6 +3223,9 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
3206 3223
 						newprescribe.Creater = adminUserInfo.AdminUser.Id
3207 3224
 					}
3208 3225
 				}
3226
+				if adminUserInfo.Org.Id == 10579 {
3227
+					newprescribe.Modifier = 0
3228
+				}
3209 3229
 				err := service.UpDateDialysisPrescription(&newprescribe)
3210 3230
 
3211 3231
 				//记录日志