Bladeren bron

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 jaren geleden
bovenliggende
commit
8285739556
4 gewijzigde bestanden met toevoegingen van 590 en 57 verwijderingen
  1. 112 7
      controllers/sg/his_api_controller.go
  2. 474 50
      controllers/zh/zh_his_api_controller.go
  3. 3 0
      models/his_models.go
  4. 1 0
      service/his_service.go

+ 112 - 7
controllers/sg/his_api_controller.go Bestand weergeven

3126
 			his.IdCardNo = patient.IdCardNo
3126
 			his.IdCardNo = patient.IdCardNo
3127
 			his.PhoneNumber = patient.Phone
3127
 			his.PhoneNumber = patient.Phone
3128
 			his.UserOrgId = adminInfo.CurrentOrgId
3128
 			his.UserOrgId = adminInfo.CurrentOrgId
3129
+			his.Insutype = insutype
3129
 			his.Ctime = time.Now().Unix()
3130
 			his.Ctime = time.Now().Unix()
3130
 			his.Mtime = time.Now().Unix()
3131
 			his.Mtime = time.Now().Unix()
3131
 			his.InsuplcAdmdvs = insuplc_admdvs
3132
 			his.InsuplcAdmdvs = insuplc_admdvs
3321
 				result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3322
 				result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3322
 			} else {
3323
 			} else {
3323
 				if miConfig.Code == "H15049901371" {
3324
 				if miConfig.Code == "H15049901371" {
3324
-					result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3325
+					//赤峰地区国家医保医疗类别
3326
+					//职工透析:医疗类别选特殊情况门诊990502
3327
+					//居民定额血透门慢: 医疗类别选门诊慢病140104
3328
+					var med_type string
3329
+					if his.Insutype == "390" {
3330
+						if reg_type == 14 {
3331
+							med_type = "140104"
3332
+						} else if reg_type == 11 {
3333
+							med_type = "11"
3334
+						}
3335
+					} else if his.Insutype == "310" {
3336
+						if reg_type == 14 {
3337
+							med_type = "990502"
3338
+						} else if reg_type == 11 {
3339
+							med_type = "11"
3340
+						}
3341
+					}
3342
+					result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, med_type, doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3325
 
3343
 
3326
 				} else {
3344
 				} else {
3327
 					result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3345
 					result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
3789
 							}
3807
 							}
3790
 
3808
 
3791
 						} else {
3809
 						} else {
3792
-							result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, acct_used_flag)
3810
+							if miConfig.Code == "H15049901371" {
3811
+								//赤峰地区国家医保医疗类别
3812
+								//职工透析:医疗类别选特殊情况门诊990502
3813
+								//居民定额血透门慢: 医疗类别选门诊慢病140104
3814
+								var med_type string
3815
+								if his.Insutype == "390" {
3816
+									if reg_type == 14 {
3817
+										med_type = "140104"
3818
+									} else if reg_type == 11 {
3819
+										med_type = "11"
3820
+									}
3821
+								} else if his.Insutype == "310" {
3822
+									if reg_type == 14 {
3823
+										med_type = "990502"
3824
+									} else if reg_type == 11 {
3825
+										med_type = "11"
3826
+									}
3827
+								}
3828
+								result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
3829
+							} else {
3830
+								result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.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)
3831
+							}
3832
+
3833
+							//result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, acct_used_flag)
3793
 							var dat map[string]interface{}
3834
 							var dat map[string]interface{}
3794
 							if err := json.Unmarshal([]byte(result2), &dat); err == nil {
3835
 							if err := json.Unmarshal([]byte(result2), &dat); err == nil {
3795
 								fmt.Println(dat)
3836
 								fmt.Println(dat)
4065
 				}
4106
 				}
4066
 
4107
 
4067
 			} else {
4108
 			} else {
4068
-				result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.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)
4109
+
4110
+				var src_resquest string
4111
+				if miConfig.Code == "H15049901371" {
4112
+					//赤峰地区国家医保医疗类别
4113
+					//职工透析:医疗类别选特殊情况门诊990502
4114
+					//居民定额血透门慢: 医疗类别选门诊慢病140104
4115
+					var med_type string
4116
+					if his.Insutype == "390" {
4117
+						if reg_type == 14 {
4118
+							med_type = "140104"
4119
+						} else if reg_type == 11 {
4120
+							med_type = "11"
4121
+						}
4122
+					} else if his.Insutype == "310" {
4123
+						if reg_type == 14 {
4124
+							med_type = "990502"
4125
+						} else if reg_type == 11 {
4126
+							med_type = "11"
4127
+						}
4128
+					}
4129
+					result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag)
4130
+				} else {
4131
+					result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.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)
4132
+				}
4133
+
4069
 				var dat map[string]interface{}
4134
 				var dat map[string]interface{}
