|
@@ -111,6 +111,7 @@ func (this *DialysisAPIController) Scheduals() {
|
111
|
111
|
} else {
|
112
|
112
|
|
113
|
113
|
var dat []map[string]interface{}
|
|
114
|
+
|
114
|
115
|
if err := json.Unmarshal([]byte(scheduals_json_str), &dat); err == nil {
|
115
|
116
|
|
116
|
117
|
} else {
|
|
@@ -2746,7 +2747,7 @@ func (this *DialysisAPIController) StartDialysis() {
|
2746
|
2747
|
if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
|
2747
|
2748
|
|
2748
|
2749
|
totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
|
2749
|
|
- if template.TemplateId == 6 {
|
|
2750
|
+ if template.TemplateId == 6 || template.TemplateId == 22 {
|
2750
|
2751
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
|
2751
|
2752
|
}
|
2752
|
2753
|
|
|
@@ -5593,15 +5594,18 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5593
|
5594
|
fristrecord, _ := service.FindFirstMonitorRecordToday(patientID, adminInfo.Org.Id, monitorDate)
|
5594
|
5595
|
|
5595
|
5596
|
template, _ := service.GetOrgInfoTemplate(adminInfo.Org.Id)
|
5596
|
|
- fmt.Println("1122233333")
|
5597
|
5597
|
|
5598
|
5598
|
var ultrafiltration_rate float64
|
5599
|
5599
|
_, prescription := service.FindDialysisPrescriptionByReordDate(patientID, theAssessmentDateTime, adminInfo.Org.Id)
|
5600
|
5600
|
if prescription.ID > 0 {
|
|
5601
|
+ fmt.Println("444444444")
|
|
5602
|
+
|
5601
|
5603
|
if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
|
|
5604
|
+ fmt.Println("4444444445555")
|
5602
|
5605
|
|
5603
|
5606
|
totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
|
5604
|
|
- if template.TemplateId == 6 {
|
|
5607
|
+ if template.TemplateId == 6 || template.TemplateId == 22 {
|
|
5608
|
+ fmt.Println("12222222")
|
5605
|
5609
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
|
5606
|
5610
|
record.UltrafiltrationRate = ultrafiltration_rate
|
5607
|
5611
|
}
|
|
@@ -5628,9 +5632,8 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5628
|
5632
|
}
|
5629
|
5633
|
}
|
5630
|
5634
|
|
5631
|
|
- if template.TemplateId == 6 || template.TemplateId == 20 {
|
|
5635
|
+ if template.TemplateId == 6 || template.TemplateId == 20 || template.TemplateId == 22 {
|
5632
|
5636
|
if ultrafiltration_rate > 0 && adminInfo.Org.Id != 9538 {
|
5633
|
|
- fmt.Println("11222344444444443333")
|
5634
|
5637
|
ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
|
5635
|
5638
|
record.UltrafiltrationVolume = ultrafiltration_volume
|
5636
|
5639
|
}
|