|
@@ -1621,7 +1621,7 @@ func (c *HisApiController) GetUploadInfo() {
|
1621
|
1621
|
data["chrg_bchno"] = chrg_bchno
|
1622
|
1622
|
data["org_name"] = miConfig.OrgName
|
1623
|
1623
|
data["doctor"] = patientPrescription.Doctor
|
1624
|
|
- data["doctor_id"] = patientPrescription.DoctorId
|
|
1624
|
+ data["doctor_id"] = strconv.FormatInt(patientPrescription.DoctorId, 10)
|
1625
|
1625
|
|
1626
|
1626
|
data["dept"] = strconv.FormatInt(patientPrescription.Departments, 10)
|
1627
|
1627
|
|
|
@@ -1783,7 +1783,7 @@ func (c *HisApiController) GetUploadInfo() {
|
1783
|
1783
|
}
|
1784
|
1784
|
}
|
1785
|
1785
|
}
|
1786
|
|
- org, _ := service.GetOrgById(adminUser.CurrentOrgId)
|
|
1786
|
+ //org, _ := service.GetOrgById(adminUser.CurrentOrgId)
|
1787
|
1787
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, id, recordDateTime)
|
1788
|
1788
|
allTotal := fmt.Sprintf("%.2f", total)
|
1789
|
1789
|
if res.Infcode == 0 {
|
|
@@ -1794,9 +1794,9 @@ func (c *HisApiController) GetUploadInfo() {
|
1794
|
1794
|
chrg_bchno := chrg_bchno
|
1795
|
1795
|
cert_no := his.Certno
|
1796
|
1796
|
insutype := rf[0].Insutype
|
1797
|
|
- api := "http://127.0.0.1:9531/" + "gdyb/eight?cert_no=" + cert_no + "&insutype=" +
|
|
1797
|
+ api := "http://127.0.0.1:9532/" + "gdyb/eight?cert_no=" + cert_no + "&insutype=" +
|
1798
|
1798
|
insutype + "&psn_no=" + psn_no + "&chrg_bchno=" + chrg_bchno + "&mdtrt_id=" + mdtrt_id +
|
1799
|
|
- "&total=" + allTotal + "&org_name=" + org.OrgName + "&doctor=" + patientPrescription.Doctor + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
1799
|
+ "&total=" + allTotal + "&org_name=" + miConfig.OrgName + "&doctor=" + patientPrescription.Doctor + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
1800
|
1800
|
resp, requestErr := http.Get(api)
|
1801
|
1801
|
|
1802
|
1802
|
if requestErr != nil {
|
|
@@ -2073,6 +2073,7 @@ func (c *HisApiController) Refund() {
|
2073
|
2073
|
|
2074
|
2074
|
adminUser := c.GetAdminUserInfo()
|
2075
|
2075
|
theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
|
|
2076
|
+ fmt.Println(err)
|
2076
|
2077
|
if err != nil {
|
2077
|
2078
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
2078
|
2079
|
return
|
|
@@ -2086,7 +2087,7 @@ func (c *HisApiController) Refund() {
|
2086
|
2087
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
2087
|
2088
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
2088
|
2089
|
if config.IsOpen == 1 { //对接了医保,走医保流程
|
2089
|
|
- api := "http://127.0.0.1:9531/" + "gdyb/nine?psn_no=" + his.PsnNo +
|
|
2090
|
+ api := "http://127.0.0.1:9532/" + "gdyb/nine?psn_no=" + his.PsnNo +
|
2090
|
2091
|
"&mdtrt_id=" + his.Number + "&doctor=" + patientPrescription.Doctor + "&setl_id=" + order.SetlId + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
2091
|
2092
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
2092
|
2093
|
resp, requestErr := http.Get(api)
|
|
@@ -2111,7 +2112,7 @@ func (c *HisApiController) Refund() {
|
2111
|
2112
|
fmt.Println(respJSON)
|
2112
|
2113
|
fmt.Println(userJSONBytes)
|
2113
|
2114
|
|
2114
|
|
- api2 := "http://127.0.0.1:9531/" + "gdyb/six?psn_no=" + his.PsnNo +
|
|
2115
|
+ api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
|
2115
|
2116
|
"&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + patientPrescription.Doctor + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
2116
|
2117
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
2117
|
2118
|
resp2, requestErr2 := http.Get(api2)
|
|
@@ -2183,28 +2184,31 @@ func (c *HisApiController) GetCheckAccount() {
|
2183
|
2184
|
}
|
2184
|
2185
|
|
2185
|
2186
|
if config.IsOpen == 1 {
|
2186
|
|
- api := "http://127.0.0.1:9532/" + "gdyb/ten?insutype=" + insutype +
|
|
2187
|
+ api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
|
|
2188
|
+ "insutype=" + insutype +
|
2187
|
2189
|
"&clr_type=" + clr_type +
|
2188
|
2190
|
"&setl_optins=" + miConfig.OrgName +
|
2189
|
2191
|
"&stmt_begndate=" + start_time +
|
2190
|
2192
|
"&stm_enddate=" + end_time +
|
2191
|
|
- "&medfee_sumamt=" + fmt.Sprintf("%2f", medfee_sumamt) +
|
2192
|
|
- "&fund_pay_sumamt=" + fmt.Sprintf("%2f", fund_pay_sumamt) +
|
2193
|
|
- "&acct_pay=" + fmt.Sprintf("%2f", acct_pay) +
|
|
2193
|
+ "&medfee_sumamt=" + fmt.Sprintf("%.2f", medfee_sumamt) +
|
|
2194
|
+ "&fund_pay_sumamt=" + fmt.Sprintf("%.2f", fund_pay_sumamt) +
|
|
2195
|
+ "&acct_pay=" + fmt.Sprintf("%.2f", acct_pay) +
|
2194
|
2196
|
"&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt, 10) +
|
2195
|
2197
|
"&fixmedins_code=" + miConfig.Code +
|
2196
|
2198
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
|
2197
|
2199
|
"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
2198
|
2200
|
"&secret_key=" + miConfig.SecretKey +
|
2199
|
2201
|
"&org_name=" + miConfig.OrgName +
|
2200
|
|
- "&doctor="
|
|
2202
|
+ "&doctor=某人"
|
2201
|
2203
|
|
|
2204
|
+ fmt.Println(api)
|
2202
|
2205
|
resp, requestErr := http.Get(api)
|
2203
|
2206
|
if requestErr != nil {
|
2204
|
2207
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2205
|
2208
|
return
|
2206
|
2209
|
}
|
2207
|
2210
|
body, ioErr := ioutil.ReadAll(resp.Body)
|
|
2211
|
+ fmt.Println(body)
|
2208
|
2212
|
if ioErr != nil {
|
2209
|
2213
|
utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
2210
|
2214
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -2216,6 +2220,7 @@ func (c *HisApiController) GetCheckAccount() {
|
2216
|
2220
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2217
|
2221
|
return
|
2218
|
2222
|
}
|
|
2223
|
+
|
2219
|
2224
|
respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
2220
|
2225
|
userJSONBytes, _ := json.Marshal(respJSON)
|
2221
|
2226
|
|
|
@@ -2285,9 +2290,9 @@ func (c *HisApiController) GetCheckDetailAccount() {
|
2285
|
2290
|
str = item.SetlId + " " +
|
2286
|
2291
|
item.MdtrtId + " " +
|
2287
|
2292
|
item.PsnNo + " " +
|
2288
|
|
- fmt.Sprintf("%2f", item.MedfeeSumamt) + " " +
|
2289
|
|
- fmt.Sprintf("%2f", item.FundPaySumamt) + " " +
|
2290
|
|
- fmt.Sprintf("%2f", item.AcctPay) + " " + refd_setl_flag + "\n"
|
|
2293
|
+ fmt.Sprintf("%.2f", item.MedfeeSumamt) + " " +
|
|
2294
|
+ fmt.Sprintf("%.2f", item.FundPaySumamt) + " " +
|
|
2295
|
+ fmt.Sprintf("%.2f", item.AcctPay) + " " + refd_setl_flag + "\n"
|
2291
|
2296
|
_, err = f.Write([]byte(str))
|
2292
|
2297
|
}
|
2293
|
2298
|
|
|
@@ -2302,7 +2307,7 @@ func (c *HisApiController) GetCheckDetailAccount() {
|
2302
|
2307
|
"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
2303
|
2308
|
"&secret_key=" + miConfig.SecretKey +
|
2304
|
2309
|
"&org_name=" + miConfig.OrgName +
|
2305
|
|
- "&doctor="
|
|
2310
|
+ "&doctor=某人"
|
2306
|
2311
|
|
2307
|
2312
|
resp, requestErr := http.Get(api)
|
2308
|
2313
|
if requestErr != nil {
|
|
@@ -2337,9 +2342,9 @@ func (c *HisApiController) GetCheckDetailAccount() {
|
2337
|
2342
|
"&setl_optins=" + miConfig.OrgName +
|
2338
|
2343
|
"&stmt_begndate=" + start_time +
|
2339
|
2344
|
"&stm_enddate=" + end_time +
|
2340
|
|
- "&medfee_sumamt=" + fmt.Sprintf("%2f", medfee_sumamt) +
|
2341
|
|
- "&fund_pay_sumamt=" + fmt.Sprintf("%2f", fund_pay_sumamt) +
|
2342
|
|
- "&cash_payamt=" + fmt.Sprintf("%2f", psn_cash_pay) +
|
|
2345
|
+ "&medfee_sumamt=" + fmt.Sprintf("%.2f", medfee_sumamt) +
|
|
2346
|
+ "&fund_pay_sumamt=" + fmt.Sprintf("%.2f", fund_pay_sumamt) +
|
|
2347
|
+ "&cash_payamt=" + fmt.Sprintf("%.2f", psn_cash_pay) +
|
2343
|
2348
|
"&fixmedins_setl_cnt=" + strconv.FormatInt(fixmedins_setl_cnt, 10) +
|
2344
|
2349
|
"&fixmedins_code=" + miConfig.Code +
|
2345
|
2350
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
|