4070
 				if err := json.Unmarshal([]byte(result2), &dat); err == nil {
4135
 				if err := json.Unmarshal([]byte(result2), &dat); err == nil {
4071
 					fmt.Println(dat)
4136
 					fmt.Println(dat)
4829
 			result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
4894
 			result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
4830
 		} else {
4895
 		} else {
4831
 			if miConfig.Code == "H15049901371" {
4896
 			if miConfig.Code == "H15049901371" {
4832
-				result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
4833
-
4897
+				//赤峰地区国家医保医疗类别
4898
+				//职工透析:医疗类别选特殊情况门诊990502
4899
+				//居民定额血透门慢: 医疗类别选门诊慢病140104
4900
+				var med_type string
4901
+				if his.Insutype == "390" {
4902
+					if reg_type == 14 {
4903
+						med_type = "140104"
4904
+					} else if reg_type == 11 {
4905
+						med_type = "11"
4906
+					}
4907
+				} else if his.Insutype == "310" {
4908
+					if reg_type == 14 {
4909
+						med_type = "990502"
4910
+					} else if reg_type == 11 {
4911
+						med_type = "11"
4912
+					}
4913
+				}
4914
+				result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, med_type, doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
4834
 			} else {
4915
 			} else {
4835
-				result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
4916
+				result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
4836
 
4917
 
4837
 			}
4918
 			}
4838
 			saveLog(result, requestLog, "2203", "上传就诊信息")
4919
 			saveLog(result, requestLog, "2203", "上传就诊信息")
5239
 
5320
 
5240
 					} else {
5321
 					} else {
5241
 
5322
 
5242
-						result, request_log := service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType)
5323
+						var result string
5324
+						var request_log string
5325
+						if miConfig.Code == "H15049901371" {
5326
+							//赤峰地区国家医保医疗类别
5327
+							//职工透析:医疗类别选特殊情况门诊990502
5328
+							//居民定额血透门慢: 医疗类别选门诊慢病140104
5329
+							var med_type string
5330
+							if his.Insutype == "390" {
5331
+								if reg_type == 14 {
5332
+									med_type = "140104"
5333
+								} else if reg_type == 11 {
5334
+									med_type = "11"
5335
+								}
5336
+							} else if his.Insutype == "310" {
5337
+								if reg_type == 14 {
5338
+									med_type = "990502"
5339
+								} else if reg_type == 11 {
5340
+									med_type = "11"
5341
+								}
5342
+							}
5343
+							result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, med_type, his.IdCardType, 0, 0, 0, 0, his.IdType)
5344
+						} else {
5345
+							result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType)
5346
+						}
5347
+
5243
 						var dat map[string]interface{}
5348
 						var dat map[string]interface{}
5244
 						if err := json.Unmarshal([]byte(result), &dat); err == nil {
5349
 						if err := json.Unmarshal([]byte(result), &dat); err == nil {
5245
 							fmt.Println(dat)
5350
 							fmt.Println(dat)

+ 474 - 50
controllers/zh/zh_his_api_controller.go Bestand weergeven

57
 	Signtype    interface{} `json:"signtype"`
57
 	Signtype    interface{} `json:"signtype"`
58
 	WarnInfo    interface{} `json:"warn_info"`
58
 	WarnInfo    interface{} `json:"warn_info"`
59
 }
59
 }
60
+type ResultTwo10265 struct {
61
+	ErrMsg      string `json:"err_msg"`
62
+	InfRefmsgid string `json:"inf_refmsgid"`
63
+	Infcode     string `json:"infcode"`
64
+	Output      struct {
65
+		Baseinfo struct {
66
+			Age         float64 `json:"age"`
67
+			Brdy        string  `json:"brdy"`
68
+			Certno      string  `json:"certno"`
69
+			Gend        string  `json:"gend"`
70
+			Naty        string  `json:"naty"`
71
+			PsnCertType string  `json:"psn_cert_type"`
72
+			PsnName     string  `json:"psn_name"`
73
+			PsnNo       string  `json:"psn_no"`
74
+		} `json:"baseinfo"`
75
+		Idetinfo []interface{} `json:"idetinfo"`
76
+		Iinfo    []struct {
77
+			Balc                   float64 `json:"balc"`
78
+			CvlservFlag            string  `json:"cvlserv_flag"`
79
+			EmpName                string  `json:"emp_name"`
80
+			InsuplcAdmdvs          string  `json:"insuplc_admdvs"`
81
+			Insutype               string  `json:"insutype"`
82
+			PausInsuDansuplcAdmdvs string  `json:"paus_insu_dansuplc_admdvs"`
83
+			PausInsuDate           string  `json:"paus_insu_date"`
84
+			PsnInsuDate            string  `json:"psn_insu_date"`
85
+			PsnInsuStas            string  `json:"psn_insu_stas"`
86
+			PsnType                string  `json:"psn_type"`
87
+		} `json:"insuinfo"`
88
+	} `json:"output"`
89
+	RefmsgTime  string      `json:"refmsg_time"`
90
+	RespondTime string      `json:"respond_time"`
91
+	Signtype    interface{} `json:"signtype"`
92
+	WarnInfo    interface{} `json:"warn_info"`
93
+}
94
+
60
 type ResultThree struct {
95
 type ResultThree struct {
61
 	Cainfo      interface{} `json:"cainfo"`
96
 	Cainfo      interface{} `json:"cainfo"`
62
 	ErrMsg      string      `json:"err_msg"`
97
 	ErrMsg      string      `json:"err_msg"`
72
 	Signtype    interface{} `json:"signtype"`
107
 	Signtype    interface{} `json:"signtype"`
73
 	WarnMsg     interface{} `json:"warn_msg"`
108
 	WarnMsg     interface{} `json:"warn_msg"`
74
 }
109
 }
110
+type ResultThree10265 struct {
111
+	Cainfo      interface{} `json:"cainfo"`
112
+	ErrMsg      string      `json:"err_msg"`
113
+	InfRefmsgid string      `json:"inf_refmsgid"`
114
+	Infcode     string      `json:"infcode"`
115
+	Output      struct {
116
+		Result struct {
117
+			MdtrtID string `json:"mdtrt_id"`
118
+		} `json:"result"`
119
+	} `json:"output"`
120
+	RefmsgTime  string      `json:"refmsg_time"`
121
+	RespondTime string      `json:"respond_time"`
122
+	Signtype    interface{} `json:"signtype"`
123
+	WarnMsg     interface{} `json:"warn_msg"`
124
+}
125
+
75
 type ResultFour struct {
126
 type ResultFour struct {
76
 	Cainfo      string `json:"cainfo"`
127
 	Cainfo      string `json:"cainfo"`
77
 	ErrMsg      string `json:"err_msg"`
128
 	ErrMsg      string `json:"err_msg"`
105
 	Signtype    string `json:"signtype"`
156
 	Signtype    string `json:"signtype"`
106
 	WarnMsg     string `json:"warn_msg"`
157
 	WarnMsg     string `json:"warn_msg"`
107
 }
158
 }
