28169 1 anno fa
parent
commit
c7a39422b0

+ 4 - 4
controllers/mobile_api_controllers/dialysis_api_controller.go Vedi File

@@ -3352,7 +3352,7 @@ func (this *DialysisAPIController) StartDialysis() {
3352 3352
 		if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
3353 3353
 
3354 3354
 			totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
3355
-			if (template.TemplateId == 6 || template.TemplateId == 32 || template.TemplateId == 65 || adminUserInfo.Org.Id == 10375) && adminUserInfo.Org.Id != 9671 { //adminUserInfo.Org.Id == 9538
3355
+			if (template.TemplateId == 6 || template.TemplateId == 32 || template.TemplateId == 65 || adminUserInfo.Org.Id == 10375 || template.TemplateId == 70) && adminUserInfo.Org.Id != 9671 { //adminUserInfo.Org.Id == 9538
3356 3356
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3357 3357
 			}
3358 3358
 
@@ -4359,7 +4359,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4359 4359
 		if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
4360 4360
 
4361 4361
 			totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
4362
-			if (template.TemplateId == 6 || template.TemplateId == 65 || adminInfo.Org.Id == 10375) && adminInfo.Org.Id != 9538 {
4362
+			if (template.TemplateId == 6 || template.TemplateId == 65 || adminInfo.Org.Id == 10375 || template.TemplateId == 70) && adminInfo.Org.Id != 9538 {
4363 4363
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
4364 4364
 				record.UltrafiltrationRate = ultrafiltration_rate
4365 4365
 
@@ -4452,7 +4452,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4452 4452
 		}
4453 4453
 	}
4454 4454
 
4455
-	if template.TemplateId == 6 || template.TemplateId == 65 || template.TemplateId == 20 || template.TemplateId == 22 || template.TemplateId == 32 || template.TemplateId == 34 || template.TemplateId == 36 || template.TemplateId == 41 || template.TemplateId == 43 || template.TemplateId == 47 || template.TemplateId == 54 { //adminInfo.Org.Id == 9538
4455
+	if template.TemplateId == 6 || template.TemplateId == 65 || template.TemplateId == 20 || template.TemplateId == 22 || template.TemplateId == 32 || template.TemplateId == 34 || template.TemplateId == 36 || template.TemplateId == 41 || template.TemplateId == 43 || template.TemplateId == 47 || template.TemplateId == 54 || template.TemplateId == 70 { //adminInfo.Org.Id == 9538
4456 4456
 		if ultrafiltration_rate > 0 && adminInfo.Org.Id != 9538 {
4457 4457
 			ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
4458 4458
 			record.UltrafiltrationVolume = ultrafiltration_volume
@@ -5493,7 +5493,7 @@ func (c *DialysisAPIController) CreateRemindDoctorAdvice() {
5493 5493
 			service.CreateDialysisFinish(finish)
5494 5494
 		}
5495 5495
 
5496
-		if adminUserInfo.Org.Id == 10597 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10164 {
5496
+		if adminUserInfo.Org.Id == 10597 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10164 || adminUserInfo.Org.Id == 9671 {
5497 5497
 			list, err := service.CreateMGroupAdviceOne(adminUserInfo.Org.Id, advices, groupNo)
5498 5498
 			for _, item := range advices {
5499 5499
 				byterequest, _ := json.Marshal(item)

+ 2 - 1
service/patient_service.go Vedi File

@@ -1134,7 +1134,8 @@ func CreateMGroupAdviceOne(orgId int64, advices []*models.GroupAdvice, groupNo i
1134 1134
 		list = append(list, advice)
1135 1135
 		if len(advice.Children) > 0 {
1136 1136
 			for _, child := range advice.Children {
1137
-				child.GroupNo = child.GroupNo
1137
+
1138
+				child.GroupNo = advice.GroupNo
1138 1139
 				child.ParentId = advice.ID
1139 1140
 				fmt.Println(child)
1140 1141
 				if err = tx.Create(&child).Error; err != nil {