|
@@ -77,6 +77,8 @@ func HisManagerApiRegistRouters() {
|
77
|
77
|
}
|
78
|
78
|
func (c *HisApiController) GetPsnNcdsInfo() {
|
79
|
79
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
80
|
+ patient_id, _ := c.GetInt64("patient_id")
|
|
81
|
+
|
80
|
82
|
id, _ := c.GetInt64("id")
|
81
|
83
|
adminUser := c.GetAdminUserInfo()
|
82
|
84
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
|
@@ -102,25 +104,66 @@ func (c *HisApiController) GetPsnNcdsInfo() {
|
102
|
104
|
var res Result5301
|
103
|
105
|
var res10265 Result5301For10265
|
104
|
106
|
|
105
|
|
- if miConfig.Code == "H15049901371" {
|
106
|
|
- if err := json.Unmarshal(userJSONBytes, &res10265); err != nil {
|
|
107
|
+ if miConfig.MdtrtareaAdmvs == "32091" {
|
|
108
|
+ psn_info, _ := service.GetPsnByPatientId(patient_id)
|
|
109
|
+ api := "http://192.168.3.111:9532/" + "jsyb/5301?" + "fixmedins_code=" + miConfig.Code + "&secret_key=" + miConfig.SecretKey + "&ak=" + miConfig.ChannelNumber + "&org_name=" + miConfig.OrgName + "&doctor=" + role.UserName +
|
|
110
|
+ "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&psn_no=" + psn_info.PsnNo
|
|
111
|
+
|
|
112
|
+ resp, requestErr := http.Get(api)
|
|
113
|
+ if requestErr != nil {
|
|
114
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
115
|
+ return
|
|
116
|
+ }
|
|
117
|
+
|
|
118
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
119
|
+ if ioErr != nil {
|
|
120
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
121
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
122
|
+ return
|
|
123
|
+ }
|
|
124
|
+ var respJSON map[string]interface{}
|
|
125
|
+ if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
126
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
127
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
128
|
+ return
|
|
129
|
+ }
|
|
130
|
+ respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
131
|
+ result, _ := json.Marshal(respJSON)
|
|
132
|
+ if err := json.Unmarshal([]byte(result), &res10265); err != nil {
|
107
|
133
|
utils.ErrorLog("解析失败:%v", err)
|
108
|
134
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
109
|
135
|
return
|
110
|
136
|
}
|
111
|
|
- res.InfRefmsgid = res10265.InfRefmsgid
|
112
|
|
- res.Output = res10265.Output
|
113
|
137
|
res.ErrMsg = res10265.ErrMsg
|
|
138
|
+ res.Output = res10265.Output
|
|
139
|
+ res.InfRefmsgid = res10265.InfRefmsgid
|
114
|
140
|
infocode, _ := strconv.ParseInt(res10265.Infcode, 10, 64)
|
115
|
141
|
res.Infcode = infocode
|
|
142
|
+
|
116
|
143
|
} else {
|
117
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
118
|
|
- utils.ErrorLog("解析失败:%v", err)
|
119
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
120
|
|
- return
|
|
144
|
+
|
|
145
|
+ if miConfig.Code == "H15049901371" {
|
|
146
|
+ if err := json.Unmarshal(userJSONBytes, &res10265); err != nil {
|
|
147
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
148
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
149
|
+ return
|
|
150
|
+ }
|
|
151
|
+ res.InfRefmsgid = res10265.InfRefmsgid
|
|
152
|
+ res.Output = res10265.Output
|
|
153
|
+ res.ErrMsg = res10265.ErrMsg
|
|
154
|
+ infocode, _ := strconv.ParseInt(res10265.Infcode, 10, 64)
|
|
155
|
+ res.Infcode = infocode
|
|
156
|
+ } else {
|
|
157
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
158
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
159
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
160
|
+ return
|
|
161
|
+ }
|
|
162
|
+
|
121
|
163
|
}
|
122
|
164
|
|
123
|
165
|
}
|
|
166
|
+
|
124
|
167
|
if res.Infcode == 0 {
|
125
|
168
|
c.ServeSuccessJSON(map[string]interface{}{
|
126
|
169
|
"result": res.Output.Result,
|
|
@@ -3527,6 +3570,25 @@ func (c *HisApiController) GetUploadInfo() {
|
3527
|
3570
|
|
3528
|
3571
|
} else if miConfig.MdtrtareaAdmvs == "320921" {
|
3529
|
3572
|
|
|
3573
|
+ //江苏地区国家医保医疗类别
|
|
3574
|
+ //职工透析:医疗类别选特殊情况门诊9933
|
|
3575
|
+ //居民血透门慢: 医疗类别选门诊慢病1402
|
|
3576
|
+ var med_type string
|
|
3577
|
+ if his.Insutype == "310" {
|
|
3578
|
+ if reg_type == 14 {
|
|
3579
|
+ med_type = "9933"
|
|
3580
|
+ } else if reg_type == 11 {
|
|
3581
|
+ med_type = "11"
|
|
3582
|
+
|
|
3583
|
+ }
|
|
3584
|
+ } else if his.Insutype == "390" {
|
|
3585
|
+ if reg_type == 14 {
|
|
3586
|
+ med_type = "1402"
|
|
3587
|
+ } else if reg_type == 11 {
|
|
3588
|
+ med_type = "11"
|
|
3589
|
+ }
|
|
3590
|
+ }
|
|
3591
|
+
|
3530
|
3592
|
data := make(map[string]interface{})
|
3531
|
3593
|
client := &http.Client{}
|
3532
|
3594
|
data["psn_no"] = his.PsnNo
|
|
@@ -3534,7 +3596,7 @@ func (c *HisApiController) GetUploadInfo() {
|
3534
|
3596
|
data["doctor"] = roles.UserName
|
3535
|
3597
|
data["department"] = department.Name
|
3536
|
3598
|
data["org_name"] = miConfig.OrgName
|
3537
|
|
- data["med_type"] = strconv.FormatInt(reg_type, 10)
|
|
3599
|
+ data["med_type"] = med_type
|
3538
|
3600
|
data["doctor_id"] = strconv.FormatInt(doctor_info.AdminUserId, 10)
|
3539
|
3601
|
data["fixmedins_code"] = miConfig.Code
|
3540
|
3602
|
data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
|
|
@@ -4136,6 +4198,24 @@ func (c *HisApiController) GetUploadInfo() {
|
4136
|
4198
|
cert_no = bas[1]
|
4137
|
4199
|
}
|
4138
|
4200
|
|
|
4201
|
+ //江苏地区国家医保医疗类别
|
|
4202
|
+ //职工透析:医疗类别选特殊情况门诊9933
|
|
4203
|
+ //居民血透门慢: 医疗类别选门诊慢病1402
|
|
4204
|
+ var med_type string
|
|
4205
|
+ if his.Insutype == "310" {
|
|
4206
|
+ if reg_type == 14 {
|
|
4207
|
+ med_type = "9933"
|
|
4208
|
+ } else if reg_type == 11 {
|
|
4209
|
+ med_type = "11"
|
|
4210
|
+
|
|
4211
|
+ }
|
|
4212
|
+ } else if his.Insutype == "390" {
|
|
4213
|
+ if reg_type == 14 {
|
|
4214
|
+ med_type = "1402"
|
|
4215
|
+ } else if reg_type == 11 {
|
|
4216
|
+ med_type = "11"
|
|
4217
|
+ }
|
|
4218
|
+ }
|
4139
|
4219
|
//psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
|
4140
|
4220
|
|
4141
|
4221
|
api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
|
|
@@ -4144,7 +4224,7 @@ func (c *HisApiController) GetUploadInfo() {
|
4144
|
4224
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
4145
|
4225
|
"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
|
4146
|
4226
|
"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
|
4147
|
|
- "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber + "&verify_number=" + psn_info.VerifyNumber
|
|
4227
|
+ "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + med_type + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber + "&verify_number=" + psn_info.VerifyNumber
|
4148
|
4228
|
|
4149
|
4229
|
resp, requestErr := http.Get(api)
|
4150
|
4230
|
if requestErr != nil {
|
|
@@ -4500,13 +4580,32 @@ func (c *HisApiController) GetUploadInfo() {
|
4500
|
4580
|
cert_no = bas[1]
|
4501
|
4581
|
}
|
4502
|
4582
|
|
|
4583
|
+ //江苏地区国家医保医疗类别
|
|
4584
|
+ //职工透析:医疗类别选特殊情况门诊9933
|
|
4585
|
+ //居民血透门慢: 医疗类别选门诊慢病1402
|
|
4586
|
+ var med_type string
|
|
4587
|
+ if his.Insutype == "310" {
|
|
4588
|
+ if reg_type == 14 {
|
|
4589
|
+ med_type = "9933"
|
|
4590
|
+ } else if reg_type == 11 {
|
|
4591
|
+ med_type = "11"
|
|
4592
|
+
|
|
4593
|
+ }
|
|
4594
|
+ } else if his.Insutype == "390" {
|
|
4595
|
+ if reg_type == 14 {
|
|
4596
|
+ med_type = "1402"
|
|
4597
|
+ } else if reg_type == 11 {
|
|
4598
|
+ med_type = "11"
|
|
4599
|
+ }
|
|
4600
|
+ }
|
|
4601
|
+
|
4503
|
4602
|
api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
|
4504
|
4603
|
his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
|
4505
|
4604
|
"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
|
4506
|
4605
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
4507
|
4606
|
"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
|
4508
|
4607
|
"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
|
4509
|
|
- "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber + "&verify_number=" + psn_info.VerifyNumber
|
|
4608
|
+ "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + med_type + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber + "&verify_number=" + psn_info.VerifyNumber
|
4510
|
4609
|
|
4511
|
4610
|
resp, requestErr := http.Get(api)
|
4512
|
4611
|
if requestErr != nil {
|
|
@@ -5336,6 +5435,25 @@ func (c *HisApiController) GetPreUploadInfo() {
|
5336
|
5435
|
}
|
5337
|
5436
|
|
5338
|
5437
|
} else if miConfig.InsuplcAdmdvs == "320921" {
|
|
5438
|
+ //江苏地区国家医保医疗类别
|
|
5439
|
+ //职工透析:医疗类别选特殊情况门诊9933
|
|
5440
|
+ //居民血透门慢: 医疗类别选门诊慢病1402
|
|
5441
|
+ var med_type string
|
|
5442
|
+ if his.Insutype == "310" {
|
|
5443
|
+ if reg_type == 14 {
|
|
5444
|
+ med_type = "9933"
|
|
5445
|
+ } else if reg_type == 11 {
|
|
5446
|
+ med_type = "11"
|
|
5447
|
+
|
|
5448
|
+ }
|
|
5449
|
+ } else if his.Insutype == "390" {
|
|
5450
|
+ if reg_type == 14 {
|
|
5451
|
+ med_type = "1402"
|
|
5452
|
+ } else if reg_type == 11 {
|
|
5453
|
+ med_type = "11"
|
|
5454
|
+ }
|
|
5455
|
+ }
|
|
5456
|
+
|
5339
|
5457
|
data := make(map[string]interface{})
|
5340
|
5458
|
client := &http.Client{}
|
5341
|
5459
|
data["psn_no"] = his.PsnNo
|
|
@@ -5343,7 +5461,7 @@ func (c *HisApiController) GetPreUploadInfo() {
|
5343
|
5461
|
data["doctor"] = roles.UserName
|
5344
|
5462
|
data["department"] = department.Name
|
5345
|
5463
|
data["org_name"] = miConfig.OrgName
|
5346
|
|
- data["med_type"] = strconv.FormatInt(reg_type, 10)
|
|
5464
|
+ data["med_type"] = med_type
|
5347
|
5465
|
data["doctor_id"] = strconv.FormatInt(doctor_info.AdminUserId, 10)
|
5348
|
5466
|
data["fixmedins_code"] = miConfig.Code
|
5349
|
5467
|
data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
|
|
@@ -5885,13 +6003,32 @@ func (c *HisApiController) GetPreUploadInfo() {
|
5885
|
6003
|
} else {
|
5886
|
6004
|
cert_no = bas[1]
|
5887
|
6005
|
}
|
|
6006
|
+ //江苏地区国家医保医疗类别
|
|
6007
|
+ //职工透析:医疗类别选特殊情况门诊9933
|
|
6008
|
+ //居民血透门慢: 医疗类别选门诊慢病1402
|
|
6009
|
+ var med_type string
|
|
6010
|
+ if his.Insutype == "310" {
|
|
6011
|
+ if reg_type == 14 {
|
|
6012
|
+ med_type = "9933"
|
|
6013
|
+ } else if reg_type == 11 {
|
|
6014
|
+ med_type = "11"
|
|
6015
|
+
|
|
6016
|
+ }
|
|
6017
|
+ } else if his.Insutype == "390" {
|
|
6018
|
+ if reg_type == 14 {
|
|
6019
|
+ med_type = "1402"
|
|
6020
|
+ } else if reg_type == 11 {
|
|
6021
|
+ med_type = "11"
|
|
6022
|
+ }
|
|
6023
|
+ }
|
|
6024
|
+
|
5888
|
6025
|
api := "http://192.168.3.111:9532/" + "jsyb/2206?psn_no=" + his.PsnNo + "&mdtrt_id=" +
|
5889
|
6026
|
his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
|
5890
|
6027
|
"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
|
5891
|
6028
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
5892
|
6029
|
"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
|
5893
|
6030
|
"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
|
5894
|
|
- "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&verify_number=" + psn_info.VerifyNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber
|
|
6031
|
+ "&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + med_type + "&verify_number=" + psn_info.VerifyNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber
|
5895
|
6032
|
resp, requestErr := http.Get(api)
|
5896
|
6033
|
if requestErr != nil {
|
5897
|
6034
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -8687,11 +8824,37 @@ func (c *HisApiController) PsnPutNCDSOnRecord() {
|
8687
|
8824
|
doctor, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, doctor_id)
|
8688
|
8825
|
|
8689
|
8826
|
role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, doctor_id)
|
8690
|
|
- result, _ := service.Gdyb1101(patient.IdCardNo, miConfig.OrgName, role.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 2, "", "0", patient.Name)
|
8691
|
8827
|
var res ResultTwo
|
8692
|
8828
|
var res10265 ResultTwo10265
|
|
8829
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
8830
|
+ psn_info, _ := service.GetPsnByPatientId(patient.ID)
|
|
8831
|
+ api := "http://192.168.3.111:9532/" + "hbyb/1101?cert_no=" + "" +
|
|
8832
|
+ "&org_name=" + miConfig.OrgName + "&doctor=" + role.UserName + "&fixmedins_code=" + miConfig.Code +
|
|
8833
|
+ "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(3, 10) + "&card_sn=" + "" + "&certificates=" + strconv.FormatInt(1, 10) + "&url=" + miConfig.Url + "&ak=" + miConfig.ChannelNumber + "&verify_number=" + psn_info.VerifyNumber
|
|
8834
|
+ resp, requestErr := http.Get(api)
|
|
8835
|
+ if requestErr != nil {
|
|
8836
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8837
|
+ return
|
|
8838
|
+ }
|
|
8839
|
+
|
|
8840
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
8841
|
+ if ioErr != nil {
|
|
8842
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
8843
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8844
|
+ return
|
|
8845
|
+ }
|
|
8846
|
+ var respJSON map[string]interface{}
|
|
8847
|
+ if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
8848
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
8849
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8850
|
+ return
|
|
8851
|
+ }
|
|
8852
|
+
|
|
8853
|
+ respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
8854
|
+ result, _ := json.Marshal(respJSON)
|
|
8855
|
+ fmt.Println("log")
|
|
8856
|
+ fmt.Println(string(result))
|
8693
|
8857
|
|
8694
|
|
- if miConfig.Code == "H15049901371" {
|
8695
|
8858
|
if err := json.Unmarshal([]byte(result), &res10265); err != nil {
|
8696
|
8859
|
utils.ErrorLog("解析失败:%v", err)
|
8697
|
8860
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -8704,12 +8867,28 @@ func (c *HisApiController) PsnPutNCDSOnRecord() {
|
8704
|
8867
|
res.InfRefmsgid = res10265.InfRefmsgid
|
8705
|
8868
|
|
8706
|
8869
|
} else {
|
8707
|
|
- if err := json.Unmarshal([]byte(result), &res); err != nil {
|
8708
|
|
- utils.ErrorLog("解析失败:%v", err)
|
8709
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
8710
|
|
- return
|
|
8870
|
+ result, _ := service.Gdyb1101(patient.IdCardNo, miConfig.OrgName, role.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 2, "", "0", patient.Name)
|
|
8871
|
+ if miConfig.Code == "H15049901371" {
|
|
8872
|
+ if err := json.Unmarshal([]byte(result), &res10265); err != nil {
|
|
8873
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8874
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8875
|
+ return
|
|
8876
|
+ }
|
|
8877
|
+ res.ErrMsg = res10265.ErrMsg
|
|
8878
|
+ infocode, _ := strconv.ParseInt(res10265.Infcode, 10, 64)
|
|
8879
|
+ res.Infcode = infocode
|
|
8880
|
+ res.Output = res10265.Output
|
|
8881
|
+ res.InfRefmsgid = res10265.InfRefmsgid
|
|
8882
|
+ } else {
|
|
8883
|
+ if err := json.Unmarshal([]byte(result), &res); err != nil {
|
|
8884
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8885
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8886
|
+ return
|
|
8887
|
+ }
|
8711
|
8888
|
}
|
|
8889
|
+
|
8712
|
8890
|
}
|
|
8891
|
+
|
8713
|
8892
|
Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
8714
|
8893
|
infoStr := string(Iinfos)
|
8715
|
8894
|
var rf []*ResultFive
|
|
@@ -8770,36 +8949,37 @@ func (c *HisApiController) PsnPutNCDSOnRecord() {
|
8770
|
8949
|
}
|
8771
|
8950
|
}
|
8772
|
8951
|
fmt.Println(insuplc_admdvs)
|
8773
|
|
-
|
|
8952
|
+ var res2 ResultThirteen
|
|
8953
|
+ var res10265_2 ResultThirteen10265
|
8774
|
8954
|
if config.IsOpen == 1 {
|
8775
|
|
- result := service.Gdyb2503(psn_no, insutype, miConfig.OrgName, doctor.UserName, miConfig.Code, strconv.FormatInt(doctor.ID, 10), insuplc_admdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sick.ClassName, sick.ContentCode, start_time, end_time, check_time)
|
8776
|
|
- var dat map[string]interface{}
|
8777
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
8778
|
|
- fmt.Println(dat)
|
8779
|
|
- } else {
|
8780
|
|
- fmt.Println(err)
|
8781
|
|
- }
|
8782
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
8783
|
|
- var res2 ResultThirteen
|
8784
|
|
- var res10265 ResultThirteen10265
|
8785
|
|
-
|
8786
|
|
- if miConfig.Code == "H15049901371" {
|
8787
|
|
- if err := json.Unmarshal(userJSONBytes, &res10265); err != nil {
|
8788
|
|
- utils.ErrorLog("解析失败:%v", err)
|
8789
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
8790
|
|
- return
|
8791
|
|
- }
|
8792
|
|
- res2.ErrMsg = res10265.ErrMsg
|
8793
|
|
- infocode, _ := strconv.ParseInt(res10265.Infcode, 10, 64)
|
8794
|
|
- res2.Infcode = infocode
|
8795
|
|
- res2.Output = res10265.Output
|
8796
|
|
- res2.InfRefmsgid = res10265.InfRefmsgid
|
|
8955
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
8797
|
8956
|
|
8798
|
8957
|
} else {
|
8799
|
|
- if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
8800
|
|
- utils.ErrorLog("解析失败:%v", err)
|
8801
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
8802
|
|
- return
|
|
8958
|
+ result := service.Gdyb2503(psn_no, insutype, miConfig.OrgName, doctor.UserName, miConfig.Code, strconv.FormatInt(doctor.ID, 10), insuplc_admdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sick.ClassName, sick.ContentCode, start_time, end_time, check_time)
|
|
8959
|
+ var dat map[string]interface{}
|
|
8960
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
8961
|
+ fmt.Println(dat)
|
|
8962
|
+ } else {
|
|
8963
|
+ fmt.Println(err)
|
|
8964
|
+ }
|
|
8965
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
8966
|
+ if miConfig.Code == "H15049901371" {
|
|
8967
|
+ if err := json.Unmarshal(userJSONBytes, &res10265_2); err != nil {
|
|
8968
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8969
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8970
|
+ return
|
|
8971
|
+ }
|
|
8972
|
+ res2.ErrMsg = res10265_2.ErrMsg
|
|
8973
|
+ infocode, _ := strconv.ParseInt(res10265_2.Infcode, 10, 64)
|
|
8974
|
+ res2.Infcode = infocode
|
|
8975
|
+ res2.Output = res10265_2.Output
|
|
8976
|
+ res2.InfRefmsgid = res10265_2.InfRefmsgid
|
|
8977
|
+ } else {
|
|
8978
|
+ if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
|
8979
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8980
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8981
|
+ return
|
|
8982
|
+ }
|
8803
|
8983
|
}
|
8804
|
8984
|
}
|
8805
|
8985
|
|