159
+type ResultFour10265 struct {
160
+	Cainfo      string `json:"cainfo"`
161
+	ErrMsg      string `json:"err_msg"`
162
+	InfRefmsgid string `json:"inf_refmsgid"`
163
+	Infcode     string `json:"infcode"`
164
+	Output      struct {
165
+		Result []struct {
166
+			BasMednFlag      string  `json:"bas_medn_flag"`
167
+			ChldMedcFlag     string  `json:"chld_medc_flag"`
168
+			ChrgitmLv        string  `json:"chrgitm_lv"`
169
+			Cnt              float64 `json:"cnt"`
170
+			DetItemFeeSumamt float64 `json:"det_item_fee_sumamt"`
171
+			DrtReimFlag      string  `json:"drt_reim_flag"`
172
+			FeedetlSn        string  `json:"feedetl_sn"`
173
+			FulamtOwnpayAmt  float64 `json:"fulamt_ownpay_amt"`
174
+			HiNegoDrugFlag   string  `json:"hi_nego_drug_flag"`
175
+			InscpScpAmt      float64 `json:"inscp_scp_amt"`
176
+			ListSpItemFlag   string  `json:"list_sp_item_flag"`
177
+			LmtUsedFlag      string  `json:"lmt_used_flag"`
178
+			MedChrgitmType   string  `json:"med_chrgitm_type"`
179
+			Memo             string  `json:"memo"`
180
+			OverlmtAmt       float64 `json:"overlmt_amt"`
181
+			PreselfpayAmt    float64 `json:"preselfpay_amt"`
182
+			Pric             float64 `json:"pric"`
183
+			PricUplmtAmt     float64 `json:"pric_uplmt_amt"`
184
+			SelfpayProp      float64 `json:"selfpay_prop"`
185
+		} `json:"result"`
186
+	} `json:"output"`
187
+	RefmsgTime  string `json:"refmsg_time"`
188
+	RespondTime string `json:"respond_time"`
189
+	Signtype    string `json:"signtype"`
190
+	WarnMsg     string `json:"warn_msg"`
191
+}
192
+
108
 type ResultFive struct {
193
 type ResultFive struct {
109
 	Balc                   float64 `json:"balc"`
194
 	Balc                   float64 `json:"balc"`
110
 	CvlservFlag            string  `json:"cvlserv_flag"`
195
 	CvlservFlag            string  `json:"cvlserv_flag"`
174
 	Signtype    interface{} `json:"signtype"`
259
 	Signtype    interface{} `json:"signtype"`
175
 	WarnMsg     interface{} `json:"warn_msg"`
260
 	WarnMsg     interface{} `json:"warn_msg"`
176
 }
261
 }
262
+type ResultSeven10265 struct {
263
+	Cainfo      string `json:"cainfo"`
264
+	ErrMsg      string `json:"err_msg"`
265
+	InfRefmsgid string `json:"inf_refmsgid"`
266
+	Infcode     string `json:"infcode"`
267
+	Output      struct {
268
+		Setldetail []interface{} `json:"setldetail"`
269
+		Setlinfo   struct {
270
+			AcctMulaidPay   float64 `json:"acct_mulaid_pay"`
271
+			AcctPay         float64 `json:"acct_pay"`
272
+			ActPayDedc      float64 `json:"act_pay_dedc"`
273
+			Age             float64 `json:"age"`
274
+			Balc            float64 `json:"balc"`
275
+			Brdy            string  `json:"brdy"`
276
+			Certno          string  `json:"certno"`
277
+			ClrOptins       string  `json:"clr_optins"`
278
+			ClrType         string  `json:"clr_type"`
279
+			ClrWay          string  `json:"clr_way"`
280
+			CvlservFlag     string  `json:"cvlserv_flag"`
281
+			CvlservPay      float64 `json:"cvlserv_pay"`
282
+			FulamtOwnpayAmt float64 `json:"fulamt_ownpay_amt"`
283
+			FundPaySumamt   float64 `json:"fund_pay_sumamt"`
284
+			Gend            string  `json:"gend"`
285
+			HifesPay        float64 `json:"hifes_pay"`
286
+			HifmiPay        float64 `json:"hifmi_pay"`
287
+			HifpPay         float64 `json:"hifp_pay"`
288
+			HospPartAmt     float64 `json:"hosp_part_amt"`
289
+			InscpScpAmt     float64 `json:"inscp_scp_amt"`
290
+			Insutype        string  `json:"insutype"`
291
+			MafPay          float64 `json:"maf_pay"`
292
+			MdtrtCertType   string  `json:"mdtrt_cert_type"`
293
+			HifobPay        float64 `json:"hifob_pay"`
294
+
295
+			MdtrtID         string  `json:"mdtrt_id"`
296
+			MedType         string  `json:"med_type"`
297
+			MedfeeSumamt    float64 `json:"medfee_sumamt"`
298
+			MedinsSetlID    string  `json:"medins_setl_id"`
299
+			Naty            string  `json:"naty"`
300
+			OthPay          float64 `json:"oth_pay"`
301
+			OverlmtSelfpay  float64 `json:"overlmt_selfpay"`
302
+			PoolPropSelfpay float64 `json:"pool_prop_selfpay"`
303
+			PreselfpayAmt   float64 `json:"preselfpay_amt"`
304
+			PsnCashPay      float64 `json:"psn_cash_pay"`
305
+			PsnCertType     string  `json:"psn_cert_type"`
306
+			PsnName         string  `json:"psn_name"`
307
+			PsnNo           string  `json:"psn_no"`
308
+			PsnPartAmt      float64 `json:"psn_part_amt"`
309
+			PsnType         string  `json:"psn_type"`
310
+			SetlID          string  `json:"setl_id"`
311
+			SetlTime        string  `json:"setl_time"`
312
+		} `json:"setlinfo"`
313
+	} `json:"output"`
314
+	RefmsgTime  string      `json:"refmsg_time"`
315
+	RespondTime string      `json:"respond_time"`
316
+	Signtype    interface{} `json:"signtype"`
317
+	WarnMsg     interface{} `json:"warn_msg"`
318
+}
319
+
177
 type ResultSixteen struct {
320
 type ResultSixteen struct {
178
 	Cainfo      string `json:"cainfo"`
321
 	Cainfo      string `json:"cainfo"`
179
 	ErrMsg      string `json:"err_msg"`
322
 	ErrMsg      string `json:"err_msg"`
216
 	Signtype    interface{} `json:"signtype"`
359
 	Signtype    interface{} `json:"signtype"`
217
 	WarnMsg     interface{} `json:"warn_msg"`
360
 	WarnMsg     interface{} `json:"warn_msg"`
218
 }
361
 }
