|
@@ -1976,26 +1976,28 @@ func (c *HisApiController) GetRegisterInfo() {
|
1976
|
1976
|
|
1977
|
1977
|
var rf []*ResultFive
|
1978
|
1978
|
json.Unmarshal([]byte(his.Iinfo), &rf)
|
1979
|
|
- var insutypes []string
|
|
1979
|
+ var insutypes []*ResultFive
|
1980
|
1980
|
var insutype string
|
|
1981
|
+ var insuplc_admdvs string
|
1981
|
1982
|
var is390 int = 0
|
1982
|
1983
|
var is310 int = 0
|
1983
|
1984
|
|
1984
|
1985
|
for _, item := range rf {
|
1985
|
1986
|
if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
|
1986
|
|
- insutypes = append(insutypes, item.Insutype)
|
|
1987
|
+ insutypes = append(insutypes, item)
|
1987
|
1988
|
}
|
1988
|
1989
|
}
|
1989
|
1990
|
|
1990
|
1991
|
if len(insutypes) == 1 {
|
1991
|
|
- insutype = insutypes[0]
|
|
1992
|
+ insutype = insutypes[0].Insutype
|
|
1993
|
+ //insuplc_admdvs = insutypes[0].InsuplcAdmdvs
|
1992
|
1994
|
} else {
|
1993
|
1995
|
for _, i := range insutypes {
|
1994
|
|
- if i == "390" {
|
|
1996
|
+ if i.Insutype == "390" {
|
1995
|
1997
|
is390 = 1
|
1996
|
1998
|
}
|
1997
|
1999
|
|
1998
|
|
- if i == "310" {
|
|
2000
|
+ if i.Insutype == "310" {
|
1999
|
2001
|
is310 = 1
|
2000
|
2002
|
}
|
2001
|
2003
|
}
|
|
@@ -2015,12 +2017,16 @@ func (c *HisApiController) GetRegisterInfo() {
|
2015
|
2017
|
if len(insutypes) == 2 {
|
2016
|
2018
|
insutype = med_type
|
2017
|
2019
|
}
|
2018
|
|
-
|
|
2020
|
+ for _, item := range rf {
|
|
2021
|
+ if item.Insutype == insutype {
|
|
2022
|
+ insuplc_admdvs = item.InsuplcAdmdvs
|
|
2023
|
+ }
|
|
2024
|
+ }
|
2019
|
2025
|
var resThree ResultThree
|
2020
|
2026
|
if miConfig.MdtrtareaAdmvs == "421300" {
|
2021
|
2027
|
api := "http://192.168.124.4:9532/" + "hbyb/2201?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + Certno + "&ipt_otp_no=" + ipt_otp_no +
|
2022
|
2028
|
"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
|
2023
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_id
|
|
2029
|
+ "&insuplc_admdvs=" + insuplc_admdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_id
|
2024
|
2030
|
resp, requestErr := http.Get(api)
|
2025
|
2031
|
if requestErr != nil {
|
2026
|
2032
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -2053,7 +2059,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
2053
|
2059
|
|
2054
|
2060
|
} else {
|
2055
|
2061
|
fmt.Println(roles.UserName)
|
2056
|
|
- result, requestLog := service.Gdyb2201(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_id, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName)
|
|
2062
|
+ result, requestLog := service.Gdyb2201(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_id, insuplc_admdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName)
|
2057
|
2063
|
saveLog(result, requestLog, "2201", "挂号")
|
2058
|
2064
|
if err := json.Unmarshal([]byte(result), &resThree); err != nil {
|
2059
|
2065
|
utils.ErrorLog("解析失败:%v", err)
|
|
@@ -2090,6 +2096,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
2090
|
2096
|
his.UserOrgId = adminInfo.CurrentOrgId
|
2091
|
2097
|
his.Ctime = time.Now().Unix()
|
2092
|
2098
|
his.Mtime = time.Now().Unix()
|
|
2099
|
+ his.InsuplcAdmdvs = insuplc_admdvs
|
2093
|
2100
|
his.Status = 1
|
2094
|
2101
|
service.UpdateHisPatientStatus(&his)
|
2095
|
2102
|
service.UpdateHisPrescriptionHisID(his.ID, patient.ID, recordDateTime, adminInfo.CurrentOrgId)
|
|
@@ -2241,7 +2248,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2241
|
2248
|
data["med_type"] = strconv.FormatInt(reg_type, 10)
|
2242
|
2249
|
data["doctor_id"] = strconv.FormatInt(doctor_info.AdminUserId, 10)
|
2243
|
2250
|
data["fixmedins_code"] = miConfig.Code
|
2244
|
|
- data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
|
|
2251
|
+ data["insuplc_admdvs"] = his.InsuplcAdmdvs
|
2245
|
2252
|
data["mdtrtarea_admvs"] = miConfig.MdtrtareaAdmvs
|
2246
|
2253
|
data["secret_key"] = miConfig.SecretKey
|
2247
|
2254
|
data["sick_code"] = sickConfig.CountryCode
|
|
@@ -2278,9 +2285,9 @@ func (c *HisApiController) GetUploadInfo() {
|
2278
|
2285
|
|
2279
|
2286
|
} else {
|
2280
|
2287
|
if miConfig.InsuplcAdmdvs == "440781" { //
|
2281
|
|
- result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
|
2288
|
+ result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
2282
|
2289
|
} else {
|
2283
|
|
- result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
|
2290
|
+ result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
2284
|
2291
|
}
|
2285
|
2292
|
saveLog(result, requestLog, "2203", "上传就诊信息")
|
2286
|
2293
|
var respJSON2 map[string]interface{}
|
|
@@ -2321,13 +2328,18 @@ func (c *HisApiController) GetUploadInfo() {
|
2321
|
2328
|
} else {
|
2322
|
2329
|
his.Diagnosis = diagnosis_id
|
2323
|
2330
|
his.SickType = sickConfig.ID
|
2324
|
|
- his.PType = fmt.Sprintf("%d", reg_type)
|
|
2331
|
+ var p_type int64
|
|
2332
|
+ if reg_type == 1111 || reg_type == 1112 {
|
|
2333
|
+ p_type = 11
|
|
2334
|
+
|
|
2335
|
+ }
|
|
2336
|
+ his.PType = fmt.Sprintf("%d", p_type)
|
2325
|
2337
|
service.UpdateHisPatientThree(&his)
|
2326
|
2338
|
|
2327
|
2339
|
data := make(map[string]interface{})
|
2328
|
2340
|
if settle_accounts_type == 1 { //日结
|
2329
|
2341
|
|
2330
|
|
- if reg_type == 11 {
|
|
2342
|
+ if reg_type == 11 || reg_type == 1111 || reg_type == 1112 {
|
2331
|
2343
|
prescriptions, _ = service.GetPrescriptionByIds(ids_arr, adminUser.CurrentOrgId)
|
2332
|
2344
|
} else {
|
2333
|
2345
|
prescriptions, _ = service.GetNewHisPrescription(adminUser.CurrentOrgId, his_patient_id, recordDateTime, strconv.Itoa(int(reg_type)))
|
|
@@ -2359,10 +2371,6 @@ func (c *HisApiController) GetUploadInfo() {
|
2359
|
2371
|
|
2360
|
2372
|
}
|
2361
|
2373
|
|
2362
|
|
- if reg_type == 1111 || reg_type == 1112 {
|
2363
|
|
- reg_type = 11
|
2364
|
|
- }
|
2365
|
|
-
|
2366
|
2374
|
timestamp := time.Now().Unix()
|
2367
|
2375
|
tempTime := time.Unix(timestamp, 0)
|
2368
|
2376
|
timeFormat := tempTime.Format("20060102150405")
|
|
@@ -2385,7 +2393,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2385
|
2393
|
data["dept_code"] = department.Number
|
2386
|
2394
|
}
|
2387
|
2395
|
|
2388
|
|
- data["insuplc_admdvs"] = miConfig.InsuplcAdmdvs
|
|
2396
|
+ data["insuplc_admdvs"] = his.InsuplcAdmdvs
|
2389
|
2397
|
data["mdtrtarea_admvs"] = miConfig.MdtrtareaAdmvs
|
2390
|
2398
|
data["secret_key"] = miConfig.SecretKey
|
2391
|
2399
|
data["balance_accounts_type"] = strconv.FormatInt(his.BalanceAccountsType, 10)
|
|
@@ -2428,7 +2436,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2428
|
2436
|
}
|
2429
|
2437
|
|
2430
|
2438
|
} else {
|
2431
|
|
- result, request_log := service.Gdyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, data["dept"].(string), data["fixmedins_code"].(string), data["dept_code"].(string), data["doctor_id"].(string), miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, data["balance_accounts_type"].(string))
|
|
2439
|
+ result, request_log := service.Gdyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, data["dept"].(string), data["fixmedins_code"].(string), data["dept_code"].(string), data["doctor_id"].(string), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, data["balance_accounts_type"].(string))
|
2432
|
2440
|
var dat map[string]interface{}
|
2433
|
2441
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2434
|
2442
|
fmt.Println(dat)
|
|
@@ -2636,7 +2644,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2636
|
2644
|
api := "http://192.168.124.4:9532/" + "hbyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
|
2637
|
2645
|
his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
|
2638
|
2646
|
"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
|
2639
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
|
2647
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
2640
|
2648
|
"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
|
2641
|
2649
|
"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
|
2642
|
2650
|
"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
|
|
@@ -2670,7 +2678,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2670
|
2678
|
}
|
2671
|
2679
|
|
2672
|
2680
|
} else {
|
2673
|
|
- 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)
|
|
2681
|
+ 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, 0, 0, 0, 0, his.IdType, acct_used_flag)
|
2674
|
2682
|
var dat map[string]interface{}
|
2675
|
2683
|
if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
2676
|
2684
|
fmt.Println(dat)
|
|
@@ -2889,7 +2897,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2889
|
2897
|
api := "http://192.168.124.4:9532/" + "hbyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
|
2890
|
2898
|
his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
|
2891
|
2899
|
"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
|
2892
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
|
2900
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
|
2893
|
2901
|
"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
|
2894
|
2902
|
"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
|
2895
|
2903
|
"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
|
|
@@ -2925,7 +2933,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2925
|
2933
|
|
2926
|
2934
|
} else {
|
2927
|
2935
|
|
2928
|
|
- 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)
|
|
2936
|
+ 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)
|
2929
|
2937
|
var dat map[string]interface{}
|
2930
|
2938
|
if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
2931
|
2939
|
fmt.Println(dat)
|
|
@@ -3716,7 +3724,7 @@ func (c *HisApiController) GetPreUploadInfo() {
|
3716
|
3724
|
|
3717
|
3725
|
data := make(map[string]interface{})
|
3718
|
3726
|
if settle_accounts_type == 1 { //日结
|
3719
|
|
- if reg_type == 11 {
|
|
3727
|
+ if reg_type == 11 || reg_type == 1111 || reg_type == 1112 {
|
3720
|
3728
|
prescriptions, _ = service.GetPrescriptionByIds(ids_arr, adminUser.CurrentOrgId)
|
3721
|
3729
|
} else {
|
3722
|
3730
|
prescriptions, _ = service.GetNewHisPrescription(adminUser.CurrentOrgId, his_patient_id, recordDateTime, strconv.Itoa(int(reg_type)))
|
|
@@ -3745,10 +3753,6 @@ func (c *HisApiController) GetPreUploadInfo() {
|
3745
|
3753
|
data["pre"] = prescriptions
|
3746
|
3754
|
}
|
3747
|
3755
|
|
3748
|
|
- if reg_type == 1111 || reg_type == 1112 {
|
3749
|
|
- reg_type = 11
|
3750
|
|
- }
|
3751
|
|
-
|
3752
|
3756
|
client := &http.Client{}
|
3753
|
3757
|
data["psn_no"] = his.PsnNo
|
3754
|
3758
|
data["mdtrt_id"] = his.Number
|
|
@@ -4391,9 +4395,10 @@ func (c *HisApiController) Refund() {
|
4391
|
4395
|
// return
|
4392
|
4396
|
//}
|
4393
|
4397
|
//recordDateTime := theTime.Unix()
|
4394
|
|
- //his, _ := service.GetVMHisPatientInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
4395
|
4398
|
var order models.HisOrder
|
4396
|
4399
|
order, _ = service.GetHisOrderByID(order_id)
|
|
4400
|
+ his, _ := service.GetHisPatientByNumber(order.MdtrtId)
|
|
4401
|
+
|
4397
|
4402
|
roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
4398
|
4403
|
if order.ID == 0 {
|
4399
|
4404
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
@@ -4410,7 +4415,7 @@ func (c *HisApiController) Refund() {
|
4410
|
4415
|
if miConfig.MdtrtareaAdmvs == "421300" {
|
4411
|
4416
|
api3 := "http://192.168.124.4:9532/" + "hbyb/2208?psn_no=" + order.PsnNo +
|
4412
|
4417
|
"&mdtrt_id=" + order.MdtrtId + "&setl_id=" + order.SetlId + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
4413
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
4418
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
4414
|
4419
|
resp3, requestErr3 := http.Get(api3)
|
4415
|
4420
|
if requestErr3 != nil {
|
4416
|
4421
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -4440,7 +4445,7 @@ func (c *HisApiController) Refund() {
|
4440
|
4445
|
}
|
4441
|
4446
|
|
4442
|
4447
|
} else {
|
4443
|
|
- result, src_resquest = service.Gdyb2208(order.PsnNo, order.MdtrtId, order.SetlId, miConfig.OrgName, roles.UserName, miConfig.SecretKey, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
|
|
4448
|
+ result, src_resquest = service.Gdyb2208(order.PsnNo, order.MdtrtId, order.SetlId, miConfig.OrgName, roles.UserName, miConfig.SecretKey, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
|
4444
|
4449
|
var dat map[string]interface{}
|
4445
|
4450
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4446
|
4451
|
fmt.Println(dat)
|
|
@@ -4463,7 +4468,7 @@ func (c *HisApiController) Refund() {
|
4463
|
4468
|
|
4464
|
4469
|
api3 := "http://192.168.124.4:9532/" + "hbyb/2205?psn_no=" + order.PsnNo +
|
4465
|
4470
|
"&mdtrt_id=" + order.MdtrtId + "&chrg_bchno=" + order.Number + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
4466
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
4471
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
4467
|
4472
|
resp3, requestErr3 := http.Get(api3)
|
4468
|
4473
|
if requestErr3 != nil {
|
4469
|
4474
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -4494,7 +4499,7 @@ func (c *HisApiController) Refund() {
|
4494
|
4499
|
|
4495
|
4500
|
} else {
|
4496
|
4501
|
|
4497
|
|
- result2, src_request := service.Gdyb2205(order.PsnNo, order.MdtrtId, order.Number, miConfig.OrgName, roles.UserName, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code)
|
|
4502
|
+ result2, src_request := service.Gdyb2205(order.PsnNo, order.MdtrtId, order.Number, miConfig.OrgName, roles.UserName, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code)
|
4498
|
4503
|
var dat map[string]interface{}
|
4499
|
4504
|
if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
4500
|
4505
|
fmt.Println(dat)
|
|
@@ -4577,7 +4582,7 @@ func (c *HisApiController) RefundNumber() {
|
4577
|
4582
|
|
4578
|
4583
|
api3 := "http://192.168.124.4:9532/" + "hbyb/2202?psn_no=" + his.PsnNo +
|
4579
|
4584
|
"&mdtrt_id=" + his.Number + "&ipt_otp_no=" + his.IptOtpNo + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
4580
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
4585
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
4581
|
4586
|
resp3, requestErr3 := http.Get(api3)
|
4582
|
4587
|
if requestErr3 != nil {
|
4583
|
4588
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -4611,7 +4616,7 @@ func (c *HisApiController) RefundNumber() {
|
4611
|
4616
|
|
4612
|
4617
|
api3 := "http://127.0.0.1:9532/" + "gdyb/three?psn_no=" + his.PsnNo +
|
4613
|
4618
|
"&mdtrt_id=" + his.Number + "&ipt_otp_no=" + his.IptOtpNo + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
4614
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
4619
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
4615
|
4620
|
resp3, requestErr3 := http.Get(api3)
|
4616
|
4621
|
if requestErr3 != nil {
|
4617
|
4622
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -4676,7 +4681,7 @@ func (c *HisApiController) RefundNumber() {
|
4676
|
4681
|
}
|
4677
|
4682
|
func (c *HisApiController) RefundDetail() {
|
4678
|
4683
|
order_id, _ := c.GetInt64("order_id")
|
4679
|
|
- his_patient_id, _ := c.GetInt64("his_patient_id")
|
|
4684
|
+ //his_patient_id, _ := c.GetInt64("his_patient_id")
|
4680
|
4685
|
|
4681
|
4686
|
number := c.GetString("number")
|
4682
|
4687
|
record_time := c.GetString("record_time")
|
|
@@ -4691,7 +4696,8 @@ func (c *HisApiController) RefundDetail() {
|
4691
|
4696
|
return
|
4692
|
4697
|
}
|
4693
|
4698
|
recordDateTime := theTime.Unix()
|
4694
|
|
- his, _ := service.GetNewVMHisPatientInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
|
|
4699
|
+ //his, _ := service.GetNewVMHisPatientInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
|
|
4700
|
+
|
4695
|
4701
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
4696
|
4702
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
4697
|
4703
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
|
@@ -4703,11 +4709,12 @@ func (c *HisApiController) RefundDetail() {
|
4703
|
4709
|
order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
|
4704
|
4710
|
|
4705
|
4711
|
}
|
|
4712
|
+ his, _ := service.GetHisPatientByNumber(order.MdtrtId)
|
4706
|
4713
|
|
4707
|
4714
|
if config.IsOpen == 1 { //对接了医保,走医保流程
|
4708
|
4715
|
api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
|
4709
|
4716
|
"&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + patientPrescription.Doctor + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
4710
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
4717
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
4711
|
4718
|
resp2, requestErr2 := http.Get(api2)
|
4712
|
4719
|
if requestErr2 != nil {
|
4713
|
4720
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -5339,7 +5346,7 @@ func (c *HisApiController) GetSettleAccounts() {
|
5339
|
5346
|
baseParams := models.BaseParams{
|
5340
|
5347
|
SecretKey: miConfig.SecretKey,
|
5341
|
5348
|
FixmedinsCode: miConfig.Code,
|
5342
|
|
- InsuplcAdmdvs: miConfig.InsuplcAdmdvs,
|
|
5349
|
+ InsuplcAdmdvs: his.InsuplcAdmdvs,
|
5343
|
5350
|
MdtrtareaAdmvs: miConfig.MdtrtareaAdmvs,
|
5344
|
5351
|
OrgName: miConfig.OrgName,
|
5345
|
5352
|
Doctor: user_name,
|
|
@@ -5356,7 +5363,7 @@ func (c *HisApiController) GetSettleAccounts() {
|
5356
|
5363
|
|
5357
|
5364
|
api := "http://192.168.124.4:9532/" + "hbyb/5203?psn_no=" + businessParams.PsnNo + "&mdtrt_id=" + businessParams.MdtrtId + "&setl_id=" + businessParams.SetlId +
|
5358
|
5365
|
"&org_name=" + miConfig.OrgName + "&doctor=" + baseParams.Doctor + "&fixmedins_code=" + miConfig.Code +
|
5359
|
|
- "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
|
5366
|
+ "&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
5360
|
5367
|
resp, requestErr := http.Get(api)
|
5361
|
5368
|
if requestErr != nil {
|
5362
|
5369
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|