Procházet zdrojové kódy

门诊统筹自费承诺书打印与提示

hurugang před 2 roky
rodič
revize
e594f017c8

+ 9 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -80,7 +80,8 @@ public class MzChargeDetailController {
     private YpZdDrugKindService ypZdDrugKindService;
     @Autowired
     private MzDepositFileService mzDepositFileService;
-
+    @Autowired
+    private MzVisitTableService mzVisitTableService;
     /**
      * 查询费用列表
      *
@@ -1875,6 +1876,13 @@ public class MzChargeDetailController {
                 results.put("selfPayList", selfPayList);
                 StringBuilder stringBuilder = new StringBuilder();
                 int countYbZf = mzPatientMiService.queryCountYbZf(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes());
+                if(countYbZf>0){
+                    MzVisitTable mzVisitTable = mzVisitTableService.queryByPatientIdAndTimes(patientId, times);
+                    if (mzVisitTable == null) {
+                        throw new MzException("病人就诊记录不存在!");
+                    }
+                    results.put("icdText", mzVisitTable.getIcdTextNew());
+                }
                 for (MzChargeDetail mz : mzChargeDetailList) {
                     if (Arrays.asList(Constants.TC, Constants.SSWRF).contains(mz.getBillItemCode())) {
                         continue;

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

@@ -118,7 +118,7 @@ public class MzZdYpYshController {
     public Map<String, Object> getZlItemByCommonParams(@RequestParam("commonParams") String commonParams) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
-            List<JyZdItem> jyZdItemList = zdChargeItemService.queryZlItemByCommonParams(commonParams);
+            List<Map<String,Object>> jyZdItemList = zdChargeItemService.queryZlItemByCommonParams(commonParams);
             if (jyZdItemList == null || jyZdItemList.size() == 0) {
                 resultMap.put("code", -1);
                 resultMap.put("message", "未查询到符合条件的诊疗");
@@ -169,8 +169,12 @@ public class MzZdYpYshController {
             resultMap.put("code", 0);
             resultMap.put("data", zdChargeItemList);
             BigDecimal totalAmount =BigDecimal.ZERO;
+            BigDecimal selfpayProp=BigDecimal.ZERO;
             for (ZdChargeItem zd:zdChargeItemList){
                 totalAmount=totalAmount.add(zd.getTotalAmount()==null?BigDecimal.ZERO:zd.getTotalAmount());
+                if(zd.getSelfpayProp()!=null && selfpayProp.compareTo(zd.getSelfpayProp())==-1){
+                    selfpayProp=zd.getSelfpayProp();
+                }
             }
             List<JyZdItem> jyZdItemList = jcJyItemChargeService.queryJcJyItemByCommonParams(code);
             if(jyZdItemList!=null && jyZdItemList.size()>0){
@@ -178,6 +182,7 @@ public class MzZdYpYshController {
                 resultMap.put("name", jyZdItemList.get(0).getName());
             }
             resultMap.put("totalAmount", totalAmount);
+            resultMap.put("selfpayProp", selfpayProp);
             resultMap.put("message", "查询诊疗与医技项目明细成功");
             return resultMap;
         } catch (Exception e) {

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

@@ -1,6 +1,5 @@
 package cn.hnthyy.thmz.mapper.his.zd;
 
-import cn.hnthyy.thmz.entity.his.zd.JyZdItem;
 import cn.hnthyy.thmz.entity.his.zd.ZdChargeItem;
 import cn.hnthyy.thmz.pageDto.ZdChargeItemDto;
 import org.apache.ibatis.annotations.Insert;
@@ -9,6 +8,7 @@ import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 
 import java.util.List;
+import java.util.Map;
 
 public interface ZdChargeItemMapper {
 
@@ -328,7 +328,7 @@ public interface ZdChargeItemMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "  code=rtrim(code),name,specification=charge_unit,charge_amount,manufactory=yb_comment,exec_unit,group_no='00' ,type=3,descriptions  ",
+            "  code=rtrim(code),name,specification=charge_unit,chargeAmount=charge_amount,manufactory=yb_comment,execUnit=exec_unit,groupNo='00' ,type=3,descriptions,selfpayProp=selfpay_prop  ",
             "    FROM zd_charge_item WITH(NOLOCK)   ",
             "where del_flag=0 and  class_code in ('B','C', 'D', 'E', 'G', 'F','H','I','J')",
             "<when test='commonParams!=null'>",
@@ -337,7 +337,7 @@ public interface ZdChargeItemMapper {
             "</when>",
           /*  " order by stock_amount_virtual desc",*/
             "</script>"})
