|
@@ -722,7 +722,7 @@ func (c *DialysisApiController) PostPrescription() {
|
722
|
722
|
|
723
|
723
|
err := service.AddSigleRecord(&prescription)
|
724
|
724
|
|
725
|
|
- if adminUserInfo.CurrentOrgId == 10721 || adminUserInfo.CurrentOrgId == 10164 {
|
|
725
|
+ if adminUserInfo.CurrentOrgId == 10721 || adminUserInfo.CurrentOrgId == 10164 || adminUserInfo.CurrentOrgId == 9478 {
|
726
|
726
|
|
727
|
727
|
monitorList, _ := service.GetMobilePatientMonitor(prescription.PatientId, prescription.RecordDate, prescription.UserOrgId)
|
728
|
728
|
|
|
@@ -733,8 +733,15 @@ func (c *DialysisApiController) PostPrescription() {
|
733
|
733
|
ultrafiltration_rate = (math.Floor(prescription.PrescriptionWater * 1000 / float64(totalMin) * 60 * 1000)) / 1000
|
734
|
734
|
var replacement_rate float64
|
735
|
735
|
|
736
|
|
- //乘10 除10是为了保留一位小数
|
737
|
|
- replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
736
|
+ if adminUserInfo.CurrentOrgId == 10721 {
|
|
737
|
+ //乘10 除10是为了保留一位小数
|
|
738
|
+ replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
739
|
+ }
|
|
740
|
+
|
|
741
|
+ if adminUserInfo.CurrentOrgId == 9478 {
|
|
742
|
+ //乘10 除10是为了保留一位小数
|
|
743
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue*1000/float64(totalMin)*10) / 10
|
|
744
|
+ }
|
738
|
745
|
|
739
|
746
|
var firstOpeateTime = monitorList[0].OperateTime
|
740
|
747
|
for _, item := range monitorList {
|
|
@@ -915,8 +922,15 @@ func (c *DialysisApiController) PostPrescription() {
|
915
|
922
|
ultrafiltration_rate = (math.Floor(prescription.PrescriptionWater * 1000 / float64(totalMin) * 60 * 1000)) / 1000
|
916
|
923
|
var replacement_rate float64
|
917
|
924
|
|
918
|
|
- //乘10 除10是为了保留一位小数
|
919
|
|
- replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
925
|
+ if adminUserInfo.CurrentOrgId == 10721 {
|
|
926
|
+ //乘10 除10是为了保留一位小数
|
|
927
|
+ replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
928
|
+ }
|
|
929
|
+
|
|
930
|
+ if adminUserInfo.CurrentOrgId == 9478 {
|
|
931
|
+ //乘10 除10是为了保留一位小数
|
|
932
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue*1000/float64(totalMin)*10) / 10
|
|
933
|
+ }
|
920
|
934
|
|
921
|
935
|
var firstOpeateTime = monitorList[0].OperateTime
|
922
|
936
|
for _, item := range monitorList {
|
|
@@ -1609,7 +1623,7 @@ func (c *DialysisApiController) PostSoulution() {
|
1609
|
1623
|
|
1610
|
1624
|
err := service.SavePrescriptionAndCreateSolution(&solution, &prescription)
|
1611
|
1625
|
|
1612
|
|
- if adminUserInfo.CurrentOrgId == 10721 || adminUserInfo.CurrentOrgId == 10164 {
|
|
1626
|
+ if adminUserInfo.CurrentOrgId == 10721 || adminUserInfo.CurrentOrgId == 10164 || adminUserInfo.CurrentOrgId == 9478 {
|
1613
|
1627
|
|
1614
|
1628
|
monitorList, _ := service.GetMobilePatientMonitor(prescription.PatientId, prescription.RecordDate, prescription.UserOrgId)
|
1615
|
1629
|
|
|
@@ -1620,8 +1634,15 @@ func (c *DialysisApiController) PostSoulution() {
|
1620
|
1634
|
ultrafiltration_rate = (math.Floor(prescription.PrescriptionWater * 1000 / float64(totalMin) * 60 * 1000)) / 1000
|
1621
|
1635
|
var replacement_rate float64
|
1622
|
1636
|
|
1623
|
|
- //乘10 除10是为了保留一位小数
|
1624
|
|
- replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
1637
|
+ if adminUserInfo.CurrentOrgId == 10721 {
|
|
1638
|
+ //乘10 除10是为了保留一位小数
|
|
1639
|
+ replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*10) / 10
|
|
1640
|
+ }
|
|
1641
|
+
|
|
1642
|
+ if adminUserInfo.CurrentOrgId == 9478 {
|
|
1643
|
+ //乘10 除10是为了保留一位小数
|
|
1644
|
+ replacement_rate = math.Floor(prescription.DisplaceLiquiValue*1000/float64(totalMin)*10) / 10
|
|
1645
|
+ }
|
1625
|
1646
|
|
1626
|
1647
|
var firstOpeateTime = monitorList[0].OperateTime
|
1627
|
1648
|
for _, item := range monitorList {
|
|
@@ -4845,7 +4866,7 @@ func (c *DialysisApiController) GetDialysisOrder() {
|
4845
|
4866
|
//获取上次的透后体重
|
4846
|
4867
|
// assessmentAfterDislysis, _ := service.MobileGetLastTimeAssessmentAfterDislysis(adminUserInfo.CurrentOrgId, patientInfo.ID, xttime)
|
4847
|
4868
|
assessmentAfterDislysis, _ := service.MobileGetLast(adminUserInfo.CurrentOrgId, patientInfo.ID, xttime)
|
4848
|
|
-
|
|
4869
|
+ fmt.Println("assessmentAfterDislysis--------------------------", assessmentAfterDislysis)
|
4849
|
4870
|
//获取透析次数
|
4850
|
4871
|
_, total, err := service.GetTotalDialysisCout(adminUserInfo.CurrentOrgId, patientInfo.ID)
|
4851
|
4872
|
|