Prechádzať zdrojové kódy

药品与项目在处方开立的时候提示医保报销比例和医保说明

hurugang 2 rokov pred
rodič
commit
f91755170f

+ 6 - 3
src/main/java/cn/hnthyy/thmz/controller/mz/MzZdYpYshController.java

@@ -118,14 +118,14 @@ public class MzZdYpYshController {
     public Map<String, Object> getZlItemByCommonParams(@RequestParam("commonParams") String commonParams) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
-            List<Map<String,Object>> jyZdItemList = zdChargeItemService.queryZlItemByCommonParams(commonParams);
-            if (jyZdItemList == null || jyZdItemList.size() == 0) {
+            List<Map<String,Object>> zlItemList = zdChargeItemService.queryZlItemByCommonParams(commonParams);
+            if (zlItemList == null || zlItemList.size() == 0) {
                 resultMap.put("code", -1);
                 resultMap.put("message", "未查询到符合条件的诊疗");
                 return resultMap;
             }
             resultMap.put("code", 0);
-            resultMap.put("data", jyZdItemList);
+            resultMap.put("data", zlItemList);
             resultMap.put("message", "查询诊疗项目成功");
             return resultMap;
         } catch (Exception e) {
@@ -175,6 +175,9 @@ public class MzZdYpYshController {
                 if(zd.getSelfpayProp()!=null && selfpayProp.compareTo(zd.getSelfpayProp())==-1){
                     selfpayProp=zd.getSelfpayProp();
                 }
+                if (zd.getSelfpayProp() != null && zd.getSelfpayProp().compareTo(BigDecimal.ZERO) == 1) {
+                    zd.setSelfpayProp(zd.getSelfpayProp().multiply(BigDecimal.valueOf(100)).setScale(0, BigDecimal.ROUND_HALF_UP));
+                }
             }
             List<JyZdItem> jyZdItemList = jcJyItemChargeService.queryJcJyItemByCommonParams(code);
             if(jyZdItemList!=null && jyZdItemList.size()>0){

+ 6 - 1
src/main/java/cn/hnthyy/thmz/entity/his/zd/MzZdYpYsh.java

@@ -150,7 +150,7 @@ public class MzZdYpYsh {
      */
     private String infusion;
     /**
-     *
+     * 医保说明
      */
     private String ybComment;
     /**
@@ -216,4 +216,9 @@ public class MzZdYpYsh {
      * 非数据库字段   71 普通西药  91 医材  111 麻、精一  131 精二
      */
     private String ypType;
+    /**
+     * 药品自付比例 非数据库字段
+     */
+    private BigDecimal selfpayProp;
+
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/zd/ZdChargeItem.java

@@ -136,7 +136,7 @@ public class ZdChargeItem {
     private String  descriptions;
     //除外内容
     private String  excludeContent;
-    //项目内涵
+    //项目内涵 医保说明
     private String  connotation;
     //注册证编号
     private String approvalNumber;

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdChargeItemMapper.java

@@ -334,7 +334,7 @@ public interface ZdChargeItemMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "  code=rtrim(code),name,specification=charge_unit,chargeAmount=charge_amount,manufactory=yb_comment,execUnit=exec_unit,groupNo='00' ,type=3,descriptions,selfpayProp=selfpay_prop  ",
+            "  code=rtrim(code),name,specification=charge_unit,chargeAmount=charge_amount,manufactory=yb_comment,execUnit=exec_unit,groupNo='00' ,type=3,descriptions,selfpayProp=selfpay_prop,connotation  ",
             "    FROM zd_charge_item WITH(NOLOCK)   ",
             "where del_flag=0 and  class_code in ('B','C', 'D', 'E', 'G', 'F','H','I','J') and isnull(group_no,'00') <![CDATA[<>]]> '91' ",
             "<when test='commonParams!=null'>",

+ 1 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/JcJyItemChargeServiceImpl.java

@@ -112,6 +112,7 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
                 if (StringUtils.isNotBlank(j.getExecUnit())) {
                     j.setExecUnitName(zdUnitCodeService.queryDeptNameByIdInCache(j.getExecUnit()));
                 }
+
             });
         }
         return jyZdItemList;

+ 13 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/MzZdYpYshServiceImpl.java

@@ -1,8 +1,10 @@
 package cn.hnthyy.thmz.service.impl.his.zd;
 
 import cn.hnthyy.thmz.common.Constants;
+import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
 import cn.hnthyy.thmz.entity.his.zd.MzZdYpYsh;
 import cn.hnthyy.thmz.enums.UnitTypeEnum;
+import cn.hnthyy.thmz.mapper.his.yp.YpZdDictMapper;
 import cn.hnthyy.thmz.mapper.his.zd.MzZdYpYshMapper;
 import cn.hnthyy.thmz.service.his.zd.MzZdYpYshService;
 import lombok.extern.slf4j.Slf4j;
@@ -10,6 +12,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @Service
@@ -18,7 +21,9 @@ public class MzZdYpYshServiceImpl implements MzZdYpYshService {
     @SuppressWarnings("all")
     @Autowired
     private MzZdYpYshMapper mzZdYpYshMapper;
-
+    @SuppressWarnings("all")
+    @Autowired
+    private YpZdDictMapper ypZdDictMapper;
 
     @Override
     public List<MzZdYpYsh> queryMzZdYpYshByCommonParamsAndGroupNo(String commonParams, String groupNo) {
@@ -54,6 +59,13 @@ public class MzZdYpYshServiceImpl implements MzZdYpYshService {
                     m.setDrugWinDesc("1");
                     log.info("设置药品记录描述出错,药品规格是{}", m.getSpecification());
                 }
+                YpZdDict ypZdDict= ypZdDictMapper.selectYpZdDictByCodeAndSerial(m.getCode(),m.getSerial());
+                if(ypZdDict!=null){
+                    if(ypZdDict.getSelfpayProp() != null && ypZdDict.getSelfpayProp().compareTo(BigDecimal.ZERO) == 1){
+                        m.setSelfpayProp(ypZdDict.getSelfpayProp().multiply(BigDecimal.valueOf(100)).setScale(0, BigDecimal.ROUND_HALF_UP));
+                    }
+                    m.setYbComment(ypZdDict.getYbCommentNew());
+                }
             });
         }
         return mzZdYpYshes;

+ 10 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/ZdChargeItemServiceImpl.java

@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -92,9 +93,18 @@ public class ZdChargeItemServiceImpl implements ZdChargeItemService {
         if (zlList != null && zlList.size() > 0) {
             zlList.stream().forEach(j -> {
                 String execUnit=(String)j.get("execUnit");
+                String selfpayProp=(String)j.get("selfpayProp");
+                BigDecimal selfpayPropB=null;
+                if(selfpayProp!=null && StringUtils.isNotBlank(selfpayProp)){
+                    selfpayPropB=new BigDecimal(selfpayProp);
+                }
                 if (StringUtils.isNotBlank(execUnit)) {
                     j.put("execUnitName",zdUnitCodeService.queryDeptNameByIdInCache(execUnit));
                 }
+                if (selfpayPropB != null) {
+                    selfpayPropB =selfpayPropB.multiply(BigDecimal.valueOf(100)).setScale(0, BigDecimal.ROUND_HALF_UP);
+                    j.put("selfpayProp",selfpayPropB.toString());
+                }
             });
         }
         return zlList;

+ 51 - 0
src/main/resources/static/js/mz/clinic.js

@@ -6498,6 +6498,23 @@ function loadYpList(index, event) {
                 align: "center",
                 valign: 'middle',
                 //  sortable: true
+            }, {
+                field: 'selfpayProp',
+                title: '自付比例',
+                align: "center",
+                valign: 'middle',
+                // sortable: true
+                formatter: function (value, row, index) {
+                    if (value != null) {
+                        return value+'%';
+                    }
+                }
+            }, {
+                field: 'ybComment',
+                title: '医保说明',
+                align: "center",
+                valign: 'middle',
+                //  sortable: true
             }
         ],
         responseHandler: function (res) {
@@ -6979,6 +6996,23 @@ function loadZlItemList(event) {
                 align: "center",
                 valign: 'middle',
                 // sortable: true
+            }, {
+                field: 'selfpayProp',
+                title: '自付比例',
+                align: "center",
+                valign: 'middle',
+                // sortable: true
+                formatter: function (value, row, index) {
+                    if (value != null) {
+                        return value+'%';
+                    }
+                }
+            }, {
+                field: 'connotation',
+                title: '医保说明',
+                align: "center",
+                valign: 'middle',
+                //  sortable: true
             }
         ],
         responseHandler: function (res) {
@@ -7199,6 +7233,23 @@ function getJcJyItemChargeByCode(code, jcJyZltype) {
                     }
                     return value.toFixed(2);
                 }
+            }, {
+                field: 'selfpayProp',
+                title: '自付比例',
+                align: "center",
+                valign: 'middle',
+                // sortable: true
+                formatter: function (value, row, index) {
+                    if (value != null) {
+                        return value+'%';
+                    }
+                }
+            }, {
+                field: 'connotation',
+                title: '医保说明',
+                align: "center",
+                valign: 'middle',
+                //  sortable: true
             }
         ],
         responseHandler: function (res) {