瀏覽代碼

门诊共济

lighter 2 年之前
父節點
當前提交
e377f57698

+ 1 - 6
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -123,12 +123,7 @@ public class MarkMtFeesController {
     @PassToken
     @PostMapping("/directRegistration")
     public Map<String, Object> directRegistration(@RequestBody SiMzBusinessParams param) {
-        if (null == param.getReadCardResult()) {
-            Map<String, Object> map = new HashMap<>();
-            map.put("code", -1);
-            map.put("msg", "读卡信息不能为空!");
-            return map;
-        }
+        log.info("门诊共济:{}", param);
         ResultVo<FundDetail> result = mzService.directRegistration(param);
         return getStringObjectMap(param, result, "医生保存处方试算", false);
     }

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -65,7 +65,7 @@ public interface SiMzDao {
             "his_item_code, fee_date, input_date, medi_item_type, charge_fee, price, quantity, drug_win, " +
             "input_staff, input_man, serial_no, yb_trans_flag, charge_type, bill_item_code) values (" +
             "#{patientId},#{times},#{receiptNo},#{orderNo},#{itemNo},#{drugName},#{chargeItemCode}," +
-            "#{priceTime},getdate(),#{mediItemType},#{chargeFee},#{price},#{quantity},#{drugWin}," +
+            "#{priceTime},#{chargeDate},#{mediItemType},#{chargeFee},#{price},#{quantity},#{drugWin}," +
             "#{doctorCode},#{doctorName},#{serialNo},0, #{groupNo},#{billItemCode})")
     void insertBatchedMtFeeInfo(MzReceipt param);
 

+ 1 - 1
src/main/java/thyyxxk/webserver/entity/markmtfees/MzReceipt.java

@@ -29,7 +29,7 @@ public class MzReceipt {
     private String drugUnit;
     private String supplyCode;
     private Integer orderDays;
-    private Date chargeDate;
+    private String chargeDate;
     /**
      * 00 项目,其他 药品
      * */

+ 9 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/setllist/PolItemInfo.java

@@ -109,4 +109,13 @@ public class PolItemInfo {
     private BigDecimal externalSelfHandleFundAmt;
     private String externalSelfHandleFundProp;
     private BigDecimal externalSelfHandleSum;
+
+    /**
+     * 政策项:门诊(无分段)
+     * */
+    private BigDecimal outpatientWfdPsnAmt;
+    private String outpatientWfdPsnProp;
+    private BigDecimal outpatientWfdFundAmt;
+    private String outpatientWfdFundProp;
+    private BigDecimal outpatientWfdSum;
 }

+ 11 - 24
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -163,6 +163,7 @@ public class SiMzService {
         receipt.setDoctorCode(detail.get("doctorCode").toString());
         receipt.setSerialNo(detail.get("serialNo").toString());
         receipt.setGroupNo(detail.get("groupNo").toString());
+        receipt.setChargeDate(detail.get("priceTime").toString().split("\\+")[0].replace("T", " "));
         receipt.setBillItemCode(detail.get("billItemCode").toString());
         receipt.setChargeBillCode(detail.get("chargeBillCode").toString());
         String table = receipt.getGroupNo().trim().equals("00") ? "zd_charge_item" : "yp_zd_dict";
@@ -226,7 +227,6 @@ public class SiMzService {
         if (receipts.size() == 0) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "请选择至少一条处方明细!");
         }
-        MzReceipt receipt = receipts.get(0);
         receipts.forEach(item -> {
             if (item.getChecked()) {
                 dao.insertBatchedMtFeeInfo(item);
@@ -404,9 +404,13 @@ public class SiMzService {
             result.put("msg", "患者没有职工医保,如需报销请走医保科流程。");
             return result;
         }
+        if (!isInsuplcAdmdvsEligible(insuInfo.getInsuplcAdmdvs())) {
+            result.put("code", -1);
+            result.put("msg", "患者参保地不满足共济要求。");
+            return result;
+        }
         psninfo.setInsutype(Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES.getCode());
         int count = dao.selectSiMzInfoCount(mzptnt.getPatNo(), mzptnt.getTimes());
-        insuInfo.setBalc("578.23");
         if (count == 0) {
             psninfo.setInsuplc(insuInfo.getInsuplcAdmdvs());
             psninfo.setPsnType(insuInfo.getPsnType());
@@ -430,28 +434,11 @@ public class SiMzService {
         return null;
     }
 
-    public Map<String, Object> mzRegister(MzPatientInfo mzptnt) {
-        SiPatInfo siPatInfo = dao.selectSiPatInfoForMz(mzptnt.getPatNo(), mzptnt.getTimes());
-        mzptnt.setInsuplcAdmdvs(siPatInfo.getInsuplcAdmdvs());
-        mzptnt.setInsutype(siPatInfo.getInsutype());
-        mzptnt.setPsnType(siPatInfo.getPsnType());
-        mzptnt.setName(siPatInfo.getPsnName());
-        mzptnt.setSocialNo(siPatInfo.getCertno());
-        ResultVo<String> regres = mzSrvc.outpatientRegistration(siMzFeeUrl, mzptnt);
-        Map<String, Object> map = new HashMap<>();
-        if (null == regres) {
-            map.put("code", -2);
-            map.put("msg", "网络异常");
-            return map;
-        }
-        if (regres.getCode() != ExceptionEnum.SUCCESS.getCode()) {
-            map.put("code", -2);
-            map.put("msg", regres.getMessage());
-            return map;
-        }
-        map.put("code", 0);
-        map.put("msg", "门诊登记成功。");
-        return map;
+    private boolean isInsuplcAdmdvsEligible(String insuplc) {
+        return insuplc.startsWith("4301") ||
+                insuplc.startsWith("4302") ||
+                insuplc.startsWith("4303") ||
+                insuplc.equals("439900");
     }
 
     public ResultVo<FundDetail> directRegistration(SiMzBusinessParams param) {

+ 7 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiQueryService.java

@@ -1087,6 +1087,13 @@ public class SiQueryService {
                     polItemInfo.setExternalSelfHandleFundProp(fundPayProp);
                     polItemInfo.setExternalSelfHandleSum(polItemPaySum);
                     break;
+                case MZWFD:
+                    polItemInfo.setOutpatientWfdPsnAmt(selfPayAmt);
+                    polItemInfo.setOutpatientWfdPsnProp(selfPayProp);
+                    polItemInfo.setOutpatientWfdFundAmt(fundPayAmt);
+                    polItemInfo.setOutpatientWfdFundProp(fundPayProp);
+                    polItemInfo.setOutpatientWfdSum(polItemPaySum);
+                    break;
             }
         }
         polItemInfo.setAllPsnAmt(selfPaySum);