362
+type ResultSixteen10265 struct {
363
+	Cainfo      string `json:"cainfo"`
364
+	ErrMsg      string `json:"err_msg"`
365
+	InfRefmsgid string `json:"inf_refmsgid"`
366
+	Infcode     string `json:"infcode"`
367
+	Output      struct {
368
+		Setldetail []interface{} `json:"setldetail"`
369
+		Setlinfo   struct {
370
+			MdtrtID         string  `json:"mdtrt_id"`
371
+			SetlID          string  `json:"setl_id"`
372
+			ClrOptins       string  `json:"clr_optins"`
373
+			SetlTime        string  `json:"setl_time"`
374
+			MedfeeSumamt    float64 `json:"medfee_sumamt"`
375
+			FulamtOwnpayAmt float64 `json:"fulamt_ownpay_amt"`
376
+			OverlmtSelfpay  float64 `json:"overlmt_selfpay"`
377
+			PreselfpayAmt   float64 `json:"preselfpay_amt"`
378
+			InscpScpAmt     float64 `json:"inscp_scp_amt"`
379
+			ActPayDedc      float64 `json:"act_pay_dedc"`
380
+			HifpPay         float64 `json:"hifp_pay"`
381
+			PoolPropSe      float64 `json:"pool_prop_selfpay"`
382
+			Lfpay           float64 `json:"selfpay"`
383
+			CvlservPay      float64 `json:"cvlserv_pay"`
384
+			HifesPay        float64 `json:"hifes_pay"`
385
+			HifmiPay        float64 `json:"hifmi_pay"`
386
+			HifobPay        float64 `json:"hifob_pay"`
387
+			MafPay          float64 `json:"maf_pay"`
388
+			OthPay          float64 `json:"oth_pay"`
389
+			FundPaySumamt   float64 `json:"fund_pay_sumamt"`
390
+			PsnPartAmt      float64 `json:"psn_part_amt"`
391
+			AcctPay         float64 `json:"acct_pay"`
392
+			Balc            float64 `json:"balc"`
393
+			AcctMulaidPay   float64 `json:"acct_mulaid_pay"`
394
+			HospPartAmt     float64 `json:"hosp_part_amt"`
395
+			MedinsSetlID    string  `json:"medins_setl_id"`
396
+			PdnCashPay      string  `json:"pdn_cash_pay"`
397
+		} `json:"setlinfo"`
398
+	} `json:"output"`
399
+	RefmsgTime  string      `json:"refmsg_time"`
400
+	RespondTime string      `json:"respond_time"`
401
+	Signtype    interface{} `json:"signtype"`
402
+	WarnMsg     interface{} `json:"warn_msg"`
403
+}
219
 
404
 
220
 type Custom struct {
405
 type Custom struct {
221
 	DetItemFeeSumamt string
406
 	DetItemFeeSumamt string
241
 	Signtype    interface{} `json:"signtype"`
426
 	Signtype    interface{} `json:"signtype"`
242
 	WarnMsg     interface{} `json:"warn_msg"`
427
 	WarnMsg     interface{} `json:"warn_msg"`
243
 }
428
 }
429
+type ResultEmpty10265 struct {
430
+	Cainfo      interface{} `json:"cainfo"`
431
+	ErrMsg      string      `json:"err_msg"`
432
+	InfRefmsgid string      `json:"inf_refmsgid"`
433
+	Infcode     string      `json:"infcode"`
434
+	Output      struct {
435
+	} `json:"output"`
436
+	RefmsgTime  string      `json:"refmsg_time"`
437
+	RespondTime string      `json:"respond_time"`
438
+	Signtype    interface{} `json:"signtype"`
439
+	WarnMsg     interface{} `json:"warn_msg"`
440
+}
244
 
441
 
