瀏覽代碼

改造诊疗成单独项目

hurugang 3 年之前
父節點
當前提交
d4bd43c5bc

+ 11 - 6
src/main/java/cn/hnthyy/thmz/controller/mz/MzBlRecordController.java

@@ -67,9 +67,11 @@ public class MzBlRecordController {
             if (mzBlRecord.getEmrProcess() != null) {
                 String zyzl = null;
                 if (mzBlRecord.getEmrProcess().indexOf("中药治疗:") >= 0) {
-                    if (mzBlRecord.getEmrProcess().indexOf("医技与诊疗:") >= 0) {
-                        zyzl = mzBlRecord.getEmrProcess().substring(mzBlRecord.getEmrProcess().indexOf("中药治疗:"), mzBlRecord.getEmrProcess().indexOf("医技与诊疗:"));
-                    } else if (mzBlRecord.getEmrProcess().indexOf("入院处理:") >= 0) {
+                    if (mzBlRecord.getEmrProcess().indexOf("辅助检查、检验:") >= 0) {
+                        zyzl = mzBlRecord.getEmrProcess().substring(mzBlRecord.getEmrProcess().indexOf("中药治疗:"), mzBlRecord.getEmrProcess().indexOf("辅助检查、检验:"));
+                    } else if (mzBlRecord.getEmrProcess().indexOf("诊疗:") >= 0) {
+                        zyzl = mzBlRecord.getEmrProcess().substring(mzBlRecord.getEmrProcess().indexOf("中药治疗:"), mzBlRecord.getEmrProcess().indexOf("诊疗:"));
+                    }else if (mzBlRecord.getEmrProcess().indexOf("入院处理:") >= 0) {
                         zyzl = mzBlRecord.getEmrProcess().substring(mzBlRecord.getEmrProcess().indexOf("中药治疗:"), mzBlRecord.getEmrProcess().indexOf("入院处理:"));
                     } else {
                         zyzl = mzBlRecord.getEmrProcess().substring(mzBlRecord.getEmrProcess().indexOf("中药治疗:"));
@@ -79,15 +81,18 @@ public class MzBlRecordController {
                         zyzl = zyzl.replaceAll("_", " ").replaceAll("中药治疗:", "</br>中药治疗:</br>");
                     }
                 }
-                mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("_", "</br>").replaceAll("西药治疗:", "西药治疗:</br>").replaceAll("医技与诊疗:", "医技与诊疗:</br>").replaceAll("入院处理:", "入院处理:</br>"));
+                mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("_", "</br>").replaceAll("西药治疗:", "西药治疗:</br>").replaceAll("辅助检查、检验:", "辅助检查、检验:</br>").replaceAll("诊疗:", "诊疗:</br>").replaceAll("入院处理:", "入院处理:</br>"));
                 if (zyzl != null) {
                     mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replace("%zwf%", zyzl));
                 }
                 if (mzBlRecord.getEmrProcess().indexOf("中药治疗:") > 0) {
                     mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("中药治疗:", "</br>中药治疗:"));
                 }
-                if (mzBlRecord.getEmrProcess().indexOf("医技与诊疗:") > 0) {
-                    mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("医技与诊疗:", "</br>医技与诊疗:"));
+                if (mzBlRecord.getEmrProcess().indexOf("辅助检查、检验:") > 0) {
+                    mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("辅助检查、检验:", "</br>辅助检查、检验:"));
+                }
+                if (mzBlRecord.getEmrProcess().indexOf("诊疗:") > 0) {
+                    mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("诊疗:", "</br>诊疗:"));
                 }
                 if (mzBlRecord.getEmrProcess().indexOf("入院处理:") > 0) {
                     mzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("入院处理:", "</br>入院处理:"));

+ 41 - 19
src/main/java/cn/hnthyy/thmz/controller/mz/MzZdYpYshController.java

@@ -6,6 +6,7 @@ import cn.hnthyy.thmz.entity.his.zd.MzZdYpYsh;
 import cn.hnthyy.thmz.entity.his.zd.ZdChargeItem;
 import cn.hnthyy.thmz.service.his.zd.JcJyItemChargeService;
 import cn.hnthyy.thmz.service.his.zd.MzZdYpYshService;
