|
@@ -786,30 +786,30 @@ func (c *DialysisAPIController) PostDoubleCheck() {
|
786
|
786
|
firstCheckDate = firstCheckDateUnix.Unix()
|
787
|
787
|
}
|
788
|
788
|
|
789
|
|
- if adminUserInfo.Org.Id == 10340 {
|
790
|
|
-
|
791
|
|
- list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
|
792
|
|
- _, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
793
|
|
- if check.ID == 0 {
|
794
|
|
- if employee_number != list.JobNumber {
|
795
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
796
|
|
- "doubleCheck": check,
|
797
|
|
- "msg": "2",
|
798
|
|
- })
|
799
|
|
- return
|
800
|
|
- }
|
801
|
|
- }
|
802
|
|
- if check.ID > 0 {
|
803
|
|
- if employee_number != list.JobNumber {
|
804
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
805
|
|
- "doubleCheck": check,
|
806
|
|
- "msg": "2",
|
807
|
|
- })
|
808
|
|
- return
|
809
|
|
- }
|
810
|
|
- }
|
811
|
|
-
|
812
|
|
- }
|
|
789
|
+ //if adminUserInfo.Org.Id == 10340 {
|
|
790
|
+ //
|
|
791
|
+ // list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
|
|
792
|
+ // _, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
|
793
|
+ // if check.ID == 0 {
|
|
794
|
+ // if employee_number != list.JobNumber {
|
|
795
|
+ // c.ServeSuccessJSON(map[string]interface{}{
|
|
796
|
+ // "doubleCheck": check,
|
|
797
|
+ // "msg": "2",
|
|
798
|
+ // })
|
|
799
|
+ // return
|
|
800
|
+ // }
|
|
801
|
+ // }
|
|
802
|
+ // if check.ID > 0 {
|
|
803
|
+ // if employee_number != list.JobNumber {
|
|
804
|
+ // c.ServeSuccessJSON(map[string]interface{}{
|
|
805
|
+ // "doubleCheck": check,
|
|
806
|
+ // "msg": "2",
|
|
807
|
+ // })
|
|
808
|
+ // return
|
|
809
|
+ // }
|
|
810
|
+ // }
|
|
811
|
+ //
|
|
812
|
+ //}
|
813
|
813
|
|
814
|
814
|
doubleCheck := models.DoubleCheck{
|
815
|
815
|
UserOrgId: adminUserInfo.Org.Id,
|
|
@@ -836,13 +836,14 @@ func (c *DialysisAPIController) PostDoubleCheck() {
|
836
|
836
|
doubleCheck.CheckTime = checkDate
|
837
|
837
|
doubleCheck.Creater = creater
|
838
|
838
|
doubleCheck.Modifier = modifier
|
839
|
|
-
|
|
839
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
840
|
+ order, _ := service.GetDialysisOrder(recordDate.Unix(), id, adminUserInfo.Org.Id)
|
|
841
|
+ doubleCheck.Creater = order.StartNurse
|
|
842
|
+ }
|
840
|
843
|
err := service.AddSigleDoubleCheck(&doubleCheck)
|
841
|
844
|
|
842
|
845
|
//针对长沙南雅
|
843
|
846
|
if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
|
844
|
|
- fmt.Println("-----------------------", adminUserInfo.Org.Id)
|
845
|
|
- fmt.Println("modifier----------------", modifier)
|
846
|
847
|
//查询未核对的医嘱
|
847
|
848
|
doctorList, _ := service.GetDoctorAdviceCheckList(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
848
|
849
|
if len(doctorList) > 0 && modifier > 0 {
|
|
@@ -1461,7 +1462,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1461
|
1462
|
start_sodium := c.GetString("start_sodium")
|
1462
|
1463
|
sodium_curve := c.GetString("sodium_curve")
|
1463
|
1464
|
treatment_remark := c.GetString("treatment_remark")
|
1464
|
|
-
|
|
1465
|
+ dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
|
|
1466
|
+ sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
|
1465
|
1467
|
appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
|
1466
|
1468
|
|
1467
|
1469
|
//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
|
|
@@ -1592,6 +1594,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1592
|
1594
|
SodiumCurve: sodium_curve,
|
1593
|
1595
|
TreatmentRemark: treatment_remark,
|
1594
|
1596
|
PrescriptionSodium: prescription_sodium,
|
|
1597
|
+ DialysisFluidFlow: dialysis_fluid_flow,
|
|
1598
|
+ SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
1595
|
1599
|
}
|
1596
|
1600
|
|
1597
|
1601
|
//查询最近透析准备表里是否存在 透析器 灌流器
|
|
@@ -1697,7 +1701,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1697
|
1701
|
AdviceName: "", // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
|
1698
|
1702
|
AdviceDesc: "",
|
1699
|
1703
|
ReminderDate: 0,
|
1700
|
|
- SingleDose: 5000,
|
|
1704
|
+ SingleDose: anticoagulant_zongliang,
|
1701
|
1705
|
SingleDoseUnit: "iu",
|
1702
|
1706
|
DrugSpec: 0,
|
1703
|
1707
|
DrugSpecUnit: "",
|
|
@@ -1776,7 +1780,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1776
|
1780
|
advice.AdviceName = "低分子肝素钠注射液"
|
1777
|
1781
|
// 修改患者临时医嘱里的抗凝剂医嘱
|
1778
|
1782
|
advice.ID = advicePrescription.ID
|
1779
|
|
- service.UpdateDoctorAdvice(&advice)
|
|
1783
|
+ service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
|
1780
|
1784
|
} else {
|
1781
|
1785
|
if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
|
1782
|
1786
|
advice.AdviceName = "低分子肝素钠注射液"
|
|
@@ -1893,7 +1897,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1893
|
1897
|
advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
|
1894
|
1898
|
if advicePrescription.ID > 0 {
|
1895
|
1899
|
|
1896
|
|
- service.UpdateDoctorAdvieById(advicePrescription.ID, prescribing_number)
|
|
1900
|
+ service.UpdateDoctorAdvieByIdOne(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
|
1897
|
1901
|
|
1898
|
1902
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
|
1899
|
1903
|
redis := service.RedisClient()
|
|
@@ -3008,6 +3012,8 @@ func (c *DialysisAPIController) PostSolution() {
|
3008
|
3012
|
dry_water_hour := c.GetString("dry_water_hour")
|
3009
|
3013
|
water_machine := c.GetString("water_machine")
|
3010
|
3014
|
dialysis_remark := c.GetString("dialysis_remark")
|
|
3015
|
+ dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
|
|
3016
|
+ sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
|
3011
|
3017
|
if mode_id > 0 {
|
3012
|
3018
|
|
3013
|
3019
|
var str string
|
|
@@ -3136,6 +3142,8 @@ func (c *DialysisAPIController) PostSolution() {
|
3136
|
3142
|
StartSodium: start_sodium,
|
3137
|
3143
|
SodiumCurve: sodium_curve,
|
3138
|
3144
|
TreatmentRemark: treatment_remark,
|
|
3145
|
+ DialysisFluidFlow: dialysis_fluid_flow,
|
|
3146
|
+ SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
3139
|
3147
|
}
|
3140
|
3148
|
|
3141
|
3149
|
_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
|
@@ -3240,6 +3248,8 @@ func (c *DialysisAPIController) PostSolution() {
|
3240
|
3248
|
StartSodium: start_sodium,
|
3241
|
3249
|
SodiumCurve: sodium_curve,
|
3242
|
3250
|
TreatmentRemark: treatment_remark,
|
|
3251
|
+ SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
|
3252
|
+ DialysisFluidFlow: dialysis_fluid_flow,
|
3243
|
3253
|
}
|
3244
|
3254
|
|
3245
|
3255
|
//针对河间咸的
|
|
@@ -3278,7 +3288,7 @@ func (c *DialysisAPIController) PostSolution() {
|
3278
|
3288
|
AdviceName: "", // 根据抗凝剂转换为中文 + 首剂 + 维持 + 总量
|
3279
|
3289
|
AdviceDesc: "",
|
3280
|
3290
|
ReminderDate: 0,
|
3281
|
|
- SingleDose: 5000,
|
|
3291
|
+ SingleDose: prescription.AnticoagulantZongliang,
|
3282
|
3292
|
SingleDoseUnit: "iu",
|
3283
|
3293
|
DrugSpec: 0,
|
3284
|
3294
|
DrugSpecUnit: "",
|
|
@@ -3358,7 +3368,7 @@ func (c *DialysisAPIController) PostSolution() {
|
3358
|
3368
|
advice.AdviceName = "低分子肝素钠注射液"
|
3359
|
3369
|
// 修改患者临时医嘱里的抗凝剂医嘱
|
3360
|
3370
|
advice.ID = advicePrescription.ID
|
3361
|
|
- service.UpdateDoctorAdvice(&advice)
|
|
3371
|
+ service.UpdateDoctorAdviceById(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
|
3362
|
3372
|
} else {
|
3363
|
3373
|
if anticoagulant == 3 || anticoagulant == 6 || anticoagulant == 7 {
|
3364
|
3374
|
advice.AdviceName = "低分子肝素钠注射液"
|
|
@@ -6349,7 +6359,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
|
6349
|
6359
|
for _, item := range beforePrepares {
|
6350
|
6360
|
storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
|
6351
|
6361
|
warehouse, _ := service.FindFirstWarehousingInfoByStockTwo(item.GoodId, item.GoodTypeId, storeConfig.StorehouseOutInfo)
|
6352
|
|
-
|
6353
|
6362
|
if item.Count > warehouse.Count {
|
6354
|
6363
|
goodObj, _ := service.GetGoodInformationByGoodId(item.GoodId)
|
6355
|
6364
|
c.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -6359,7 +6368,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
|
6359
|
6368
|
})
|
6360
|
6369
|
return
|
6361
|
6370
|
}
|
6362
|
|
-
|
6363
|
6371
|
}
|
6364
|
6372
|
|
6365
|
6373
|
//出库逻辑
|