245
 type CustomResult struct {
442
 type CustomResult struct {
246
 	BasMednFlag      string  `json:"bas_medn_flag"`
443
 	BasMednFlag      string  `json:"bas_medn_flag"`
302
 
499
 
303
 		userJSONBytes, _ := json.Marshal(dat)
500
 		userJSONBytes, _ := json.Marshal(dat)
304
 		var res ResultTwo
501
 		var res ResultTwo
305
-		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
306
-			utils.ErrorLog("解析失败:%v", err)
307
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
308
-			return
502
+		var resTwo10265 ResultTwo10265
503
+
504
+		if miConfig.Code == "H15049901371" {
505
+			if err := json.Unmarshal(userJSONBytes, &resTwo10265); err != nil {
506
+				utils.ErrorLog("解析失败:%v", err)
507
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
508
+				return
509
+			}
510
+
511
+			Infcode, _ := strconv.ParseInt(resTwo10265.Infcode, 10, 64)
512
+			res.Infcode = Infcode
513
+			res.ErrMsg = resTwo10265.ErrMsg
514
+			res.Output = resTwo10265.Output
515
+			res.InfRefmsgid = resTwo10265.InfRefmsgid
516
+			res.RespondTime = resTwo10265.RespondTime
517
+			res.WarnInfo = resTwo10265.WarnInfo
518
+
519
+		} else {
520
+			if err := json.Unmarshal(userJSONBytes, &res); err != nil {
521
+				utils.ErrorLog("解析失败:%v", err)
522
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
523
+				return
524
+			}
525
+
309
 		}
526
 		}
310
 
527
 
311
 		var insutypes []string
528
 		var insutypes []string
312
-
313
 		var insutype string
529
 		var insutype string
314
 		var is390 int = 0
530
 		var is390 int = 0
315
 		var is310 int = 0
531
 		var is310 int = 0
337
 		if is310 == 1 {
553
 		if is310 == 1 {
338
 			insutype = "310"
554
 			insutype = "310"
339
 		}
555
 		}
340
-
341
 		if len(insutypes) == 0 {
556
 		if len(insutypes) == 0 {
342
 			insutype = "310"
557
 			insutype = "310"
343
 		}
558
 		}
344
-
345
 		if res.Infcode != 0 {
559
 		if res.Infcode != 0 {
346
 			c.ServeSuccessJSON(map[string]interface{}{
560
 			c.ServeSuccessJSON(map[string]interface{}{
347
 				"failed_code": -10,
561
 				"failed_code": -10,
354
 				"insutype":    insutype,
568
 				"insutype":    insutype,
355
 			})
569
 			})
356
 		}
570
 		}
357
-
358
 	}
571
 	}
359
 }
572
 }
360
 
573
 
422
 		fmt.Println(err)
635
 		fmt.Println(err)
423
 	}
636
 	}
424
 	userJSONBytes, _ := json.Marshal(dat)
637
 	userJSONBytes, _ := json.Marshal(dat)
638
+	//
639
+	//var res2 ResultTwo
640
+	//if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
641
+	//	utils.ErrorLog("解析失败:%v", err)
642
+	//	c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
643
+	//	return
644
+	//}
645
+
425
 	var res2 ResultTwo
646
 	var res2 ResultTwo
426
-	if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
427
-		utils.ErrorLog("解析失败:%v", err)
428
-		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
429
-		return
647
+	var resTwo10265 ResultTwo10265
648
+
649
+	if miConfig.Code == "H15049901371" {
650
+		if err := json.Unmarshal(userJSONBytes, &resTwo10265); err != nil {
651
+			utils.ErrorLog("解析失败:%v", err)
652
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
653
+			return
654
+		}
655
+
656
+		Infcode, _ := strconv.ParseInt(resTwo10265.Infcode, 10, 64)
657
+		res2.Infcode = Infcode
658
+		res2.ErrMsg = resTwo10265.ErrMsg
659
+		res2.Output = resTwo10265.Output
660
+		res2.InfRefmsgid = resTwo10265.InfRefmsgid
661
+		res2.RespondTime = resTwo10265.RespondTime
662
+		res2.WarnInfo = resTwo10265.WarnInfo
663
+
664
+	} else {
665
+		if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
666
+			utils.ErrorLog("解析失败:%v", err)
667
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
668
+			return
669
+		}
670
+
430
 	}
671
 	}
431
 
672
 
432
 	if res2.Infcode == 0 {
673
 	if res2.Infcode == 0 {
477
 		struct2401.Insutype = strconv.FormatInt(int64(social_type), 10)
718
 		struct2401.Insutype = strconv.FormatInt(int64(social_type), 10)
478
 		struct2401.MdtrtCertType = "02"
719
 		struct2401.MdtrtCertType = "02"
479
 		struct2401.MdtrtCertNo = res2.Output.Baseinfo.Certno
720
 		struct2401.MdtrtCertNo = res2.Output.Baseinfo.Certno
480
-		struct2401.MedType = strconv.FormatInt(int64(med_type), 10)
721
+		if miConfig.Code == "H15049901371" {
722
+			if med_type == 14 {
723
+				struct2401.MedType = "990502"
724
+			} else if med_type == 11 {
725
+				struct2401.MedType = "11"
726
+
727
+			}
728
+
729
+		} else {
730
+			struct2401.MedType = strconv.FormatInt(int64(med_type), 10)
731
+		}
481
 		struct2401.IptNo = ipt_otp_no
732
 		struct2401.IptNo = ipt_otp_no
482
 		struct2401.AtddrNo = strconv.FormatInt(int64(doctorInfo.AdminUserId), 10)
733
 		struct2401.AtddrNo = strconv.FormatInt(int64(doctorInfo.AdminUserId), 10)
483
 		struct2401.ChfpdrName = doctorInfo.UserName
734
 		struct2401.ChfpdrName = doctorInfo.UserName
527
 		}
778
 		}
