|
@@ -1657,7 +1657,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1657
|
1657
|
err := service.AddSigleRecord(&prescription)
|
1658
|
1658
|
|
1659
|
1659
|
//长沙南雅医院,自动生成抗凝剂的临时处方
|
1660
|
|
- if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9671 {
|
|
1660
|
+ if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 {
|
1661
|
1661
|
advice := models.DoctorAdvice{
|
1662
|
1662
|
UserOrgId: adminUserInfo.Org.Id,
|
1663
|
1663
|
PatientId: id,
|
|
@@ -1733,7 +1733,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1733
|
1733
|
advice.AdviceName = "无抗凝剂"
|
1734
|
1734
|
break
|
1735
|
1735
|
}
|
1736
|
|
- advice.AdviceDesc = "首剂" + strconv.FormatFloat(anticoagulant_shouji, 'f', -1, 64) + "维持" + strconv.FormatFloat(anticoagulant_weichi, 'f', -1, 64) + "总量" + strconv.FormatFloat(anticoagulant_zongliang, 'f', -1, 64)
|
|
1736
|
+ //advice.AdviceDesc = "首剂" + strconv.FormatFloat(anticoagulant_shouji, 'f', -1, 64) + "维持" + strconv.FormatFloat(anticoagulant_weichi, 'f', -1, 64) + "总量" + strconv.FormatFloat(anticoagulant_zongliang, 'f', -1, 64)
|
1737
|
1737
|
if appRole.UserType == 2 || appRole.UserType == 1 {
|
1738
|
1738
|
advice.AdviceDoctor = appRole.AdminUserId
|
1739
|
1739
|
}
|
|
@@ -1748,9 +1748,10 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1748
|
1748
|
} else {
|
1749
|
1749
|
if anticoagulant == 3 || anticoagulant == 5 || anticoagulant == 7 {
|
1750
|
1750
|
advice.AdviceName = "低分子肝素钠注射液"
|
|
1751
|
+ // 新增患者临时医嘱里的抗凝剂医嘱
|
|
1752
|
+ service.CreateDoctorAdvice(&advice)
|
1751
|
1753
|
}
|
1752
|
|
- // 新增患者临时医嘱里的抗凝剂医嘱
|
1753
|
|
- service.CreateDoctorAdvice(&advice)
|
|
1754
|
+
|
1754
|
1755
|
}
|
1755
|
1756
|
|
1756
|
1757
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
|
|
@@ -2747,7 +2748,7 @@ func (this *DialysisAPIController) StartDialysis() {
|
2747
|
2748
|
|
2748
|
2749
|
// 如果当天有插入数据,则不再往透析纪录里插入数据
|
2749
|
2750
|
if newdialysisRecord.ID > 0 {
|
2750
|
|
- if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 9675 {
|
|
2751
|
+ if adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9671 {
|
2751
|
2752
|
record.Temperature = 36.5
|
2752
|
2753
|
record.ArterialPressure = -100
|
2753
|
2754
|
record.DialysateTemperature = 36.5
|
|
@@ -2755,6 +2756,7 @@ func (this *DialysisAPIController) StartDialysis() {
|
2755
|
2756
|
record.BreathingRate = "20"
|
2756
|
2757
|
record.VenousPressure = 80
|
2757
|
2758
|
record.TransmembranePressure = 60
|
|
2759
|
+ record.Dispose = catheter_operation
|
2758
|
2760
|
}
|
2759
|
2761
|
//针对新化博翔
|
2760
|
2762
|
if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10447 {
|
|
@@ -3210,7 +3212,7 @@ func (c *DialysisAPIController) PostSolution() {
|
3210
|
3212
|
service.UpdateDialysisSolutionStatusTwo(dialysisSolution.ID, dialysisSolution.ModeId, dialysisSolution.UserOrgId, dialysisSolution.PatientId)
|
3211
|
3213
|
|
3212
|
3214
|
//长沙南雅医院,自动生成抗凝剂的临时处方
|
3213
|
|
- if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9671 {
|
|
3215
|
+ if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 {
|
3214
|
3216
|
advice := models.DoctorAdvice{
|
3215
|
3217
|
UserOrgId: adminUserInfo.Org.Id,
|
3216
|
3218
|
PatientId: id,
|
|
@@ -3286,7 +3288,7 @@ func (c *DialysisAPIController) PostSolution() {
|
3286
|
3288
|
advice.AdviceName = "无抗凝剂"
|
3287
|
3289
|
break
|
3288
|
3290
|
}
|
3289
|
|
- advice.AdviceDesc = "首剂" + strconv.FormatFloat(anticoagulant_shouji, 'f', -1, 64) + "维持" + strconv.FormatFloat(anticoagulant_weichi, 'f', -1, 64) + "总量" + strconv.FormatFloat(anticoagulant_zongliang, 'f', -1, 64)
|
|
3291
|
+ //advice.AdviceDesc = "首剂" + strconv.FormatFloat(anticoagulant_shouji, 'f', -1, 64) + "维持" + strconv.FormatFloat(anticoagulant_weichi, 'f', -1, 64) + "总量" + strconv.FormatFloat(anticoagulant_zongliang, 'f', -1, 64)
|
3290
|
3292
|
if appRole.UserType == 2 || appRole.UserType == 1 {
|
3291
|
3293
|
advice.AdviceDoctor = appRole.AdminUserId
|
3292
|
3294
|
}
|
|
@@ -3294,13 +3296,18 @@ func (c *DialysisAPIController) PostSolution() {
|
3294
|
3296
|
// 患者的临时医嘱里查找是否有抗凝剂临时医嘱
|
3295
|
3297
|
advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
|
3296
|
3298
|
|
3297
|
|
- if advicePrescription.ID > 0 {
|
|
3299
|
+ if advicePrescription.ID > 0 && (anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7) {
|
|
3300
|
+
|
|
3301
|
+ advice.AdviceName = "低分子肝素钠注射液"
|
3298
|
3302
|
// 修改患者临时医嘱里的抗凝剂医嘱
|
3299
|
3303
|
advice.ID = advicePrescription.ID
|
3300
|
3304
|
service.UpdateDoctorAdvice(&advice)
|
3301
|
3305
|
} else {
|
3302
|
|
- // 新增患者临时医嘱里的抗凝剂医嘱
|
3303
|
|
- service.CreateDoctorAdvice(&advice)
|
|
3306
|
+ if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
|
|
3307
|
+ advice.AdviceName = "低分子肝素钠注射液"
|
|
3308
|
+ service.CreateDoctorAdvice(&advice)
|
|
3309
|
+ }
|
|
3310
|
+
|
3304
|
3311
|
}
|
3305
|
3312
|
|
3306
|
3313
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
|
|
@@ -3561,7 +3568,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
3561
|
3568
|
}
|
3562
|
3569
|
//长沙南雅累计血容量自动计算
|
3563
|
3570
|
if adminInfo.Org.Id == 10340 || adminInfo.Org.Id == 9671 {
|
3564
|
|
- record.AccumulatedBloodVolume = record.BloodFlowVolume * (math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * 60) / 1000
|
|
3571
|
+ record.AccumulatedBloodVolume = (record.BloodFlowVolume - 25) * (math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * 60) / 1000
|
3565
|
3572
|
}
|
3566
|
3573
|
|
3567
|
3574
|
if template.TemplateId == 47 || template.TemplateId == 54 {
|
|
@@ -8139,3 +8146,33 @@ func (this *DialysisAPIController) CheckSchedule() {
|
8139
|
8146
|
}
|
8140
|
8147
|
|
8141
|
8148
|
}
|
|
8149
|
+
|
|
8150
|
+func (this *DialysisAPIController) GetNewDoctorListToday() {
|
|
8151
|
+
|
|
8152
|
+ orgId := this.GetMobileAdminUserInfo().Org.Id
|
|
8153
|
+
|
|
8154
|
+ schedule_type, _ := this.GetInt64("schedule_type")
|
|
8155
|
+
|
|
8156
|
+ partion_type, _ := this.GetInt64("partion_type")
|
|
8157
|
+
|
|
8158
|
+ start_time := this.GetString("start_time")
|
|
8159
|
+ timeLayout := "2006-01-02"
|
|
8160
|
+ loc, _ := time.LoadLocation("Local")
|
|
8161
|
+ startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
8162
|
+ list, err := service.GetDialysisAdviceSchedulist(orgId, schedule_type, partion_type, startTime.Unix())
|
|
8163
|
+ _, config := service.FindXTHisRecordByOrgId(orgId)
|
|
8164
|
+ appId := this.GetMobileAdminUserInfo().App.Id
|
|
8165
|
+ doctorList, _ := service.GetAllAdminUsers(orgId, appId)
|
|
8166
|
+ if err == nil {
|
|
8167
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
8168
|
+ "list": list,
|
|
8169
|
+ "config": config,
|
|
8170
|
+ "doctorList": doctorList,
|
|
8171
|
+ })
|
|
8172
|
+ return
|
|
8173
|
+
|
|
8174
|
+ } else {
|
|
8175
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
8176
|
+ return
|
|
8177
|
+ }
|
|
8178
|
+}
|