+import cn.hnthyy.thmz.service.his.zd.ZdChargeItemService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +28,8 @@ public class MzZdYpYshController {
     private MzZdYpYshService mzZdYpYshService;
     @Autowired
     private JcJyItemChargeService jcJyItemChargeService;
+    @Autowired
+    private ZdChargeItemService zdChargeItemService;
 
     /**
      * 查询药品成功
@@ -72,9 +75,9 @@ public class MzZdYpYshController {
 
 
     /**
-     * 查询诊疗项目与医技
+     * 查询医技
      *
-     * @param commonParams 药品通用查询参数
+     * @param commonParams 通用查询参数
      * @return
      */
     @UserLoginToken
@@ -82,41 +85,59 @@ public class MzZdYpYshController {
     public Map<String, Object> getJcJyItemByCommonParams(@RequestParam("commonParams") String commonParams) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
-//            if (StringUtils.isBlank(commonParams)) {
-//                resultMap.put("code", 0);
-//                resultMap.put("message", "查询参数为空,未查询到符合条件的诊疗与医技");
-//                resultMap.put("data", Arrays.asList());
-//                return resultMap;
-//            }
             //检查与检验
             List<JyZdItem> jyZdItemList = jcJyItemChargeService.queryJcJyItemByCommonParams(commonParams);
-//            //诊疗
-//            List<JyZdItem> zlList = jcJyItemChargeService.queryZlByCommonParams(commonParams);
-//            if (jyZdItemList == null || jyZdItemList.size() == 0) {
-//                jyZdItemList=zlList;
-//            }else {
-//                jyZdItemList.addAll(zlList);
-//            }
             if (jyZdItemList == null || jyZdItemList.size() == 0) {
                 resultMap.put("code", -1);
-                resultMap.put("message", "未查询到符合条件的诊疗与医技");
+                resultMap.put("message", "未查询到符合条件的医技");
                 return resultMap;
             }
             resultMap.put("code", 0);
             resultMap.put("data", jyZdItemList);
-            resultMap.put("message", "查询诊疗项目与医技成功");
+            resultMap.put("message", "查询医技成功");
             return resultMap;
         } catch (Exception e) {
             e.printStackTrace();
-            log.error("查询诊疗项目与医技失败,错误信息{}", e);
+            log.error("查询医技失败,错误信息{}", e);
             resultMap.put("code", -1);
-            resultMap.put("message", "查询诊疗项目与医技失败");
+            resultMap.put("message", "查询医技失败");
             return resultMap;
         }
     }
 
 
 
+    /**
+     * 查询诊疗项目
+     *
+     * @param commonParams 通用查询参数
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/getZlItemByCommonParams", method = {RequestMethod.GET})
+    public Map<String, Object> getZlItemByCommonParams(@RequestParam("commonParams") String commonParams) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            List<JyZdItem> jyZdItemList = zdChargeItemService.queryZlItemByCommonParams(commonParams);
+            if (jyZdItemList == null || jyZdItemList.size() == 0) {
+                resultMap.put("code", -1);
+                resultMap.put("message", "未查询到符合条件的诊疗");
+                return resultMap;
+            }
+            resultMap.put("code", 0);
+            resultMap.put("data", jyZdItemList);
+            resultMap.put("message", "查询诊疗项目成功");
+            return resultMap;
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("查询诊疗项目失败,错误信息{}", e);
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询诊疗项目失败");
+            return resultMap;
+        }
+    }
+
+
     /**
      * 查询诊疗与医技项目明细
      *
@@ -167,4 +188,5 @@ public class MzZdYpYshController {
             return resultMap;
         }
     }
+
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/his/zd/JcJyItemChargeService.java

@@ -28,7 +28,7 @@ public interface JcJyItemChargeService {
 
 
     /**
-     * 查询诊疗项目  检验和检查
+     * 查询检验和检查
      * @param commonParams
      * @return
      */

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

@@ -1,5 +1,6 @@
 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;
 
@@ -83,4 +84,11 @@ public interface ZdChargeItemService {
      * @return
      */
     int cancelEffective(String code,Integer type);
+
+    /**
+     * 查询诊疗项目
+     * @param commonParams
+     * @return
+     */
+    List<JyZdItem> queryZlItemByCommonParams(String commonParams);
 }

+ 25 - 8
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1187,6 +1187,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         Map<String, Object> prescriptionDetail = new HashMap<>();
         List<Map<String, Object>> zyPrescription = new ArrayList();
         prescriptionDetail.put("zyPrescription", zyPrescription);
