陈少旭 3 miesięcy temu
rodzic
commit
05269cbe40
1 zmienionych plików z 36 dodań i 28 usunięć
  1. 36 28
      controllers/sg/his_api_controller.go

+ 36 - 28
controllers/sg/his_api_controller.go Wyświetl plik

@@ -12689,13 +12689,6 @@ func Checkgd3101(c *HisApiController, patient_id int64, his_patient_id int64, ad
12689 12689
 	return res
12690 12690
 }
12691 12691
 func Checkgd3102(c *HisApiController, patient_id int64, his_patient_id int64, admin_user_id int64, trig_scen string, order_id int64) (res Resultgd3101) {
12692
-	////patient_id, _ := c.GetInt64("patient_id")
12693
-	//order_id, _ := c.GetInt64("order_id")
12694
-	////his_patient_id, _ := c.GetInt64("his_patient_id")
12695
-	////admin_user_id, _ := c.GetInt64("admin_user_id")
12696
-	//trig_scen := c.GetString("trig_scen")
12697
-	//psn_info, _ := service.GetPsnByPatientId(patient_id)
12698
-	//utils.ErrorLog("解析失败:%v", psn_info)
12699 12692
 
12700 12693
 	adminUser := c.GetAdminUserInfo()
12701 12694
 	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
@@ -26960,23 +26953,25 @@ func (c *HisApiController) GetRegisterInfo() {
26960 26953
 					}
26961 26954
 					var result string
26962 26955
 					var requestLog string
26963
-					if miConfig.Code == "H44030501364" || miConfig.Code == "H44030903432" {
26956
+					if miConfig.Code == "H44030501364" || miConfig.Code == "H44030903432" || miConfig.Code == "H44030500255" {
26964 26957
 						var hisPrescription []*models.HisPrescription
26965 26958
 						res3101 := Checkgd3101ForOne(c, patient.ID, his, admin_user_id, "1", record_time, hisPrescription, department)
26966 26959
 						if res3101.Infcode == 0 {
26967 26960
 							if len(res3101.Output.Result) > 0 {
26968
-								for _, item := range res3101.Output.Result {
26969
-									if len(res3101.ErrMsg) == 0 {
26970
-										res3101.ErrMsg = item.VolaCont
26971
-									} else {
26972
-										res3101.ErrMsg = res3101.ErrMsg + "\n" + item.VolaCont
26973
-									}
26961
+								if len(res3101.Output.Result) > 0 {
26962
+									c.ServeSuccessJSON(map[string]interface{}{
26963
+										"failed_code": -10,
26964
+										"failed_type": 100,
26965
+										"msg":         res3101.Output.Result,
26966
+									})
26967
+									return
26968
+								} else {
26969
+									c.ServeSuccessJSON(map[string]interface{}{
26970
+										"failed_code": -10,
26971
+										"msg":         res3101.ErrMsg,
26972
+									})
26973
+									return
26974 26974
 								}
26975
-								c.ServeSuccessJSON(map[string]interface{}{
26976
-									"failed_code": -10,
26977
-									"msg":         res3101.ErrMsg,
26978
-								})
26979
-								return
26980 26975
 							} else {
26981 26976
 
26982 26977
 								hour := time.Now().Format("15")
@@ -27089,7 +27084,6 @@ func (c *HisApiController) GetRegisterInfo() {
27089 27084
 							utils.ErrorLog("解析失败:%v", item.Insutype)
27090 27085
 							utils.ErrorLog("解析失败:%v", insutype)
27091 27086
 
27092
-
27093 27087
 							if item.Insutype == insutype {
27094 27088
 								insuplc_admdvs_temp = item.InsuplcAdmdvs
27095 27089
 								utils.ErrorLog("解析失败:%v", insuplc_admdvs_temp)
@@ -27098,7 +27092,6 @@ func (c *HisApiController) GetRegisterInfo() {
27098 27092
 
27099 27093
 						}
27100 27094
 
27101
-
27102 27095
 						result, requestLog = service.Gdyb2201A(psn_info.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_info.DoctorNumber, insuplc_admdvs_temp, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName, record_time_two, psn_info.VerifyNumber, admin_user_id)
27103 27096
 						saveLog(result, requestLog, "2201A", "挂号")
27104 27097
 					}
@@ -30517,15 +30510,32 @@ func (c *HisApiController) GetUploadInfo() {
30517 30510
 					}
30518 30511
 					result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "", admin_user_id)
30519 30512
 				} else {
30513
+					if miConfig.Code == "H44030501364" || miConfig.Code == "H44030903432" || miConfig.Code == "H44030500255" {
30514
+						result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "7", tempOrder.ID)
30515
+						if result3101.Infcode == 0 {
30516
+							if len(result3101.Output.Result) > 0 {
30517
+								c.ServeSuccessJSON(map[string]interface{}{
30518
+									"failed_code": -10,
30519
+									"failed_type": 100,
30520
+									"msg":         result3101.Output.Result,
30521
+								})
30522
+								return
30523
+							}
30524
+						} else {
30525
+							c.ServeSuccessJSON(map[string]interface{}{
30526
+								"failed_code": -10,
30527
+								"msg":         result3101.ErrMsg,
30528
+							})
30529
+							return
30530
+						}
30531
+					}
30532
+
30520 30533
 					if his.IdCardType == 4 {
30521 30534
 						psn_info, _ := service.GetPsnByPatientId(his.PatientId)
30522 30535
 						token := psn_info.VerifyNumber
30523 30536
 						result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, token, admin_user_id)
30524
-
30525 30537
 					} else {
30526
-
30527 30538
 						result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, "", admin_user_id)
30528
-
30529 30539
 					}
30530 30540
 				}
30531 30541
 
@@ -30561,9 +30571,7 @@ func (c *HisApiController) GetUploadInfo() {
30561 30571
 							return
30562 30572
 
30563 30573
 						}
30564
-
30565 30574
 						res.InfRefmsgid = gzresSeven10265Two.InfRefmsgid
30566
-
30567 30575
 						res.Output.Setlinfo.AcctMulaidPay = gzresSeven10265Two.Output.Setlinfo.AcctMulaidPay
30568 30576
 						res.Output.Setlinfo.AcctPay = gzresSeven10265Two.Output.Setlinfo.AcctPay
30569 30577
 						res.Output.Setlinfo.CvlservPay = gzresSeven10265Two.Output.Setlinfo.CvlservPay
@@ -32455,7 +32463,7 @@ func (c *HisApiController) GetPreUploadInfo() {
32455 32463
 						res.Infcode = infocode
32456 32464
 
32457 32465
 					} else {
32458
-						if miConfig.Code == "H44030903432" || miConfig.Code == "H44030501364" {
32466
+						if miConfig.Code == "H44030903432" || miConfig.Code == "H44030501364" || miConfig.Code == "H44030500255" {
32459 32467
 							result3101 := Checkgd3101(c, id, his_patient_id, admin_user_id, "2", record_time, prescriptions)
32460 32468
 							if result3101.Infcode == 0 {
32461 32469
 								if len(result3101.Output.Result) > 0 {
@@ -33863,7 +33871,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33863 33871
 
33864 33872
 							psn_info, _ := service.GetPsnByPatientId(his.PatientId)
33865 33873
 							allTotal = fmt.Sprintf("%.2f", total_two)
33866
-							if miConfig.Code == "H44030501364" || miConfig.Code == "H44030903432" {
33874
+							if miConfig.Code == "H44030501364" || miConfig.Code == "H44030903432" || miConfig.Code == "H44030500255" {
33867 33875
 
33868 33876
 								result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "6", order.ID)
33869 33877
 								if result3101.Infcode == 0 {