|
@@ -4281,6 +4281,11 @@ func (this *DialysisAPIController) StartDialysis() {
|
4281
|
4281
|
ultrafiltration_rate = ultrafiltration_rate / 1000
|
4282
|
4282
|
}
|
4283
|
4283
|
|
|
4284
|
+ if adminUserInfo.Org.Id == 10633 {
|
|
4285
|
+ ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
|
|
4286
|
+ ultrafiltration_rate = ultrafiltration_rate / 1000
|
|
4287
|
+ }
|
|
4288
|
+
|
4284
|
4289
|
if adminUserInfo.Org.Id == 10612 || adminUserInfo.Org.Id == 10617 {
|
4285
|
4290
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
|
4286
|
4291
|
ultrafiltration_rate = ultrafiltration_rate / 1000
|
|
@@ -4435,6 +4440,27 @@ func (this *DialysisAPIController) StartDialysis() {
|
4435
|
4440
|
}
|
4436
|
4441
|
}
|
4437
|
4442
|
|
|
4443
|
+ if adminUserInfo.Org.Id == 10726 {
|
|
4444
|
+
|
|
4445
|
+ if prescription.ID > 0 {
|
|
4446
|
+
|
|
4447
|
+ if prescription.ModeId == 2 {
|
|
4448
|
+ totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
|
|
4449
|
+ if totalMin == 0 {
|
|
4450
|
+ totalMin = 240
|
|
4451
|
+ }
|
|
4452
|
+ if prescription.DisplaceLiquiValue == 0 {
|
|
4453
|
+ prescription.DisplaceLiquiValue = 1500
|
|
4454
|
+ }
|
|
4455
|
+
|
|
4456
|
+ //乘10 除10是为了保留一位小数
|
|
4457
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin))
|
|
4458
|
+
|
|
4459
|
+ }
|
|
4460
|
+
|
|
4461
|
+ }
|
|
4462
|
+ }
|
|
4463
|
+
|
4438
|
4464
|
}
|
4439
|
4465
|
}
|
4440
|
4466
|
|
|
@@ -4457,6 +4483,25 @@ func (this *DialysisAPIController) StartDialysis() {
|
4457
|
4483
|
}
|
4458
|
4484
|
}
|
4459
|
4485
|
|
|
4486
|
+ if adminUserInfo.Org.Id == 10726 {
|
|
4487
|
+ if prescription.ID == 0 {
|
|
4488
|
+
|
|
4489
|
+ if prescription.ModeId == 2 {
|
|
4490
|
+ totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
|
|
4491
|
+ if totalMin == 0 {
|
|
4492
|
+ totalMin = 240
|
|
4493
|
+ }
|
|
4494
|
+ if prescription.DisplaceLiquiValue == 0 {
|
|
4495
|
+ prescription.DisplaceLiquiValue = 1500
|
|
4496
|
+ }
|
|
4497
|
+
|
|
4498
|
+ //乘10 除10是为了保留一位小数
|
|
4499
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin))
|
|
4500
|
+ }
|
|
4501
|
+
|
|
4502
|
+ }
|
|
4503
|
+ }
|
|
4504
|
+
|
4460
|
4505
|
record := models.MonitoringRecord{
|
4461
|
4506
|
UserOrgId: adminUserInfo.Org.Id,
|
4462
|
4507
|
PatientId: patientID,
|
|
@@ -5778,6 +5823,12 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5778
|
5823
|
|
5779
|
5824
|
}
|
5780
|
5825
|
|
|
5826
|
+ if adminInfo.Org.Id == 10633 {
|
|
5827
|
+ ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
|
|
5828
|
+
|
|
5829
|
+ record.UltrafiltrationRate = ultrafiltration_rate / 1000
|
|
5830
|
+ }
|
|
5831
|
+
|
5781
|
5832
|
if adminInfo.Org.Id == 10206 {
|
5782
|
5833
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
|
5783
|
5834
|
|
|
@@ -5847,6 +5898,11 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5847
|
5898
|
record.UltrafiltrationVolume = ultrafiltration_volume
|
5848
|
5899
|
}
|
5849
|
5900
|
|
|
5901
|
+ if adminInfo.Org.Id == 10633 {
|
|
5902
|
+ ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
|
|
5903
|
+ record.UltrafiltrationVolume = ultrafiltration_volume / 1000
|
|
5904
|
+ }
|
|
5905
|
+
|
5850
|
5906
|
//长沙南雅
|
5851
|
5907
|
if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 || adminInfo.Org.Id == 10469 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10610 || adminInfo.Org.Id == 10537 || adminInfo.Org.Id == 10667 || adminInfo.Org.Id == 9478 || adminInfo.Org.Id == 10766 {
|
5852
|
5908
|
|
|
@@ -5948,6 +6004,18 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5948
|
6004
|
|
5949
|
6005
|
}
|
5950
|
6006
|
|
|
6007
|
+ if adminInfo.Org.Id == 10726 {
|
|
6008
|
+ var replacement_rate float64
|
|
6009
|
+ var displacement_quantity float64
|
|
6010
|
+ totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
|
|
6011
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin) * 60)
|
|
6012
|
+ record.ReplacementRate = replacement_rate
|
|
6013
|
+ fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
|
|
6014
|
+ displacement_quantity = math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * replacement_rate
|
|
6015
|
+ record.DisplacementQuantity = displacement_quantity
|
|
6016
|
+
|
|
6017
|
+ }
|
|
6018
|
+
|
5951
|
6019
|
if adminInfo.Org.Id == 10766 || adminInfo.Org.Id == 10164 || adminInfo.Org.Id == 10768 {
|
5952
|
6020
|
var replacement_rate float64
|
5953
|
6021
|
var displacement_quantity float64
|