+        List<Map<String, Object>> jcjyPrescription = new ArrayList();
+        prescriptionDetail.put("jcjyPrescription", jcjyPrescription);
         List<Map<String, Object>> zlPrescription = new ArrayList();
         prescriptionDetail.put("zlPrescription", zlPrescription);
         Map<String, Object> xyPrescription = new HashMap<>();
@@ -1259,7 +1261,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             amount = amount.add(totalAmount);
             yjMap.put("amount", amount);
             yjMap.put("detail", detail);
-            zlPrescription.add(yjMap);
+            jcjyPrescription.add(yjMap);
         }
         if (mzPrescriptionVo.getMzChargeDetailList() != null && mzPrescriptionVo.getMzChargeDetailList().size() > 0) {
             //麻、精一
@@ -1491,13 +1493,23 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             sbd.append(map.get("zyfs"));
             getIndex(zyPrescription, sbd, 1);
         }
+        if (jcjyPrescription.size() > 0) {
+            List<String> detail = (List<String>) jcjyPrescription.get(0).get("detail");
+            if (detail != null && detail.size() > 0) {
+                if (sbd.length() > 0) {
+                    sbd.append(" ");
+                }
+                sbd.append("辅助检查、检验:");
+                getIndex(zlPrescription, sbd, 0);
+            }
+        }
         if (zlPrescription.size() > 0) {
             List<String> detail = (List<String>) zlPrescription.get(0).get("detail");
             if (detail != null && detail.size() > 0) {
                 if (sbd.length() > 0) {
                     sbd.append(" ");
                 }
-                sbd.append("医技与诊疗:");
+                sbd.append("诊疗:");
                 getIndex(zlPrescription, sbd, 0);
             }
         }
@@ -1807,6 +1819,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         String zyzlContent = null;
         //西药治疗
         String xyzlContent = null;
+        //检查检验
+        String jcjyContent = null;
         //诊疗治疗
         String zlzlContent = null;
         //辅助检查
@@ -1863,11 +1877,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 if (setEmrProcess) {
                     zlIndex++;
                     String value = zlIndex + "." + mzYjReq.getOrderName() + " " + (mzYjReq.getJyRemark() == null ? "" : mzYjReq.getJyRemark()) + " ";
-                    if (zlzlContent == null) {
-                        zlzlContent = "医技与诊疗:" + value;
+                    if (jcjyContent == null) {
+                        jcjyContent = "辅助检查、检验:" + value;
                         emrFzjc = value;
                     } else {
-                        zlzlContent += "_" + value;
+                        jcjyContent += "_" + value;
                         emrFzjc += "," + value;
                     }
                 }
@@ -2071,11 +2085,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         zlIndex++;
                         String value = zlIndex + "." + mzChargeDetail.getTcName() + " " + mzChargeDetail.getInstructionText() + " ";
                         if (zlzlContent == null) {
-                            zlzlContent = "医技与诊疗:" + value;
-                            emrFzjc = value;
+                            zlzlContent = "诊疗:" + value;
+                            //emrFzjc = value;
                         } else {
                             zlzlContent += "_" + value;
-                            emrFzjc += "," + value;
+                            //emrFzjc += "," + value;
                         }
                     }
                 }
@@ -2151,6 +2165,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             if (zyzlContent != null) {
                 emrProcess += zyzlContent;
             }
+            if (jcjyContent != null) {
+                emrProcess += jcjyContent;
+            }
             if (zlzlContent != null) {
                 emrProcess += zlzlContent;
             }

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

@@ -81,38 +81,10 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
             commonParams = null;
             pageSize = 5;
         }
-//        if (SignUtil.isAlpha(commonParams)) {
-//            commonParams = commonParams.toUpperCase();
-//        }
         if (StringUtils.isNotBlank(commonParams)) {
             commonParams = "%" + commonParams + "%";
         }
         List<JyZdItem> jyZdItemList = jcJyItemChargeMapper.selectJcJyItemByCommonParams(commonParams, pageSize);
