|
@@ -1343,7 +1343,14 @@ func (c *HisApiController) Refund() {
|
1343
|
1343
|
recordDateTime := theTime.Unix()
|
1344
|
1344
|
his, _ := service.GetVMHisPatientInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
1345
|
1345
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
1346
|
|
- order, _ := service.GetHisOrderByID(order_id)
|
|
1346
|
+ var order models.HisOrder
|
|
1347
|
+ order, _ = service.GetHisOrderByID(order_id)
|
|
1348
|
+
|
|
1349
|
+ if order.ID == 0 {
|
|
1350
|
+ order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
|
|
1351
|
+
|
|
1352
|
+ }
|
|
1353
|
+
|
1347
|
1354
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
1348
|
1355
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
1349
|
1356
|
|
|
@@ -1524,10 +1531,17 @@ func (c *HisApiController) RefundDetail() {
|
1524
|
1531
|
recordDateTime := theTime.Unix()
|
1525
|
1532
|
his, _ := service.GetVMHisPatientInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
1526
|
1533
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
|
1527
|
|
- order, _ := service.GetHisOrderByID(order_id)
|
1528
|
1534
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
1529
|
1535
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
1530
|
1536
|
|
|
1537
|
+ var order models.HisOrder
|
|
1538
|
+ order, _ = service.GetHisOrderByID(order_id)
|
|
1539
|
+
|
|
1540
|
+ if order.ID == 0 {
|
|
1541
|
+ order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
|
|
1542
|
+
|
|
1543
|
+ }
|
|
1544
|
+
|
1531
|
1545
|
if config.IsOpen == 1 { //对接了医保,走医保流程
|
1532
|
1546
|
api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
|
1533
|
1547
|
"&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + patientPrescription.Doctor + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|