528
 		userJSONBytes, _ := json.Marshal(dat)
779
 		userJSONBytes, _ := json.Marshal(dat)
529
 		var res ResultThree
780
 		var res ResultThree
530
-		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
531
-			utils.ErrorLog("解析失败:%v", err)
532
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
533
-			return
781
+		var resThree10265 ResultThree10265
782
+
783
+		if miConfig.Code == "H15049901371" {
784
+
785
+			if err := json.Unmarshal(userJSONBytes, &resThree10265); err != nil {
786
+				utils.ErrorLog("解析失败:%v", err)
787
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
788
+				return
789
+			}
790
+
791
+			Infcode, _ := strconv.ParseInt(resThree10265.Infcode, 10, 64)
792
+			res.Infcode = Infcode
793
+			res.ErrMsg = resThree10265.ErrMsg
794
+			res.Output = resThree10265.Output
795
+			res.InfRefmsgid = resThree10265.InfRefmsgid
796
+			res.RespondTime = resThree10265.RespondTime
797
+
798
+		} else {
799
+
800
+			if err := json.Unmarshal(userJSONBytes, &res); err != nil {
801
+				utils.ErrorLog("解析失败:%v", err)
802
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
803
+				return
804
+			}
805
+
534
 		}
806
 		}
807
+
535
 		if res.Infcode == 0 {
808
 		if res.Infcode == 0 {
536
 			Iinfos, _ := json.Marshal(res2.Output.Iinfo)
809
 			Iinfos, _ := json.Marshal(res2.Output.Iinfo)
537
 			Idetinfos, _ := json.Marshal(res2.Output.Idetinfo)
810
 			Idetinfos, _ := json.Marshal(res2.Output.Idetinfo)
689
 	}
962
 	}
690
 	userJSONBytes, _ := json.Marshal(dat)
963
 	userJSONBytes, _ := json.Marshal(dat)
691
 	var res ResultEmpty
964
 	var res ResultEmpty
692
-	if err := json.Unmarshal(userJSONBytes, &res); err != nil {
693
-		utils.ErrorLog("解析失败:%v", err)
694
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
695
-		return
965
+	var resEmpty10265 ResultEmpty10265
966
+
967
+	if miConfig.Code == "H15049901371" {
968
+
969
+		if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
970
+			utils.ErrorLog("解析失败:%v", err)
971
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
972
+			return
973
+		}
974
+		Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
975
+		res.Infcode = Infcode
976
+		res.RespondTime = resEmpty10265.RespondTime
977
+		res.ErrMsg = resEmpty10265.ErrMsg
978
+		res.Output = resEmpty10265.Output
979
+		res.WarnMsg = resEmpty10265.WarnMsg
980
+
981
+	} else {
982
+		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
983
+			utils.ErrorLog("解析失败:%v", err)
984
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
985
+			return
986
+		}
696
 	}
987
 	}
697
 
988
 
698
 	if res.Infcode == 0 {
989
 	if res.Infcode == 0 {
809
 	userJSONBytes, _ := json.Marshal(dat)
1100
 	userJSONBytes, _ := json.Marshal(dat)
810
 
1101
 
811
 	var res ResultSeven
1102
 	var res ResultSeven
812
-	if err := json.Unmarshal(userJSONBytes, &res); err != nil {
813
-		utils.ErrorLog("解析失败:%v", err)
814
-		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
815
-		return
1103
+	var resSeven10265 ResultSeven10265
1104
+	if miConfig.Code == "H15049901371" {
1105
+
1106
+		if err := json.Unmarshal(userJSONBytes, &resSeven10265); err != nil {
1107
+			utils.ErrorLog("解析失败:%v", err)
1108
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1109
+			return
1110
+		}
1111
+		Infcode, _ := strconv.ParseInt(resSeven10265.Infcode, 10, 64)
1112
+		res.Infcode = Infcode
1113
+		res.InfRefmsgid = resSeven10265.InfRefmsgid
1114
+		res.RespondTime = resSeven10265.RespondTime
1115
+		res.ErrMsg = resSeven10265.ErrMsg
1116
+		res.Output = resSeven10265.Output
1117
+		res.WarnMsg = resSeven10265.WarnMsg
1118
+		res.Cainfo = resSeven10265.Cainfo
1119
+
1120
+	} else {
1121
+		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1122
+			utils.ErrorLog("解析失败:%v", err)
1123
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1124
+			return
1125
+		}
1126
+
816
 	}
1127
 	}
817
 
1128
 
818
 	if res.Infcode != 0 {
1129
 	if res.Infcode != 0 {
990
 	} else {
1301
 	} else {
991
 		data["dept_code"] = department.Number
1302
 		data["dept_code"] = department.Number
992
 	}
1303
 	}
993
-	data["med_type"] = strconv.FormatInt(record.MedType, 10)
1304
+	if miConfig.Code == "H15049901371" {
1305
+		if record.MedType == 14 {
1306
+			data["med_type"] = "990502"
1307
+
1308
+		} else if record.MedType == 11 {
1309
+
1310
+			data["med_type"] = strconv.FormatInt(record.MedType, 10)
1311
+
1312
+		}
1313
+
1314
+	} else {
1315
+
1316
+		data["med_type"] = strconv.FormatInt(record.MedType, 10)
1317
+
1318
+	}
994
 	data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
1319
 	data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
995
 	data["mdtrtarea_admvs"] = miConfig.MdtrtareaAdmvs
1320
 	data["mdtrtarea_admvs"] = miConfig.MdtrtareaAdmvs
996
 	data["secret_key"] = miConfig.SecretKey
1321
 	data["secret_key"] = miConfig.SecretKey
1118
 			respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
1443
 			respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
1119
 			userJSONBytes, _ := json.Marshal(respJSON)
1444
 			userJSONBytes, _ := json.Marshal(respJSON)
1120
 			var res ResultFour
1445
 			var res ResultFour
1121
-			if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1122
-				utils.ErrorLog("解析失败:%v", err)
1123
-				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1124
-				return
1446
+			var resFour10265 ResultFour10265
1447
+			if miConfig.Code == "H15049901371" {
1448
+				if err := json.Unmarshal(userJSONBytes, &resFour10265); err != nil {
1449
+					utils.ErrorLog("解析失败:%v", err)
1450
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1451
+					return
1452
+				}
1453
+				res.WarnMsg = resFour10265.WarnMsg
1454
+				res.Output = resFour10265.Output
1455
+				res.ErrMsg = resFour10265.ErrMsg
1456
+				res.RespondTime = resFour10265.RespondTime
1457
+				res.InfRefmsgid = resFour10265.InfRefmsgid
1458
+				Infcode, _ := strconv.ParseInt(resFour10265.Infcode, 10, 64)
1459
+				res.Infcode = Infcode
1460
+
1461
+			} else {
1462
+				if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1463
+					utils.ErrorLog("解析失败:%v", err)
1464
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1465
+					return
1466
+				}
1125
 			}