-        List<JyZdItem> zlList = zdChargeItemMapper.selectZlByCommonParams(commonParams, pageSize);
-        if (jyZdItemList == null) {
-            jyZdItemList = zlList;
-        } else {
-            Set<String> nameSet = null;
-            if (jyZdItemList != null && jyZdItemList.size() > 0) {
-                //检验科,超声影像科,放射科同名的诊疗不显示
-                nameSet = jyZdItemList.stream().filter(j->Arrays.asList(Constants.MEDICAL_LABORATORY_CODE,Constants.CSYXK_CODE,Constants.FSK_CODE).contains(j.getExecUnit())).collect(Collectors.toMap(JyZdItem::getName, JyZdItem::getName)).keySet();
-            }
-            if(nameSet==null){
-                jyZdItemList.addAll(zlList);
-            }else {
-                for(JyZdItem jyZdItem:zlList){
-                    if(jyZdItem==null || StringUtils.isBlank(jyZdItem.getName())){
-                        continue;
-                    }
-                    //当有诊疗项目与检验检查重名的时候,不显示诊疗
-                    if(!nameSet.contains(jyZdItem.getName())){
-                        jyZdItemList.add(jyZdItem);
-                    }
-                }
-            }
-
-
-        }
         if (jyZdItemList != null && jyZdItemList.size() > 0) {
             jyZdItemList.stream().forEach(j -> {
                 if (StringUtils.isNotBlank(j.getExecUnit())) {

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

@@ -1,10 +1,13 @@
 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;
 import cn.hnthyy.thmz.pageDto.ZdChargeItemDto;
 import cn.hnthyy.thmz.service.his.zd.ZdChargeItemService;
+import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -15,6 +18,8 @@ public class ZdChargeItemServiceImpl implements ZdChargeItemService {
     @SuppressWarnings("all")
     @Autowired
     private ZdChargeItemMapper zdChargeItemMapper;
+    @Autowired
+    private ZdUnitCodeService zdUnitCodeService;
 
     @Override
     public List<ZdChargeItem> queryZdChargeItemWithPage(ZdChargeItemDto zdChargeItemDto) {
@@ -70,4 +75,26 @@ public class ZdChargeItemServiceImpl implements ZdChargeItemService {
         }
         return zdChargeItemMapper.cancelEffectiveDelFlag(code);
     }
+
+    @Override
+    public List<JyZdItem> queryZlItemByCommonParams(String commonParams) {
+        //Integer pageSize =2000;
+        Integer pageSize = 30;
+        if (StringUtils.isBlank(commonParams)) {
+            commonParams = null;
+            pageSize = 5;
+        }
+        if (StringUtils.isNotBlank(commonParams)) {
+            commonParams = "%" + commonParams + "%";
+        }
+        List<JyZdItem> 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()));
+                }
+            });
+        }
+        return zlList;
+    }
 }

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

@@ -187,6 +187,7 @@ $(function () {
         $("#western_medicine_name").webuiPopover('hide');
         $("#chinese_medicine_name").webuiPopover('hide');
         $("#jcJyItem").webuiPopover('hide');
+        $("#zlItem").webuiPopover('hide');
         $("#saveapidAcceptsModal").modal("show");
     });
 
@@ -1785,8 +1786,10 @@ function medicalModelModal(id) {
                     if (emrProcess.indexOf("西药治疗:") >= 0) {
                         if (emrProcess.indexOf("中药治疗:") >= 0) {
                             xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("中药治疗:"));
-                        } else if (emrProcess.indexOf("医技与诊疗:") >= 0) {
-                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("医技与诊疗:"));
+                        } else if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
+                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("辅助检查、检验:"));
+                        }else if (emrProcess.indexOf("诊疗:") >= 0) {
+                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("诊疗:"));
                         } else {
                             xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5);
                         }
@@ -1808,9 +1811,11 @@ function medicalModelModal(id) {
                     }
                     var zy = null;
                     if (emrProcess.indexOf("中药治疗:") >= 0) {
-                        if (emrProcess.indexOf("医技与诊疗:") >= 0) {
-                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("医技与诊疗:"));
-                        } else {
+                        if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
+                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("辅助检查、检验:"));
+                        }else  if (emrProcess.indexOf("诊疗:") >= 0) {
+                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("诊疗:"));
+                        }else {
                             zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5);
                         }
                         var zyArr = zy.split("_");
@@ -1838,17 +1843,22 @@ function medicalModelModal(id) {
                     } else {
                         $("#zyzlTitle").removeClass("in").addClass("hide");
                     }
