Browse Source

医保对接

csx 2 years ago
parent
commit
cb4cec6698
2 changed files with 8 additions and 12 deletions
  1. 5 9
      controllers/his_api_controller.go
  2. 3 3
      enums/error_code.go

+ 5 - 9
controllers/his_api_controller.go View File

@@ -1001,7 +1001,7 @@ func (c *HisApiController) CreateHisPrescription() {
1001 1001
 				if id > 0 {
1002 1002
 					new_prescription, err := service.GetPrescriptionById(id, adminInfo.CurrentOrgId)
1003 1003
 					if err != nil {
1004
-						if new_prescription.OrderStatus == 2 {
1004
+						if new_prescription.OrderStatus == 2 || new_prescription.OrderStatus == 4 {
1005 1005
 							isCharge = true
1006 1006
 						}
1007 1007
 					}
@@ -1009,11 +1009,9 @@ func (c *HisApiController) CreateHisPrescription() {
1009 1009
 
1010 1010
 				if items["advices"] != nil && reflect.TypeOf(items["advices"]).String() == "[]interface {}" {
1011 1011
 					advices := items["advices"].([]interface{})
1012
-					fmt.Println("~~~~~~~~4")
1013 1012
 
1014 1013
 					if len(advices) > 0 {
1015 1014
 						for _, advice := range advices {
1016
-							fmt.Println("~~~~~~~~3")
1017 1015
 
1018 1016
 							var adviceId int64
1019 1017
 							if advice.(map[string]interface{})["advice_id"] != nil || reflect.TypeOf(advice.(map[string]interface{})["advice_id"]).String() == "float64" {
@@ -1021,12 +1019,10 @@ func (c *HisApiController) CreateHisPrescription() {
1021 1019
 							}
1022 1020
 							if adviceId > 0 {
1023 1021
 								his_advice_info, err := service.GetHisDoctorAdviceInfo(adviceId)
1024
-								fmt.Println("~~~~~~~~1")
1025
-								fmt.Println("~~~~~~~~1")
1026 1022
 
1027 1023
 								if err == nil {
1028 1024
 									if his_advice_info.IsMedicine == 1 {
1029
-										fmt.Println("~~~~~~~~2")
1025
+
1030 1026
 										isMidicine = true
1031 1027
 									}
1032 1028
 								}
@@ -2375,7 +2371,7 @@ func (c *HisApiController) DeletePrescription() {
2375 2371
 	}
2376 2372
 
2377 2373
 	for _, item := range new_prescriptions {
2378
-		if item.OrderStatus == 2 {
2374
+		if item.OrderStatus == 2 || item.OrderStatus == 4 {
2379 2375
 			isCharge = true
2380 2376
 		}
2381 2377
 	}
@@ -2651,7 +2647,7 @@ func (c *HisApiController) DeleteDoctorAdvice() {
2651 2647
 		}
2652 2648
 	}
2653 2649
 	for _, item := range new_prescriptions {
2654
-		if item.OrderStatus == 2 {
2650
+		if item.OrderStatus == 2 || item.OrderStatus == 4 {
2655 2651
 			isCharge = true
2656 2652
 		}
2657 2653
 	}
@@ -2746,7 +2742,7 @@ func (c *HisApiController) DeleteProject() {
2746 2742
 		}
2747 2743
 	}
2748 2744
 	for _, item := range new_prescriptions {
2749
-		if item.OrderStatus == 2 {
2745
+		if item.OrderStatus == 2 || item.OrderStatus == 4 {
2750 2746
 			isCharge = true
2751 2747
 		}
2752 2748
 	}

+ 3 - 3
enums/error_code.go View File

@@ -502,12 +502,12 @@ var ErrCodeMsgs = map[int]string{
502 502
 	ErrorCheckGoodParamWrong:   "该入库单已出库,反审核失败!",
503 503
 
504 504
 	ErrorCodeMedicineWrong: "处方中包含已发药的药品,无法保存或修改",
505
-	ErrorCodeChargeWrong:   "处方中包含已收费处方,无法保存或修改",
505
+	ErrorCodeChargeWrong:   "处方中包含已收费处方或已经上传的处方,无法保存或修改",
506 506
 
507 507
 	ErrorCodeDeletePMedicineWrong:  "处方中包含已发药的药品,无法删除",
508
-	ErrorCodeDeletePChargeWrong:    "处方中包含收费处方,无法删除",
508
+	ErrorCodeDeletePChargeWrong:    "处方中包含收费处方或已经上传的处方,无法删除",
509 509
 	ErrorCodeDeleteMedicineWrong:   "该药品已经发药,无法删除",
510
-	ErrorCodeDeletePChargeWrongTwo: "该医嘱所属处方已经收费,无法删除",
510
+	ErrorCodeDeletePChargeWrongTwo: "该医嘱所属处方已经收费或已经上传的处方,无法删除",
511 511
 }
512 512
 
513 513
 type SGJError struct {