-    List<JyZdItem> selectZlByCommonParams(@Param("commonParams") String commonParams, @Param("pageSize") Integer pageSize);
+    List<Map<String,Object>> selectZlByCommonParams(@Param("commonParams") String commonParams, @Param("pageSize") Integer pageSize);
 
     /**
      * 取消延时改价

+ 2 - 2
src/main/java/cn/hnthyy/thmz/service/his/zd/ZdChargeItemService.java

@@ -1,10 +1,10 @@
 package cn.hnthyy.thmz.service.his.zd;
 
-import cn.hnthyy.thmz.entity.his.zd.JyZdItem;
 import cn.hnthyy.thmz.entity.his.zd.ZdChargeItem;
 import cn.hnthyy.thmz.pageDto.ZdChargeItemDto;
 
 import java.util.List;
+import java.util.Map;
 
 public interface ZdChargeItemService {
 
@@ -90,5 +90,5 @@ public interface ZdChargeItemService {
      * @param commonParams
      * @return
      */
-    List<JyZdItem> queryZlItemByCommonParams(String commonParams);
+    List<Map<String,Object>> queryZlItemByCommonParams(String commonParams);
 }

+ 7 - 5
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/ZdChargeItemServiceImpl.java

@@ -1,6 +1,5 @@
 package cn.hnthyy.thmz.service.impl.his.zd;
 
-import cn.hnthyy.thmz.entity.his.zd.JyZdItem;
 import cn.hnthyy.thmz.entity.his.zd.ZdChargeItem;
 import cn.hnthyy.thmz.enums.YesNoEnum;
 import cn.hnthyy.thmz.mapper.his.zd.ZdChargeItemMapper;
