|
@@ -843,6 +843,19 @@ func (c *DialysisAPIController) PostDoubleCheck() {
|
843
|
843
|
order, _ := service.GetDialysisOrder(recordDate.Unix(), id, adminUserInfo.Org.Id)
|
844
|
844
|
doubleCheck.Creater = order.StartNurse
|
845
|
845
|
}
|
|
846
|
+
|
|
847
|
+ if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
|
|
848
|
+ //查询未核对的医嘱
|
|
849
|
+ doctorList, err := service.GetDoctorAdviceCheckList(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
|
850
|
+ for _, advice := range doctorList {
|
|
851
|
+ if advice.ExecutionStaff == modifier {
|
|
852
|
+
|
|
853
|
+ c.ErrorLog("医嘱核对人不能和执行人为同一人!", err)
|
|
854
|
+ c.ServeFailJSONWithSGJErrorCode(enums.AdviceCodeParamWrong)
|
|
855
|
+ return
|
|
856
|
+ }
|
|
857
|
+ }
|
|
858
|
+ }
|
846
|
859
|
err := service.AddSigleDoubleCheck(&doubleCheck)
|
847
|
860
|
|
848
|
861
|
//针对长沙南雅
|
|
@@ -851,6 +864,7 @@ func (c *DialysisAPIController) PostDoubleCheck() {
|
851
|
864
|
doctorList, _ := service.GetDoctorAdviceCheckList(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
852
|
865
|
if len(doctorList) > 0 && modifier > 0 {
|
853
|
866
|
for _, advice := range doctorList {
|
|
867
|
+
|
854
|
868
|
service.UpdateDoctorAdviceList(advice.ID, modifier)
|
855
|
869
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
|
856
|
870
|
redis := service.RedisClient()
|
|
@@ -890,7 +904,21 @@ func (c *DialysisAPIController) PostDoubleCheck() {
|
890
|
904
|
doubleCheck.EmployeeNumber = employee_number
|
891
|
905
|
doubleCheck.NeedleBatchNumber = needle_batch_number
|
892
|
906
|
doubleCheck.DialyzerBatchNumber = dialyzer_batch_number
|
|
907
|
+
|
|
908
|
+ if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
|
|
909
|
+ //查询未核对的医嘱
|
|
910
|
+ doctorList, err := service.GetDoctorAdviceCheckList(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
|
911
|
+ for _, advice := range doctorList {
|
|
912
|
+ if advice.ExecutionStaff == modifier {
|
|
913
|
+
|
|
914
|
+ c.ErrorLog("医嘱核对人不能和执行人为同一人!", err)
|
|
915
|
+ c.ServeFailJSONWithSGJErrorCode(enums.AdviceCodeParamWrong)
|
|
916
|
+ return
|
|
917
|
+ }
|
|
918
|
+ }
|
|
919
|
+ }
|
893
|
920
|
err := service.UpdateDoubleCheck(&doubleCheck)
|
|
921
|
+
|
894
|
922
|
//针对长沙南雅
|
895
|
923
|
if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
|
896
|
924
|
//查询未核对的医嘱
|
|
@@ -1701,6 +1729,13 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1701
|
1729
|
if prescribing_number == 0 {
|
1702
|
1730
|
prescribing_number = 1
|
1703
|
1731
|
}
|
|
1732
|
+ if prescribing_number == 0 && id == 14682 {
|
|
1733
|
+ prescribing_number = 2
|
|
1734
|
+ }
|
|
1735
|
+
|
|
1736
|
+ if prescribing_number == 0 && id == 18560 {
|
|
1737
|
+ prescribing_number = 2
|
|
1738
|
+ }
|
1704
|
1739
|
advice := models.DoctorAdvice{
|
1705
|
1740
|
UserOrgId: adminUserInfo.Org.Id,
|
1706
|
1741
|
PatientId: id,
|
|
@@ -3294,6 +3329,32 @@ func (c *DialysisAPIController) PostSolution() {
|
3294
|
3329
|
}
|
3295
|
3330
|
}
|
3296
|
3331
|
|
|
3332
|
+ if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10340 {
|
|
3333
|
+
|
|
3334
|
+ if solution.PrescribingNumber == 0 {
|
|
3335
|
+ solution.PrescribingNumber = 1
|
|
3336
|
+ }
|
|
3337
|
+ if prescription.PrescribingNumber == 0 {
|
|
3338
|
+ prescription.PrescribingNumber = 1
|
|
3339
|
+ }
|
|
3340
|
+
|
|
3341
|
+ if solution.PrescribingNumber == 0 && id == 14682 {
|
|
3342
|
+ solution.PrescribingNumber = 2
|
|
3343
|
+ }
|
|
3344
|
+
|
|
3345
|
+ if solution.PrescribingNumber == 0 && id == 18560 {
|
|
3346
|
+ solution.PrescribingNumber = 2
|
|
3347
|
+ }
|
|
3348
|
+
|
|
3349
|
+ if prescription.PrescribingNumber == 0 && id == 14682 {
|
|
3350
|
+ prescription.PrescribingNumber = 2
|
|
3351
|
+ }
|
|
3352
|
+
|
|
3353
|
+ if prescription.PrescribingNumber == 0 && id == 18560 {
|
|
3354
|
+ prescription.PrescribingNumber = 2
|
|
3355
|
+ }
|
|
3356
|
+ }
|
|
3357
|
+
|
3297
|
3358
|
service.SavePrescriptionAndCreateSolution(&solution, &prescription)
|
3298
|
3359
|
//获取最新1条
|
3299
|
3360
|
dialysisSolution, _ := service.GetLastPatientDialysisSolution(id, adminUserInfo.Org.Id)
|