1467
 			}
1126
 
1468
 
1127
 			if res.Infcode == 0 {
1469
 			if res.Infcode == 0 {
1358
 		userJSONBytes, _ := json.Marshal(dat)
1700
 		userJSONBytes, _ := json.Marshal(dat)
1359
 
1701
 
1360
 		var res ResultSixteen
1702
 		var res ResultSixteen
1361
-		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1362
-			utils.ErrorLog("解析失败:%v", err)
1363
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1364
-			return
1703
+		var resSixteen ResultSixteen10265
1704
+		if miConfig.Code == "H15049901371" {
1705
+			if err := json.Unmarshal(userJSONBytes, &resSixteen); err != nil {
1706
+				utils.ErrorLog("解析失败:%v", err)
1707
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1708
+				return
1709
+			}
1710
+			res.Cainfo = resSixteen.Cainfo
1711
+			res.WarnMsg = resSixteen.WarnMsg
1712
+			res.Output = resSixteen.Output
1713
+			res.ErrMsg = resSixteen.ErrMsg
1714
+			res.RespondTime = resSixteen.RespondTime
1715
+			Infcode, _ := strconv.ParseInt(resSixteen.Infcode, 10, 64)
1716
+			res.Infcode = Infcode
1717
+
1718
+		} else {
1719
+
1720
+			if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1721
+				utils.ErrorLog("解析失败:%v", err)
1722
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1723
+				return
1724
+			}
1725
+
1365
 		}
1726
 		}
1727
+
1366
 		if res.Infcode == 0 {
1728
 		if res.Infcode == 0 {
1367
 			err := service.UpdataOrderStatusThree(order_id, order.Number, adminUser.CurrentOrgId, src_resquest, result)
1729
 			err := service.UpdataOrderStatusThree(order_id, order.Number, adminUser.CurrentOrgId, src_resquest, result)
1368
 			if err == nil {
1730
 			if err == nil {
1430
 			}
1792
 			}
1431
 			userJSONBytes, _ := json.Marshal(dat)
1793
 			userJSONBytes, _ := json.Marshal(dat)
1432
 			var res2 ResultEmpty
1794
 			var res2 ResultEmpty
1433
-			if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
1434
-				utils.ErrorLog("解析失败:%v", err)
1435
-				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1436
-				return
1795
+			var resEmpty10265 ResultEmpty10265
1796
+			if miConfig.Code == "H15049901371" {
1797
+				if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
1798
+					utils.ErrorLog("解析失败:%v", err)
1799
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1800
+					return
1801
+				}
1802
+				Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
1803
+				res2.Infcode = Infcode
1804
+				res2.RespondTime = resEmpty10265.RespondTime
1805
+				res2.ErrMsg = resEmpty10265.ErrMsg
1806
+				res2.Output = resEmpty10265.Output
1807
+				res2.WarnMsg = resEmpty10265.WarnMsg
1808
+			} else {
1809
+				if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
1810
+					utils.ErrorLog("解析失败:%v", err)
1811
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1812
+					return
1813
+				}
1437
 			}
1814
 			}
1815
+
1438
 			if res2.Infcode == -1 {
1816
 			if res2.Infcode == -1 {
1439
 				isSuccess = false
1817
 				isSuccess = false
1440
 			}
1818
 			}
1476
 			userJSONBytes, _ := json.Marshal(dat)
1854
 			userJSONBytes, _ := json.Marshal(dat)
1477
 
1855
 
1478
 			var res2 ResultEmpty
1856
 			var res2 ResultEmpty
1479
-			if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
1480
-				utils.ErrorLog("解析失败:%v", err)
1481
-				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1482
-				return
1857
+			var resEmpty10265 ResultEmpty10265
1858
+			if miConfig.Code == "H15049901371" {
1859
+				if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
1860
+					utils.ErrorLog("解析失败:%v", err)
1861
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1862
+					return
1863
+				}
1864
+				Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
1865
+				res2.Infcode = Infcode
1866
+				res2.RespondTime = resEmpty10265.RespondTime
1867
+				res2.ErrMsg = resEmpty10265.ErrMsg
1868
+				res2.Output = resEmpty10265.Output
1869
+				res2.WarnMsg = resEmpty10265.WarnMsg
1870
+			} else {
1871
+				if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
1872
+					utils.ErrorLog("解析失败:%v", err)
1873
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1874
+					return
1875
+				}
1483
 			}