-                    if (emrProcess.indexOf("医技与诊疗:") >= 0) {
-                        var zlyj = emrProcess.substring(emrProcess.indexOf("医技与诊疗:") + 6);
-                        var zlyjArr = zlyj.split("_");
-                        if (zlyjArr != null && zlyjArr.length > 0) {
-                            var zlyjhtml = "";
-                            for (var i = 0; i < zlyjArr.length; i++) {
-                                zlyjhtml += "<div>";
-                                zlyjhtml += zlyjArr[i];
-                                zlyjhtml += "</div>";
+                    var jcjy = null;
+                    if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
+                        if (emrProcess.indexOf("诊疗:") >= 0) {
+                            jcjy = emrProcess.substring(emrProcess.indexOf("辅助检查、检验:") + 8, emrProcess.indexOf("诊疗:"));
+                        }else {
+                            jcjy = emrProcess.substring(emrProcess.indexOf("辅助检查、检验:") + 8);
+                        }
+                        var jcjyArr = jcjy.split("_");
+                        if (jcjyArr != null && jcjyArr.length > 0) {
+                            var jcjyhtml = "";
+                            for (var i = 0; i < jcjyArr.length; i++) {
+                                jcjyhtml += "<div>";
+                                jcjyhtml += jcjyArr[i];
+                                jcjyhtml += "</div>";
                             }
-                            $("#zlyjContent").html(zlyjhtml);
+                            $("#zlyjContent").html(jcjyhtml);
                             $("#zlyjTitle").removeClass("hide").addClass("in");
                         } else {
                             $("#zlyjTitle").removeClass("in").addClass("hide");
@@ -1856,6 +1866,24 @@ function medicalModelModal(id) {
                     } else {
                         $("#zlyjTitle").removeClass("in").addClass("hide");
                     }
+                    if (emrProcess.indexOf("诊疗:") >= 0) {
+                        var zl = emrProcess.substring(emrProcess.indexOf("诊疗:") + 3);
+                        var zlArr = zl.split("_");
+                        if (zlArr != null && zlArr.length > 0) {
+                            var zlhtml = "";
+                            for (var i = 0; i < zlArr.length; i++) {
+                                zlhtml += "<div>";
+                                zlhtml += zlArr[i];
+                                zlhtml += "</div>";
+                            }
+                            $("#zlContent").html(zlhtml);
+                            $("#zlTitle").removeClass("hide").addClass("in");
+                        } else {
+                            $("#zlTitle").removeClass("in").addClass("hide");
+                        }
+                    } else {
+                        $("#zlTitle").removeClass("in").addClass("hide");
+                    }
                 }
             } else {
                 errorMesage(res);
@@ -3427,7 +3455,7 @@ function removeYpOrProject(index, obj) {
         //中成药
         tabId = "zyTab";
     } else if (index == 2) {
-        //医技与诊疗
+        //辅助检查、检验
         tabId = "zlTab";
     } else if (index == 3) {
         //入院
@@ -4948,7 +4976,7 @@ function checkZyInfo(code, serial, async) {
 
 
 /**
- * 加载医技与诊疗列表
+ * 加载辅助检查、检验列表
  * @param index
  */
 function loadjcJyItemList(event) {
@@ -5328,7 +5356,7 @@ function verifyRepeat(code, serial, chargeUnitCode, index) {
         //中成药
         tabId = "zyTab";
     } else if (index == 2) {
-        //医技与诊疗
+        //辅助检查、检验
         tabId = "zlTab";
     } else if (index == 3) {
         //入院
@@ -5400,7 +5428,7 @@ function initNavTabs(index) {
         tabId = "zlTab";
         tabContentId = "zlTabContent";
         paneId = "zlcf_" + getUID();
-        cfdesc = '医技与诊疗';
+        cfdesc = '辅助检查、检验';
     } else if (index == 3) {
         //医技
         tabId = "zyReqTab";
@@ -5545,7 +5573,7 @@ function refreshNavTabs(index, groupNo) {
         tabId = "zlTab";
         tabContentId = "zlTabContent";
         paneIdPrfix = "zlcf_";
-        cfdesc = '医技与诊疗';
+        cfdesc = '辅助检查、检验';
     } else if (index == 3) {
         //入院
         tabId = "zyReqTab";
@@ -6382,7 +6410,7 @@ function savePrescription() {
     $("#western_medicine_name").webuiPopover('hide');
     $("#chinese_medicine_name").webuiPopover('hide');
     $("#jcJyItem").webuiPopover('hide');
-
+    $("#zlItem").webuiPopover('hide');
     $("#messageModal").modal();
     $("#messageContent").html("确认保存处方吗?");
     $("#messageButton").off("click").on("click", function (t) {
@@ -6903,9 +6931,11 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                     if (emrProcess.indexOf("西药治疗:") >= 0) {
                         if (emrProcess.indexOf("中药治疗:") >= 0) {
                             xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("中药治疗:"));
-                        } else if (emrProcess.indexOf("医技与诊疗:") >= 0) {
-                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("医技与诊疗:"));
-                        } else if (emrProcess.indexOf("入院处理:") >= 0) {
+                        } else if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
+                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("辅助检查、检验:"));
+                        } else if (emrProcess.indexOf("诊疗:") >= 0) {
+                            xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("诊疗:"));
+                        }else if (emrProcess.indexOf("入院处理:") >= 0) {
                             xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5, emrProcess.indexOf("入院处理:"));
                         } else {
                             xy = emrProcess.substring(emrProcess.indexOf("西药治疗:") + 5);
@@ -6928,9 +6958,11 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                     }
                     var zy = null;
                     if (emrProcess.indexOf("中药治疗:") >= 0) {
-                        if (emrProcess.indexOf("医技与诊疗:") >= 0) {
-                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("医技与诊疗:"));
-                        } else if (emrProcess.indexOf("入院处理:") >= 0) {
+                        if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
+                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("辅助检查、检验:"));
+                        } else if (emrProcess.indexOf("诊疗:") >= 0) {
+                            zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("诊疗:"));
+                        }else if (emrProcess.indexOf("入院处理:") >= 0) {
                             zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5, emrProcess.indexOf("入院处理:"));
                         } else {
                             zy = emrProcess.substring(emrProcess.indexOf("中药治疗:") + 5);
@@ -6970,12 +7002,14 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                     } else {
                         $("#prescriptionDetail_zyzlTitle").removeClass("in").addClass("hide");
                     }
-                    if (emrProcess.indexOf("医技与诊疗:") >= 0) {
+                    if (emrProcess.indexOf("辅助检查、检验:") >= 0) {
                         var zlyj = null;
-                        if (emrProcess.indexOf("入院处理:") >= 0) {
-                            zlyj = emrProcess.substring(emrProcess.indexOf("医技与诊疗:") + 6, emrProcess.indexOf("入院处理:"));
+                        if (emrProcess.indexOf("诊疗:") >= 0) {
+                            zlyj = emrProcess.substring(emrProcess.indexOf("辅助检查、检验:") + 8, emrProcess.indexOf("诊疗:"));
+                        }else if (emrProcess.indexOf("入院处理:") >= 0) {
+                            zlyj = emrProcess.substring(emrProcess.indexOf("辅助检查、检验:") + 8, emrProcess.indexOf("入院处理:"));
                         } else {
-                            zlyj = emrProcess.substring(emrProcess.indexOf("医技与诊疗:") + 6);
+                            zlyj = emrProcess.substring(emrProcess.indexOf("辅助检查、检验:") + 8);
                         }
                         var zlyjArr = zlyj.split("_");
                         if (zlyjArr != null && zlyjArr.length > 0) {
@@ -6993,6 +7027,29 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                     } else {
                         $("#prescriptionDetail_zlyjTitle").removeClass("in").addClass("hide");
                     }
+                    if (emrProcess.indexOf("诊疗:") >= 0) {
+                        var zl = null;
+                         if (emrProcess.indexOf("入院处理:") >= 0) {
+                             zl = emrProcess.substring(emrProcess.indexOf("诊疗:") + 3, emrProcess.indexOf("入院处理:"));
+                        } else {
+                             zl = emrProcess.substring(emrProcess.indexOf("诊疗:") + 3);
+                        }
+                        var zlArr = zl.split("_");
+                        if (zlArr != null && zlArr.length > 0) {
+                            var zlhtml = "";
+                            for (var i = 0; i < zlArr.length; i++) {
+                                zlhtml += "<div style='margin-bottom: 5px;padding-left: 10px;'>";
+                                zlhtml += zlyjArr[i];
+                                zlhtml += "</div>";
+                            }
+                            $("#prescriptionDetail_zlContent").html(zlhtml);
+                            $("#prescriptionDetail_zlTitle").removeClass("hide").addClass("in");
+                        } else {
+                            $("#prescriptionDetail_zlTitle").removeClass("in").addClass("hide");
+                        }
+                    } else {
+                        $("#prescriptionDetail_zlyjTitle").removeClass("in").addClass("hide");
+                    }
                     if (emrProcess.indexOf("入院处理:") >= 0) {
                         var zyReq = emrProcess.substring(emrProcess.indexOf("入院处理:") + 5);
                         if (zyReq != null && zyReq != "") {

+ 94 - 16
src/main/resources/templates/mz/clinic.html

@@ -457,9 +457,12 @@
                                 中草药
                             </button>
                             <button class="btn btn-sm btn-default" type="button" onclick="billItemButtonChange(this,2)" id="yj_req_button">
-                                辅助检查、检验与诊疗
+                                辅助检查、检验
                             </button>
-                            <button class="btn btn-sm btn-default" type="button" onclick="billItemButtonChange(this,3)" id="zy_req_button">
+                            <button class="btn btn-sm btn-default" type="button" onclick="billItemButtonChange(this,3)" id="zl_req_button">
+                                诊疗
+                            </button>
+                            <button class="btn btn-sm btn-default" type="button" onclick="billItemButtonChange(this,4)" id="zy_req_button">
                                 入院
                             </button>
                             <!--<button class="btn btn-sm btn-default" type="button" onclick="billItemButtonChange(this)">&nbsp;&nbsp;麻、精一&nbsp;&nbsp;-->
@@ -717,12 +720,6 @@
                                         <input type="text" class="form-control my_label_input_2" id="jcjyItemPrice"
                                                style="padding-left: 10px;" readonly>
                                     </div>
-                                    <div style="width: 256px;float: left;" class="hide" id="chargeUnitDiv">
-                                        <label class="my_label">描述<span
-                                                class="required">*</span>:</label>
-                                        <input type="text" class="form-control my_label_input_2" id="chargeUnit"
-                                               style="padding-left: 10px;" required="required">
-                                    </div>
                                     <div style="width: 256px;float: left;" class="hide" id="jyZdSampleDiv">
                                         <label class="my_label">检验物<span
                                                 class="required">*</span>:</label>
@@ -751,6 +748,74 @@
                                             </select>
                                         </div>
                                     </div>
+                                </div>
+                                <div class="item form-group">
+                                    <div style="width: 100%">
+                                        <label class="my_label_2">备注:</label>
+                                        <input type="text" class="form-control " id="remark"
+                                               style="padding-left: 10px;width: 340px;" placeholder="请输入">
+                                    </div>
+                                </div>
+                                <div style="width: 100%;height: 22px;line-height: 22px;">
+                                    <div style="float: left;display: inline-block;"><a onclick="clearJyJcItem()"
+                                                                                       style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"><i
+                                            class="fa fa-trash">&nbsp;&nbsp;清空</i></a>
+                                        <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;margin-left: 20px;"
+                                           onclick="getJcJyItemChargeByCode(null)" id="jcJyItemChargeDetail"
+                                           class="hide"><i
+                                                class="fa fa-eye">&nbsp;&nbsp;查看明细</i></a>
+                                    </div>
+
+                                    <div style="float: right;display: inline-block;">
+                                        <a id="clearRegistration5"
+                                           style="cursor: pointer;font-size: 14px;color: #333333;"
+                                           onclick="saveJyJcItem(true)">&nbsp;&nbsp;保存到右侧<i
+                                                class="fa fa-long-arrow-right"
+                                                style="font-size: 20px;vertical-align: middle;width: 30px;height: 20px;text-align: center;background-color: #337AB7;color: white;margin-left: 10px"></i></a>
+                                    </div>
+
+                                </div>
+                            </form>
+                        </div>
+                        <div style="margin-top: 5px;width: 386px;float: left;" class="thmz_alert hide" id="rp_form3">
+                            <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off">
+                                <div class="item form-group">
+                                    <div style="width: 386px;float: left;">
+                                        <label class="my_label_2">项目<span
+                                                class="required">*</span>:</label>
+                                        <div class="form-group has-feedback" style="float: right;width: 340px;">
+                                            <input type="text" class="form-control has-feedback-left" id="zlItem"
+                                                   placeholder="请输入" style="padding-left: 10px;width: 99%"
+                                                   onKeyUp="loadjcJyItemList(event)"
+                                                   required="required">
+                                            <span class="fa fa-search form-control-feedback right"
+                                                  aria-hidden="true"></span>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="item form-group">
+                                    <div style="width: 130px;float: left;">
+                                        <label class="my_label_2">单价:</label>
+                                        <input type="text" class="form-control my_label_input_2" id="zlItemPrice"
+                                               style="padding-left: 10px;" readonly>
+                                    </div>
+                                    <div style="width: 256px;float: left;" class="hide" id="chargeUnitDiv">
+                                        <label class="my_label">描述<span
+                                                class="required">*</span>:</label>
+                                        <input type="text" class="form-control my_label_input_2" id="chargeUnit"
+                                               style="padding-left: 10px;" required="required">
+                                    </div>
+                                    <input type="hidden" id="zltype"/>
+                                </div>
+                                <div class="item form-group">
+                                    <div style="width: 256px;float: left;">
+                                        <label class="my_label_2" style="width: 70px;">执行科室:</label>
+                                        <div style="width: 163px;float: left;">
+                                            <select class="form-control selectpicker show-tick"  data-live-search="true"
+                                                    id="zlExecUnit">
+                                            </select>
+                                        </div>
+                                    </div>
 
                                     <div style="width: 130px;float: left;" class="hide"  id="itemQuantityDiv">
                                         <label class="my_label" style="width: 40px;">数量:</label>
@@ -761,7 +826,7 @@
                                 <div class="item form-group">
                                     <div style="width: 100%">
                                         <label class="my_label_2">备注:</label>
-                                        <input type="text" class="form-control " id="remark"
+                                        <input type="text" class="form-control " id="zlRemark"
                                                style="padding-left: 10px;width: 340px;" placeholder="请输入">
                                     </div>
                                 </div>
@@ -770,15 +835,15 @@
                                                                                        style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"><i
                                             class="fa fa-trash">&nbsp;&nbsp;清空</i></a>
                                         <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;margin-left: 20px;"
-                                           onclick="getJcJyItemChargeByCode(null)" id="jcJyItemChargeDetail"
+                                           onclick="getZlItemChargeByCode(null)" id="zlItemChargeDetail"
                                            class="hide"><i
                                                 class="fa fa-eye">&nbsp;&nbsp;查看明细</i></a>
                                     </div>
 
                                     <div style="float: right;display: inline-block;">
-                                        <a id="clearRegistration5"
+                                        <a
                                            style="cursor: pointer;font-size: 14px;color: #333333;"
-                                           onclick="saveJyJcItem(true)">&nbsp;&nbsp;保存到右侧<i
+                                           onclick="saveZlItem(true)">&nbsp;&nbsp;保存到右侧<i
                                                 class="fa fa-long-arrow-right"
                                                 style="font-size: 20px;vertical-align: middle;width: 30px;height: 20px;text-align: center;background-color: #337AB7;color: white;margin-left: 10px"></i></a>
                                     </div>
@@ -786,7 +851,7 @@
                                 </div>
                             </form>
                         </div>
-                        <div style="margin-top: 5px;width: 386px;float: left;" class="thmz_alert hide" id="rp_form3">
+                        <div style="margin-top: 5px;width: 386px;float: left;" class="thmz_alert hide" id="rp_form4">
                             <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off">
                                 <div class="item form-group">
                                     <div style="width: 170px;float: left;">
@@ -1286,11 +1351,18 @@
                     </div>
                     <div class="conent" style="margin-bottom: 5px;" id="prescriptionDetail_zlyjTitle">
                         <div style="color: #2e69eb!important;margin-bottom: 5px;">
-                            医技与诊疗:
+                            辅助检查、检验:
                         </div>
                         <div id="prescriptionDetail_zlyjContent">
                         </div>
                     </div>
+                    <div class="conent" style="margin-bottom: 5px;" id="prescriptionDetail_zlTitle">
+                        <div style="color: #2e69eb!important;margin-bottom: 5px;">
+                            诊疗:
+                        </div>
+                        <div id="prescriptionDetail_zlContent">
+                        </div>
+                    </div>
                     <div class="conent" style="margin-bottom: 5px;" id="prescriptionDetail_zyReqTitle">
                         <div style="color: #2e69eb!important;margin-bottom: 5px;">
                             入院处理:
@@ -1423,12 +1495,18 @@
                     </div>
                     <div class="conent" style="margin-bottom: 5px;">
                         <div style="color: #2e69eb!important;margin-bottom: 5px;" id="zlyjTitle">
-                            诊疗与医技:
+                            辅助检查、检验:
                         </div>
                         <div id="zlyjContent">
                         </div>
                     </div>
-
+                    <div class="conent" style="margin-bottom: 5px;">
+                        <div style="color: #2e69eb!important;margin-bottom: 5px;" id="zlTitle">
+                            诊疗:
+                        </div>
+                        <div id="zlContent">
+                        </div>
+                    </div>
                 </form>
             </div>
             <div class="modal-footer">