Browse Source

Merge branch 'medicare' of liubing/wlyy2.0 into medicare

liubing 2 years ago
parent
commit
d7cb5d47c9

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalRelationDO.java

@ -43,7 +43,7 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
    private String invoiceJj;//发票打印基金应支付
    private String invoiceXj;//发票打印现金应支付
    private String invoiceZh;//发票打印账户应支付
    private String logNo;//系统跟踪号   //药柜挂号号
    private String logNo;//系统跟踪号   //药柜挂号号_处方号 与医保智业交互时 该字段只取挂号号(医保挂号、医保结算、his结算)
    private String orgCode;//医院编码
    private String regionCode;//参保地区划代码
    private String idcard;//证件号码

+ 11 - 9
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/JwService.java

@ -55,6 +55,7 @@ public class JwService {
     * @param orgCode 机构编码
     * @return
     */
    @Transactional(propagation= Propagation.NOT_SUPPORTED)
    public JSONObject getDispUnSettleFeeInfoListMultiNew(String cardNo,String orgCode){
        Map<String,String> param = new HashMap<>();
        param.put("interfaceStr","getDispUnSettleFeeInfoListMultiNew");//接口方法
@ -112,6 +113,7 @@ public class JwService {
     * @param orgCode 机构编码
     * @return
     */
    @Transactional(propagation= Propagation.NOT_SUPPORTED)
    public JSONObject getSickDispBalance(String cardNo,String orgCode){
        Map<String,String> param = new HashMap<>();
        param.put("interfaceStr","getSickDispBalance");//接口方法
@ -165,7 +167,7 @@ public class JwService {
        }
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(recipe_no);
        if (null==recipe_no){
        if (null==ylzMedicalRelationDO){
           return true;
        }
        if (ylzMedicalRelationDO.getState()==1){
@ -214,7 +216,7 @@ public class JwService {
                    YlzMedicalMxDO medicalMxDO = ylzMedicalMxDOList.get(0);
                    JSONObject insurResultTmp = new JSONObject();
                    insurResultTmp.put("visitNo",ylzMedicalRelationDO.getLogNo()); //院内挂号号
                    insurResultTmp.put("visitNo",ylzMedicalRelationDO.getLogNo().split("_")[0]); //院内挂号号
                    insurResultTmp.put("insurSettleSort",medicalMxDO.getInsurSettleSort()); //医保结算序号
                    insurResultTmp.put("setl_msgid",medicalMxDO.getSetlMsgid()); //发送方报文ID
                    insurResultTmp.put("fee_msgid",medicalMxDO.getFeeMsgid()); //费用上传发送方报文ID
@ -237,14 +239,14 @@ public class JwService {
                    insurResultTmp.put("psn_cert_type",setlinfo.get("psn_cert_type")); //人员证件类型
                    insurResultTmp.put("certno",setlinfo.get("certno")); //证件号码
                    insurResultTmp.put("gend",setlinfo.get("gend")); //性别
                    insurResultTmp.put("naty",setlinfo.get("naty")); //民族
                    insurResultTmp.put("naty",null==setlinfo.get("naty")?"":setlinfo.get("naty")); //民族
                    insurResultTmp.put("brdy",setlinfo.get("brdy")); //出生日期
                    insurResultTmp.put("age",setlinfo.get("age").toString()); //年龄
                    insurResultTmp.put("insutype","310"); //险种类型
                    insurResultTmp.put("psn_type","11"); //人员类别"
                    insurResultTmp.put("cvlserv_flag","0"); //公务员标志
                    insurResultTmp.put("insutype",ylzMedicalRelationDO.getInsuranceType()); //险种类型 //医保读卡or结算返回
                    insurResultTmp.put("psn_type",setlinfo.get("psn_type")); //人员类别" //医保结算返回
                    insurResultTmp.put("cvlserv_flag",setlinfo.get("cvlserv_flag")); //公务员标志 //医保结算返回
                    insurResultTmp.put("setl_time", setlinfo.get("setl_time"));    //结算时间
                    insurResultTmp.put("mdtrt_cert_type","03");  //就诊凭证类型
                    insurResultTmp.put("mdtrt_cert_type",setlinfo.get("mdtrt_cert_type"));  //就诊凭证类型 取医保结算返回
                    insurResultTmp.put("med_type",setlinfo.get("med_type")); //医疗类别
                    insurResultTmp.put("medfee_sumamt",setlinfo.get("medfee_sumamt").toString());  //医疗费总额
                    insurResultTmp.put("fulamt_ownpay_amt",setlinfo.get("fulamt_ownpay_amt").toString()); //全自费金额
@ -342,10 +344,10 @@ public class JwService {
        JSONObject insurVisitTmp = new JSONObject();
        insurVisitTmp.put("visit_msgid",ylzMedicalRelationDO.getVisitMsgid());//发送方报文ID"
        insurVisitTmp.put("insuplc_admdvs",ylzMedicalRelationDO.getRegionCode());//参保地医保区划【窗口冲销有用】
        insurVisitTmp.put("insutype","310");//险种类型【挂号时用的险种,医保目前以此为准】
        insurVisitTmp.put("insutype",ylzMedicalRelationDO.getInsuranceType());//医保读卡返回
        insurVisitTmp.put("mdtrt_id",ylzMedicalRelationDO.getHisSerial());//就诊ID  医保挂号接口返回
        insurVisitTmp.put("psn_no",ylzMedicalRelationDO.getPsnNo());//人员编号   医保人员基本信息获取接口返回
        insurVisitTmp.put("ipt_otp_no",ylzMedicalRelationDO.getLogNo());//门诊号
        insurVisitTmp.put("ipt_otp_no",ylzMedicalRelationDO.getLogNo().split("_")[0]);//门诊号
        insurVisitTmp.put("exp_content","");//字段扩展【应需要解决转义字符反斜杠被过滤问题,否则要将里面的扩展节点独立字段出
        sql = " select dict_code,dict_value from wlyy_hospital_sys_dict where dict_name='insurVisitInfo' ";
        AnalogFlags = jdbcTemplate.queryForList(sql);

+ 18 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedOrderService.java

@ -313,7 +313,7 @@ public class MedOrderService {
        settleTmp.put("needCharge",true);//是否需要医保结算
        settleTmp.put("needHisCharge",true);//是否需要医保结算
        settleTmp.put("medicalState",ylzMedicalRelationDO.getMedicalState());//结算方式
        settleTmp.put("RECIPE_NO",null==ylzMedicalRelationDO.getLogNo()?"":ylzMedicalRelationDO.getLogNo());//用挂号号关联,非处方号
        settleTmp.put("RECIPE_NO",null==ylzMedicalRelationDO.getLogNo()?"":ylzMedicalRelationDO.getLogNo());//用挂号号关联,非处方号 前端交互字段
        if (1==ylzMedicalRelationDO.getMedicalState()&&0.0==Double.valueOf(ylzMedicalRelationDO.getTotalAmount())){
            //费用为0的医保结算也需要当作自费处理
            settleTmp.put("medicalState",0);//结算方式
@ -405,8 +405,8 @@ public class MedOrderService {
        /**
         * 封装挂号数据
         **/
//        if (StringUtils.isBlank(ylzMedicalRelationDO.getHisSerial())){
           if (1==ylzMedicalRelationDO.getMedicalState()){
        if (StringUtils.isBlank(ylzMedicalRelationDO.getHisSerial())){
           if (1==ylzMedicalRelationDO.getMedicalState()){//费别是医保时,医保挂号流水号空则需发起门诊挂号
               if (org.apache.commons.lang3.StringUtils.isBlank(ylzMedicalRelationDO.getVisitMsgid())){
                   //无挂号发送方报文ID 不走挂号。
                   // 无发送方报文ID【用于基线门诊挂号接口,自助机fsi.terminal.register接口】
@ -427,7 +427,7 @@ public class MedOrderService {
                   }
                   inputDetail.put("mdtrt_cert_type",mdtrt_cert_type);
                   inputDetail.put("ipt_otp_no",ylzMedicalRelationDO.getLogNo());
                   inputDetail.put("ipt_otp_no",ylzMedicalRelationDO.getLogNo().split("_")[0]);
                   inputDetail.put("atddr_no",ylzMedicalRelationDO.getAtddrNo());
                   inputDetail.put("dr_name",ylzMedicalRelationDO.getDrName());
                   inputDetail.put("dept_code",ylzMedicalRelationDO.getDeptCode());
@ -456,7 +456,7 @@ public class MedOrderService {
                   }
               }
           }
//        }
        }
        result.add(settleTmp);
        return result;
    }
@ -575,7 +575,7 @@ public class MedOrderService {
            for (String key : chrgBchnoKey.keySet()) {
                resultTmp = new JSONObject();
                resultTmp.put("needCharge",true);
                resultTmp.put("recipe_no",recipe_no);
                resultTmp.put("recipe_no",recipe_no);//前端交互字段
                List<YlzMedicalMxDO> ylzMedicalMxDOSTmp = chrgBchnoKey.get(key);
                JSONObject strinObj = JSONObject.parseObject(deviceParam.get("yb_strin").toString());
                JSONObject netData = new JSONObject();
@ -908,6 +908,17 @@ public class MedOrderService {
                                                if (StringUtils.isBlank(prescription_code)){
                                                    prescription_code = RECIPE_NO;
                                                }
                                                /****************************************************
                                                 * 门诊号与处方号拼接
                                                 * 避免患者在自助机先把门诊结算后  又开了一单药品。同样的门诊号导致无法结算
                                                 * 后续与医保和his的交互需要还原成原始门诊号
                                                 * ****************************************************/
                                                if (org.apache.commons.lang3.StringUtils.isNotBlank(prescription_code)){
                                                    VISIT_NO = VISIT_NO+"_"+prescription_code;
                                                }
                                                ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(VISIT_NO);
                                                //新的记录
                                                if (null==ylzMedicalRelationDO){
@ -1024,7 +1035,7 @@ public class MedOrderService {
                                            if (newYlzRelation){
                                                ylzMedicalRelationDO.setLogNo(VISIT_NO);
                                                ylzMedicalRelationDO.setOrgCode(orgCode);
                                                ylzMedicalRelationDO.setRegionCode("350200");
                                                ylzMedicalRelationDO.setRegionCode("350200");//参保地区划代码 医保读卡返回
                                                ylzMedicalRelationDO.setIdcard(null);
                                                ylzMedicalRelationDO.setName(USER_NAME);
                                                ylzMedicalRelationDO.setCertType("01");