@@ -13,6 +12,8 @@ import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+
 @Service
 public class ZdChargeItemServiceImpl implements ZdChargeItemService {
     @SuppressWarnings("all")
@@ -77,7 +78,7 @@ public class ZdChargeItemServiceImpl implements ZdChargeItemService {
     }
 
     @Override
-    public List<JyZdItem> queryZlItemByCommonParams(String commonParams) {
+    public List<Map<String,Object>> queryZlItemByCommonParams(String commonParams) {
         //Integer pageSize =2000;
         Integer pageSize = 30;
         if (StringUtils.isBlank(commonParams)) {
@@ -87,11 +88,12 @@ public class ZdChargeItemServiceImpl implements ZdChargeItemService {
         if (StringUtils.isNotBlank(commonParams)) {
             commonParams = "%" + commonParams + "%";
         }
-        List<JyZdItem> zlList = zdChargeItemMapper.selectZlByCommonParams(commonParams, pageSize);
+        List<Map<String,Object>> zlList = zdChargeItemMapper.selectZlByCommonParams(commonParams, pageSize);
         if (zlList != null && zlList.size() > 0) {
             zlList.stream().forEach(j -> {
-                if (StringUtils.isNotBlank(j.getExecUnit())) {
-                    j.setExecUnitName(zdUnitCodeService.queryDeptNameByIdInCache(j.getExecUnit()));
+                String execUnit=(String)j.get("execUnit");
+                if (StringUtils.isNotBlank(execUnit)) {
+                    j.put("execUnitName",zdUnitCodeService.queryDeptNameByIdInCache(execUnit));
                 }
             });
         }

+ 31 - 8
src/main/resources/static/js/mz/clinic.js

@@ -6169,6 +6169,23 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
     });
 }
 
+/**
+ * 药品与项目自费信息提示
+ * @param res
+ * @param projectDesc
+ */
+function hintProjectSelfPayInfo(selfpayProp,projectDesc) {
+    if (selfpayProp != null) {
+        selfpayProp = Number(selfpayProp);
+        if (selfpayProp > 0) {
+            var titile = "当前项目含自费"+projectDesc+",请与患者提前确认是否继续使用,并签署自费承诺书!";
+            if (selfpayProp < 1) {
+                titile = "当前项目含部分自费"+projectDesc+",请与患者提前确认是否继续使用,并签署自费承诺书!";
+            }
+           warningMesageSimaple(titile);
+        }
+    }
+}
 
 /**
  * 按照药品的编码 和药品拆零规格查询药品信息 中药
@@ -6195,6 +6212,7 @@ function checkZyInfo(code, serial, async) {
             }
             if (res.code == 0) {
                 if (res.data != null) {
+                    hintProjectSelfPayInfo(res.data.selfpayProp,"药品");
                     //如果
                     if ($("#zyTab").find("li") == null || $("#zyTab").find("li").length == 0) {
                         initNavTabs(1);
@@ -6470,6 +6488,7 @@ function loadZlItemList(event) {
             };
         },
         onClickRow: function (row, $element) {
+            hintProjectSelfPayInfo(row.selfpayProp,"诊疗");
             $('#zlItem').webuiPopover('hide');
             $("#zlExecUnit").selectpicker('val', row.execUnit);//默认不选中
             $("#zlExecUnit").selectpicker('refresh');
@@ -6501,7 +6520,7 @@ function loadZlItemList(event) {
  * 诊疗与医技选中
  * @param code
  * @param name 回写的时候可以设置null
- * @param type  1 检验 2 检查  3 诊疗
+ * @param type  1 检验 2 检查
  * @param async  当用户操作的时候 true 异步, 范文和处方回写的时候false同步 因为需要等数据加载完才能设置对应的值
  */
 //function checkJcJyItemInfo(code, name, type) {
@@ -6526,6 +6545,7 @@ function checkJcJyItemInfo(code, name, type, async) {
             }
             if (res.code == 0) {
                 if (res.data != null) {
+                    hintProjectSelfPayInfo(res.selfpayProp,type==1?"检验":"辅助检查");
                     //如果
                     if ($("#jcjyTab").find("li") == null || $("#jcjyTab").find("li").length == 0) {
                         initNavTabs(2);
@@ -7035,6 +7055,7 @@ function autoAddGroupId(res) {
  * @param groupNo
  */
 function fitWesternMedicine(res, groupNo) {
+    hintProjectSelfPayInfo(res.data.selfpayProp,"药品");
     autoAddGroupId(res);
     $("#categoriesFlag").val(res.data.categoriesFlag);
     //prevCategoriesFlag = res.data.categoriesFlag;
@@ -7111,12 +7132,6 @@ function fitWesternMedicine(res, groupNo) {
     }
     $("#manufactoryName").val(res.data.manufactoryName);
     $("#specification").val(res.data.specification);
-    // if (groupNo == "91") {
-    //     //医材
-    //     $("#gross").removeAttr("readonly")
-    // } else {
-    //     $("#gross").attr("readonly", "readonly");
-    // }
     calculate();
     $("#western_medicine_name").focus();
 }
@@ -8918,11 +8933,12 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                     //LODOP.SET_PRINT_STYLE("FontSize", 8); //字体大小
                     var strStyle = "<style>table{width: 96%;} table,td,th {}</style>";
                     var mzPatientMi = res.mzPatientMi;
+                    var deptName=res.deptName;
                     $("#patientNamePrescription").text(mzPatientMi.name);
                     $("#patientGenderPrescription").text(mzPatientMi.gender);
                     $("#patientAgePrescription").text(mzPatientMi.ageString);
                     $("#patientIdPrescription").text(mzPatientMi.patientId);
-                    $("#deptPrescription").text(res.deptName);
+                    $("#deptPrescription").text(deptName);
                     $("#doctorPrescription").text(res.doctorName);
                     $("#cfTime").text(res.opDate);
                     $("#socialNo").text(mzPatientMi.socialNo);
@@ -9228,6 +9244,12 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             if (res.code == 0) {
                                 var selfPayList=res.selfPayList;
                                 if(selfPayList!=null && selfPayList.length>0){
+                                    $("#patientNameSelfPay").text(mzPatientMi.name);
+                                    $("#patientGenderSelfPay").text(mzPatientMi.gender);
+                                    $("#patientAgeSelfPay").text(mzPatientMi.ageString);
+                                    $("#patientIdSelfPay").text(mzPatientMi.patientId);
+                                    $("#deptSelfPay").text(deptName);
+                                    $("#zdSelfPay").text(res.icdText);
                                     var selfPayListHtml="";
                                     for(var i=1;i<=selfPayList.length;i++){
                                         selfPayListHtml+="<tr><td>";
@@ -11134,6 +11156,7 @@ function printNoThirdParty() {
  * @param printType 打印模式 1 预览打印  2 打印设置
  */
 function printNoThirdPartyCommon(printType) {
+    warningMesageSimaple("请提醒患者至医保窗口审核,审核通过方能报销!");
     var title = "外伤无第三方责任承诺书";
     setPrint();
     LODOP = getLodop();

+ 1 - 1
src/main/resources/templates/mz/clinic.html

@@ -3409,7 +3409,7 @@
                 <td style="text-align: left">科室:</td>
                 <td id="deptSelfPay"></td>
                 <td style="text-align: left">医保类型:</td>
-                <td id="ybTypeSelfPay"></td>
+                <td id="ybTypeSelfPay">职工基本医疗保险</td>
             </tr>
             <tr>
                 <td style="text-align: left;padding-left: 15px">诊断:</td>