1876
 			}
1877
+
1484
 			if res2.Infcode == 0 {
1878
 			if res2.Infcode == 0 {
1485
 				err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, "", result)
1879
 				err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, "", result)
1486
 				if err == nil {
1880
 				if err == nil {
1535
 	}
1929
 	}
1536
 	userJSONBytes, _ := json.Marshal(dat)
1930
 	userJSONBytes, _ := json.Marshal(dat)
1537
 	var res ResultEmpty
1931
 	var res ResultEmpty
1538
-	if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1539
-		utils.ErrorLog("解析失败:%v", err)
1540
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1541
-		return
1932
+	var resEmpty10265 ResultEmpty10265
1933
+	if miConfig.Code == "H15049901371" {
1934
+		if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
1935
+			utils.ErrorLog("解析失败:%v", err)
1936
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1937
+			return
1938
+		}
1939
+		Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
1940
+		res.Infcode = Infcode
1941
+		res.RespondTime = resEmpty10265.RespondTime
1942
+		res.ErrMsg = resEmpty10265.ErrMsg
1943
+		res.Output = resEmpty10265.Output
1944
+		res.WarnMsg = resEmpty10265.WarnMsg
1945
+	} else {
1946
+		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1947
+			utils.ErrorLog("解析失败:%v", err)
1948
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1949
+			return
1950
+		}
1542
 	}
1951
 	}
1543
 
1952
 
1544
 	if res.Infcode == 0 {
1953
 	if res.Infcode == 0 {
1578
 	}
1987
 	}
1579
 	userJSONBytes, _ := json.Marshal(dat)
1988
 	userJSONBytes, _ := json.Marshal(dat)
1580
 	var res ResultEmpty
1989
 	var res ResultEmpty
1581
-	if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1582
-		utils.ErrorLog("解析失败:%v", err)
1583
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1584
-		return
1990
+	var resEmpty10265 ResultEmpty10265
1991
+	if miConfig.Code == "H15049901371" {
1992
+		if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
1993
+			utils.ErrorLog("解析失败:%v", err)
1994
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1995
+			return
1996
+		}
1997
+		Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
1998
+		res.Infcode = Infcode
1999
+		res.RespondTime = resEmpty10265.RespondTime
2000
+		res.ErrMsg = resEmpty10265.ErrMsg
2001
+		res.Output = resEmpty10265.Output
2002
+		res.WarnMsg = resEmpty10265.WarnMsg
2003
+	} else {
2004
+		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
2005
+			utils.ErrorLog("解析失败:%v", err)
2006
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2007
+			return
2008
+		}
1585
 	}
2009
 	}
1586
 
2010
 
1587
 	if res.Infcode == 0 {
2011
 	if res.Infcode == 0 {

+ 3 - 0
models/his_models.go Bestand weergeven

125
 	MzNumber               string  `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
125
 	MzNumber               string  `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
126
 	PatientInfo            string  `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
126
 	PatientInfo            string  `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
127
 	InsuplcAdmdvs          string  `gorm:"column:insuplc_admdvs" json:"insuplc_admdvs" form:"insuplc_admdvs"`
127
 	InsuplcAdmdvs          string  `gorm:"column:insuplc_admdvs" json:"insuplc_admdvs" form:"insuplc_admdvs"`
128
+	Insutype               string  `gorm:"column:insutype" json:"insutype" form:"insutype"`
128
 }
129
 }
129
 
130
 
130
 func (HisPatient) TableName() string {
131
 func (HisPatient) TableName() string {
594
 	MzNumber               string  `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
595
 	MzNumber               string  `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
595
 	PatientInfo            string  `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
596
 	PatientInfo            string  `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
596
 	Diagnosis              string  `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
597
 	Diagnosis              string  `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
598
+	Insutype               string  `gorm:"column:insutype" json:"insutype" form:"insutype"`
597
 }
599
 }
598
 
600
 
599
 func (XtHisPatient) TableName() string {
601
 func (XtHisPatient) TableName() string {
803
 	SickType               int64   `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
805
 	SickType               int64   `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
804
 	PType                  int64   `gorm:"column:p_type" json:"p_type" form:"p_type"`
806
 	PType                  int64   `gorm:"column:p_type" json:"p_type" form:"p_type"`
805
 	InsuplcAdmdvs          string  `gorm:"column:insuplc_admdvs" json:"insuplc_admdvs" form:"insuplc_admdvs"`
807
 	InsuplcAdmdvs          string  `gorm:"column:insuplc_admdvs" json:"insuplc_admdvs" form:"insuplc_admdvs"`
808
+	Insutype               string  `gorm:"column:insutype" json:"insutype" form:"insutype"`
806
 }
809
 }
807
 
810
 
808
 func (VMHisPatient) TableName() string {
811
 func (VMHisPatient) TableName() string {

+ 1 - 0
service/his_service.go Bestand weergeven

19
 	PatientId       int64              `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
19
 	PatientId       int64              `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
20
 	Number          string             `gorm:"column:number" json:"number" form:"number"`
20
 	Number          string             `gorm:"column:number" json:"number" form:"number"`
21
 	PatientInfo     string             `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
21
 	PatientInfo     string             `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
22
+	Insutype        string             `gorm:"column:insutype" json:"insutype" form:"insutype"`
22
 }
23
 }
23
 
24
 
24
 func (HisPatient) TableName() string {
25
 func (HisPatient) TableName() string {