Kaynağa Gözat

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

陈少旭 11 ay önce
ebeveyn
işleme
2bb1c3eac1

+ 15 - 4
controllers/dialysis_api_controller.go Dosyayı Görüntüle

@@ -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)

+ 6 - 6
controllers/his_api_controller.go Dosyayı Görüntüle

@@ -213,13 +213,13 @@ func (c *HisApiController) GetFaPiaoNumber() {
213 213
 	number := count + 1
214 214
 
215 215
 	//if number >= 1000 {
216
-	//	zero = "0000" + strconv.FormatInt(number, 10)
216
+	//        zero = "0000" + strconv.FormatInt(number, 10)
217 217
 	//} else if number >= 10000 {
218
-	//	zero = "000" + strconv.FormatInt(number, 10)
218
+	//        zero = "000" + strconv.FormatInt(number, 10)
219 219
 	//} else if number >= 100000 {
220
-	//	zero = "00" + strconv.FormatInt(number, 10)
220
+	//        zero = "00" + strconv.FormatInt(number, 10)
221 221
 	//} else if number >= 1000000 {
222
-	//	zero = "0" + strconv.FormatInt(number, 10)
222
+	//        zero = "0" + strconv.FormatInt(number, 10)
223 223
 	//} else {
224 224
 	zero = "0" + strconv.FormatInt(number, 10)
225 225
 	//}
@@ -229,6 +229,7 @@ func (c *HisApiController) GetFaPiaoNumber() {
229 229
 	})
230 230
 	return
231 231
 }
232
+
232 233
 func (c *HisApiController) ChangeOrderDesc() {
233 234
 	id, _ := c.GetInt64("id")
234 235
 	desc := c.GetString("desc")
@@ -3174,7 +3175,7 @@ func (c *HisApiController) CreateHisPrescription() {
3174 3175
 	var adviceList []models.HisDoctorAdviceInfo
3175 3176
 	var projectList []models.HisPrescriptionProject
3176 3177
 
3177
-	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 {
3178 3179
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3179 3180
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3180 3181
 
@@ -7401,7 +7402,6 @@ func (c *HisApiController) setAdviceWithJSON(advice *models.HisDoctorAdviceInfo,
7401 7402
 							//advice.UpdatedTime = time.Now().Unix()
7402 7403
 							advice.CreatedTime = hisAdvice.CreatedTime
7403 7404
 							advice.UpdatedTime = time.Now().Unix()
7404
-
7405 7405
 						} else {
7406 7406
 							advice.CreatedTime = hisAdvice.CreatedTime
7407 7407
 							advice.UpdatedTime = hisAdvice.UpdatedTime

+ 5 - 5
controllers/mobile_api_controllers/dialysis_api_controller.go Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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
 				//记录日志