Browse Source

历史排班

28169 1 year ago
parent
commit
369769535b

+ 11 - 0
controllers/dialysis_api_controller.go View File

@@ -730,6 +730,13 @@ func (c *DialysisApiController) PostPrescription() {
730 730
 
731 731
 		} else {
732 732
 			prescription.Creater = dialysisPrescription.Creater
733
+			if adminUserInfo.CurrentOrgId == 9882 {
734
+				if appRole.UserType == 2 || appRole.UserType == 1 {
735
+					prescription_doctor := adminUserInfo.AdminUser.Id
736
+					prescription.PrescriptionDoctor = prescription_doctor
737
+					prescription.Creater = prescription_doctor
738
+				}
739
+			}
733 740
 		}
734 741
 
735 742
 		prescription.CreatedTime = dialysisPrescription.CreatedTime
@@ -1238,6 +1245,10 @@ func (c *DialysisApiController) PostSoulution() {
1238 1245
 			prescription.Creater = adminUserInfo.AdminUser.Id
1239 1246
 		} else {
1240 1247
 			prescription.Creater = dialysisPrescription.Creater
1248
+			if appRole.UserType == 2 || appRole.UserType == 1 {
1249
+				prescription.PrescriptionDoctor = adminUserInfo.AdminUser.Id
1250
+				prescription.Creater = adminUserInfo.AdminUser.Id
1251
+			}
1241 1252
 		}
1242 1253
 
1243 1254
 		prescription.CreatedTime = dialysisPrescription.CreatedTime

+ 10 - 0
controllers/dialysis_record_api_controller.go View File

@@ -1228,6 +1228,7 @@ func (this *DialysisRecordAPIController) StartDialysis() {
1228 1228
 
1229 1229
 					}
1230 1230
 				}
1231
+
1231 1232
 			}
1232 1233
 		}
1233 1234
 		record := models.MonitoringRecord{
@@ -1275,6 +1276,15 @@ func (this *DialysisRecordAPIController) StartDialysis() {
1275 1276
 				record.VenousPressure = 80
1276 1277
 				record.TransmembranePressure = 60
1277 1278
 			}
1279
+			// 针对灵山圣康
1280
+			if adminUserInfo.CurrentOrgId == 10375 {
1281
+				record.DialysateTemperature = 37
1282
+				record.Conductivity = 13.8
1283
+				record.DialysateFlow = 500
1284
+				record.BloodFlowVolume = 200
1285
+				record.BreathingRate = "18"
1286
+				record.SodiumConcentration = 140
1287
+			}
1278 1288
 			//针对新化博翔
1279 1289
 			if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 10447 {
1280 1290
 				record.BloodOxygenSaturation = "99"

+ 34 - 1
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -2221,6 +2221,13 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
2221 2221
 
2222 2222
 		} else {
2223 2223
 			prescription.Creater = dialysisPrescription.Creater
2224
+			if adminUserInfo.Org.Id == 9882 {
2225
+				if appRole.UserType == 2 || appRole.UserType == 1 {
2226
+					prescription_doctor := adminUserInfo.AdminUser.Id
2227
+					prescription.PrescriptionDoctor = prescription_doctor
2228
+					prescription.Creater = prescription_doctor
2229
+				}
2230
+			}
2224 2231
 		}
2225 2232
 
2226 2233
 		prescription.ID = dialysisPrescription.ID
@@ -2587,6 +2594,13 @@ func (c *DialysisAPIController) Finish() {
2587 2594
 		tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
2588 2595
 	}
2589 2596
 
2597
+	if endmonitorRecords.ID > 0 && adminUserInfo.Org.Id == 10495 {
2598
+		tempassessmentAfterDislysis.SystolicBloodPressure = endmonitorRecords.SystolicBloodPressure
2599
+		tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
2600
+		tempassessmentAfterDislysis.Temperature = endmonitorRecords.Temperature
2601
+		tempassessmentAfterDislysis.BreathingRate = endmonitorRecords.BreathingRate
2602
+	}
2603
+
2590 2604
 	if lastAssessmentAfterDislysis != nil {
2591 2605
 		tempassessmentAfterDislysis.BloodPressureType = lastAssessmentAfterDislysis.BloodPressureType
2592 2606
 
@@ -2724,7 +2738,7 @@ func (c *DialysisAPIController) Finish() {
2724 2738
 
2725 2739
 		//下机完自动消毒,针对长沙南雅
2726 2740
 		if dialysisOrder.Stage == 1 {
2727
-			if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9538 {
2741
+			if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9538 || adminUserInfo.Org.Id == 10121 {
2728 2742
 				//根据床位号获取设备型号
2729 2743
 				unitType, _ := service.GetUnitType(dialysisOrder.BedID, dialysisOrder.UserOrgId)
2730 2744
 				//查询使用消毒最后一条消毒记录
@@ -3240,6 +3254,7 @@ func (this *DialysisAPIController) StartDialysis() {
3240 3254
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3241 3255
 				ultrafiltration_rate = ultrafiltration_rate / 1000
3242 3256
 			}
3257
+
3243 3258
 		}
3244 3259
 	}
3245 3260
 
@@ -3315,6 +3330,16 @@ func (this *DialysisAPIController) StartDialysis() {
3315 3330
 			record.Temperature = 36.5
3316 3331
 		}
3317 3332
 
3333
+		//诊断灵山圣康
3334
+		if adminUserInfo.Org.Id == 10375 {
3335
+			record.Conductivity = 13.8
3336
+			record.DialysateTemperature = 37
3337
+			record.DialysateFlow = 500
3338
+			record.BloodFlowVolume = 200
3339
+			record.BreathingRate = "18"
3340
+			record.SodiumConcentration = 140
3341
+		}
3342
+
3318 3343
 		err := service.CreateMonitor(&record)
3319 3344
 		finish := models.XtDialysisFinish{
3320 3345
 			IsFinish:   1,
@@ -3685,7 +3710,15 @@ func (c *DialysisAPIController) PostSolution() {
3685 3710
 		if dialysisPrescription.Creater == 0 {
3686 3711
 			prescription.Creater = adminUserInfo.AdminUser.Id
3687 3712
 		} else {
3713
+
3688 3714
 			prescription.Creater = dialysisPrescription.Creater
3715
+			if adminUserInfo.Org.Id == 9882 {
3716
+				if appRole.UserType == 2 || appRole.UserType == 1 {
3717
+					prescription.Creater = adminUserInfo.AdminUser.Id
3718
+					prescription.PrescriptionDoctor = adminUserInfo.AdminUser.Id
3719
+
3720
+				}
3721
+			}
3689 3722
 		}
3690 3723
 
3691 3724
 		if adminUserInfo.Org.Id == 10340 && prescription.AdminUserId == 0 {

+ 1 - 0
models/new_stock_models.go View File

@@ -170,6 +170,7 @@ type NewBaseDrugOne struct {
170 170
 	SumInCount          int64                  `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
171 171
 	IsPharmacy          int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
172 172
 	Manufacturer        int64                  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
173
+	Dealer              int64                  `gorm:"column:dealer" json:"dealer" form:"dealer"`
173 174
 }
174 175
 
175 176
 func (NewBaseDrugOne) TableName() string {