Browse Source

1、解决项目无法重复开立,现在方案是按照编码和部位,
2、解决同名诊疗与检查检验同时出现导致处方开错,解决方案不展示同名诊疗项目

hurugang 3 năm trước cách đây
mục cha
commit
153026cdc7

+ 72 - 52
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/JcJyItemChargeServiceImpl.java

@@ -32,6 +32,7 @@ import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
+
 @Slf4j
 @Service
 public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
@@ -55,7 +56,7 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
     private MzYjReqMapper mzYjReqMapper;
     @Autowired
     private ZdUnitCodeService zdUnitCodeService;
-//    @Autowired
+    //    @Autowired
 //    private JyReportService jyReportService;
     @Autowired
     private EmployeeService employeeService;
@@ -74,23 +75,41 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
     @Override
     public List<JyZdItem> queryJcJyItemByCommonParams(String commonParams) {
         //Integer pageSize =2000;
-        Integer pageSize =30;
+        Integer pageSize = 30;
         if (StringUtils.isBlank(commonParams)) {
             commonParams = null;
-            pageSize =5;
+            pageSize = 5;
         }
 //        if (SignUtil.isAlpha(commonParams)) {
 //            commonParams = commonParams.toUpperCase();
 //        }
         if (StringUtils.isNotBlank(commonParams)) {
-            commonParams = "%"+commonParams + "%";
+            commonParams = "%" + commonParams + "%";
         }
         List<JyZdItem> jyZdItemList = jcJyItemChargeMapper.selectJcJyItemByCommonParams(commonParams, pageSize);
         List<JyZdItem> zlList = zdChargeItemMapper.selectZlByCommonParams(commonParams, pageSize);
         if (jyZdItemList == null) {
             jyZdItemList = zlList;
         } else {
-            jyZdItemList.addAll(zlList);
+            Set<String> nameSet = null;
+            if (jyZdItemList != null && jyZdItemList.size() > 0) {
+                nameSet = jyZdItemList.stream().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 -> {
@@ -103,15 +122,15 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
     }
 
     @Override
-    public List<ZdChargeItem> queryJcJyItemChargeByCode(String code,Integer jcJyZltype) throws MzException {
+    public List<ZdChargeItem> queryJcJyItemChargeByCode(String code, Integer jcJyZltype) throws MzException {
         if (StringUtils.isBlank(code)) {
             throw new MzException("诊疗与医技编码为空!");
         }
         List<JcJyItemCharge> jcJyItemChargeList = null;
-        if(jcJyZltype==1){
-            jcJyItemChargeList= jcJyItemChargeMapper.selectJyItemChargeByCode(code);
-        }else if(jcJyZltype==2){
-            jcJyItemChargeList= jcJyItemChargeMapper.selectJcItemChargeByCode(code);
+        if (jcJyZltype == 1) {
+            jcJyItemChargeList = jcJyItemChargeMapper.selectJyItemChargeByCode(code);
+        } else if (jcJyZltype == 2) {
+            jcJyItemChargeList = jcJyItemChargeMapper.selectJcItemChargeByCode(code);
         }
         if (jcJyItemChargeList == null || jcJyItemChargeList.size() == 0) {
             return null;
@@ -168,85 +187,86 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
 
     @Override
     public List<InspectionsIndex> getJyList(String patientId, String beginTime, String endTime) throws MzException {
-        if(patientId==null || StringUtils.isBlank(patientId)){
+        if (patientId == null || StringUtils.isBlank(patientId)) {
             throw new MzException("病人id不能为空!");
         }
-        if(beginTime==null || StringUtils.isBlank(beginTime)){
+        if (beginTime == null || StringUtils.isBlank(beginTime)) {
             throw new MzException("开始时间不能为空!");
         }
-        if(endTime==null || StringUtils.isBlank(endTime)){
+        if (endTime == null || StringUtils.isBlank(endTime)) {
             throw new MzException("结束时间不能为空!");
         }
-        List<InspectionsIndex> data=inspectionsService.queryInspectionsIndex(patientId,beginTime,endTime);
-        if(data==null){
+        List<InspectionsIndex> data = inspectionsService.queryInspectionsIndex(patientId, beginTime, endTime);
+        if (data == null) {
             return data;
         }
         //按时间倒序排序
-        Collections.sort(data, new Comparator(){
+        Collections.sort(data, new Comparator() {
             final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
             @Override
             public int compare(Object o1, Object o2) {
-                InspectionsIndex i1 =(InspectionsIndex)o1;
-                InspectionsIndex i2 =(InspectionsIndex)o2;
+                InspectionsIndex i1 = (InspectionsIndex) o1;
+                InspectionsIndex i2 = (InspectionsIndex) o2;
                 return (i2.getORDR_CREATE_DATE()).compareTo(i1.getORDR_CREATE_DATE());
             }
         });
-        return  data;
+        return data;
     }
 
     @Override
-    public Map<String,Object> getYjJcRecordReport(String hisReqNo,String patientId) throws MzException {
-        if(hisReqNo==null || StringUtils.isBlank(hisReqNo)){
+    public Map<String, Object> getYjJcRecordReport(String hisReqNo, String patientId) throws MzException {
+        if (hisReqNo == null || StringUtils.isBlank(hisReqNo)) {
             throw new MzException("his系统的检查申请单号不能为空!");
         }
-        if(patientId==null || StringUtils.isBlank(patientId)){
+        if (patientId == null || StringUtils.isBlank(patientId)) {
             throw new MzException("病人ID不能为空!");
         }
-        String jcId=mzYjReqMapper.selectJcIdFromYjJcPatient(patientId);
-        if(jcId==null || StringUtils.isBlank(jcId)){
+        String jcId = mzYjReqMapper.selectJcIdFromYjJcPatient(patientId);
+        if (jcId == null || StringUtils.isBlank(jcId)) {
             throw new MzException("病人检查ID不存在!");
         }
-        List<YjJcRecord> jcRecords= yjJcRecordMapper.selectYjJcRecordByHisReqNo(hisReqNo,jcId);
-        if(jcRecords==null || jcRecords.size()==0){
+        List<YjJcRecord> jcRecords = yjJcRecordMapper.selectYjJcRecordByHisReqNo(hisReqNo, jcId);
+        if (jcRecords == null || jcRecords.size() == 0) {
             throw new MzException("暂时还没有对应的报告单,请稍后重试!");
         }
-        if(jcRecords.size()>1){
-            log.error("his申请单号为{}的记录对应的检查单号有多条",hisReqNo);
+        if (jcRecords.size() > 1) {
+            log.error("his申请单号为{}的记录对应的检查单号有多条", hisReqNo);
         }
-        YjJcRecord jcRecord= jcRecords.get(0);
-        if(jcRecord==null || jcRecord.getReportNo()==null ||StringUtils.isBlank(jcRecord.getReportNo())){
+        YjJcRecord jcRecord = jcRecords.get(0);
+        if (jcRecord == null || jcRecord.getReportNo() == null || StringUtils.isBlank(jcRecord.getReportNo())) {
             throw new MzException("报告单为空!!");
         }
-        List<YjJcRecordReport> yjJcRecordReportList=yjJcRecordReportMapper.selectYjJcRecordReportByReportNo(jcRecord.getReportNo());
-        if(yjJcRecordReportList==null || yjJcRecordReportList.size()==0){
+        List<YjJcRecordReport> yjJcRecordReportList = yjJcRecordReportMapper.selectYjJcRecordReportByReportNo(jcRecord.getReportNo());
+        if (yjJcRecordReportList == null || yjJcRecordReportList.size() == 0) {
             throw new MzException("暂时还没有对应的报告单,请稍后重试!");
         }
-        if(yjJcRecordReportList.size()>1){
-            log.error("报告单号为{}的记录对应的检查记录有多条",jcRecord.getReportNo());
+        if (yjJcRecordReportList.size() > 1) {
+            log.error("报告单号为{}的记录对应的检查记录有多条", jcRecord.getReportNo());
         }
-        Employee confirm=employeeService.queryByUserCode(jcRecord.getConfirmId());
-        jcRecord.setConfirmId(confirm!=null?confirm.getEmployeeName():"");
-        Employee report=employeeService.queryByUserCode(jcRecord.getReportId());
-        jcRecord.setReportId(report!=null?report.getEmployeeName():"");
-        Map<String,Object> map = new HashMap<>();
-        map.put("jcRecord",jcRecord);
-        map.put("yjJcRecordReport",yjJcRecordReportList.get(0));
+        Employee confirm = employeeService.queryByUserCode(jcRecord.getConfirmId());
+        jcRecord.setConfirmId(confirm != null ? confirm.getEmployeeName() : "");
+        Employee report = employeeService.queryByUserCode(jcRecord.getReportId());
+        jcRecord.setReportId(report != null ? report.getEmployeeName() : "");
+        Map<String, Object> map = new HashMap<>();
+        map.put("jcRecord", jcRecord);
+        map.put("yjJcRecordReport", yjJcRecordReportList.get(0));
         //可能有多个his检查申请对应一个检查
         List<YjJcRecord> yjJcRecords = yjJcRecordMapper.selectYjJcRecordByReportNo(jcRecord.getReportNo());
-        if(yjJcRecords!=null && yjJcRecords.size()>0){
+        if (yjJcRecords != null && yjJcRecords.size() > 0) {
             String groupName = null;
-            for (YjJcRecord jr:yjJcRecords){
-                MzYjReq mzYjReq=mzYjReqMapper.selectMzYjReqByReqNo(jr.getHisReqNo().toString());
-                if(mzYjReq!=null && StringUtils.isNotBlank(mzYjReq.getGroupName())){
-                    if(groupName==null){
-                        groupName=mzYjReq.getGroupName();
-                    }else {
-                        groupName+=","+mzYjReq.getGroupName();
+            for (YjJcRecord jr : yjJcRecords) {
+                MzYjReq mzYjReq = mzYjReqMapper.selectMzYjReqByReqNo(jr.getHisReqNo().toString());
+                if (mzYjReq != null && StringUtils.isNotBlank(mzYjReq.getGroupName())) {
+                    if (groupName == null) {
+                        groupName = mzYjReq.getGroupName();
+                    } else {
+                        groupName += "," + mzYjReq.getGroupName();
                     }
                 }
             }
-            if(groupName!=null){
-                map.put("groupName",groupName);
+            if (groupName != null) {
+                map.put("groupName", groupName);
             }
         }
         return map;
@@ -306,7 +326,7 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
 
     @Override
     public String queryDateByPatientIdAndTimes(String patientId, Integer times) {
-        return mzYjReqMapper.selectDateByPatientIdAndTimes(patientId,times);
+        return mzYjReqMapper.selectDateByPatientIdAndTimes(patientId, times);
     }
 
     @Override

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

@@ -295,10 +295,10 @@ $(function () {
                         if ($("#jyZdSampleDiv").hasClass('in')) {
                             //此时是检验
                             $("#jyZdSample").next().click();
-                        } else  if ($("#yshPartDiv").hasClass('in')) {
+                        } else if ($("#yshPartDiv").hasClass('in')) {
                             //说明现在是检查
                             $("#yshPart").next().click();
-                        }else  if ($("#chargeUnitDiv").hasClass('in')) {
+                        } else if ($("#chargeUnitDiv").hasClass('in')) {
                             //说明现在是检查
                             $("#yshPart").next().click();
                         }
@@ -432,9 +432,9 @@ $(function () {
                 if ($("#" + webuiID).hasClass("in")) {
                     var arr = $("#tb_table_western_medicine").find("tbody").find("tr.trhover");
                     if (arr != undefined && arr != null && arr.length > 0) {
-                        var dataIndex=$(arr).attr("data-index");
+                        var dataIndex = $(arr).attr("data-index");
                         var tableData = $("#tb_table_western_medicine").bootstrapTable('getData');
-                        if(tableData!=null && tableData.length>0 && dataIndex!=null){
+                        if (tableData != null && tableData.length > 0 && dataIndex != null) {
                             var trData = tableData[dataIndex];
                             checkYpInfo(trData.code, trData.serial, trData.ypType, true);
                             $("#western_medicine_name").click();
@@ -462,9 +462,9 @@ $(function () {
                 if ($("#" + webuiID).hasClass("in")) {
                     var arr = $("#tb_table_chinese_medicine").find("tbody").find("tr.trhover");
                     if (arr != undefined && arr != null && arr.length > 0) {
-                        var dataIndex=$(arr).attr("data-index");
+                        var dataIndex = $(arr).attr("data-index");
                         var tableData = $("#tb_table_chinese_medicine").bootstrapTable('getData');
-                        if(tableData!=null && tableData.length>0 && dataIndex!=null){
+                        if (tableData != null && tableData.length > 0 && dataIndex != null) {
                             var trData = tableData[dataIndex];
                             checkZyInfo(trData.code, trData.serial, true);
                             $("#chinese_medicine_name").click();
@@ -492,9 +492,9 @@ $(function () {
                 if ($("#" + webuiID).hasClass("in")) {
                     var arr = $("#tb_table_jc_jy_item").find("tbody").find("tr.trhover");
                     if (arr != undefined && arr != null && arr.length > 0) {
-                        var dataIndex=$(arr).attr("data-index");
+                        var dataIndex = $(arr).attr("data-index");
                         var tableData = $("#tb_table_jc_jy_item").bootstrapTable('getData');
-                        if(tableData!=null && tableData.length>0 && dataIndex!=null){
+                        if (tableData != null && tableData.length > 0 && dataIndex != null) {
                             var trData = tableData[dataIndex];
 
                             $('#jcJyItem').webuiPopover('hide');
@@ -554,10 +554,10 @@ $(function () {
                         if ($("#jyZdSampleDiv").hasClass('in')) {
                             //此时是检验
                             $("#jyZdSample").next().click();
-                        } else  if ($("#yshPartDiv").hasClass('in')) {
+                        } else if ($("#yshPartDiv").hasClass('in')) {
                             //说明现在是检查
                             $("#yshPart").next().click();
-                        }else  if ($("#chargeUnitDiv").hasClass('in')) {
+                        } else if ($("#chargeUnitDiv").hasClass('in')) {
                             //说明现在是检查
                             $("#yshPart").next().click();
                         }
@@ -3258,6 +3258,12 @@ function saveJyJcItemReal(calculateTotalAmountFlag) {
         return;
     }
 
+    //判断是否有重复的项目  返回true 说明有重复的
+    if (verifyRepeat(currentCode, null, chargeUnitCode, 2)) {
+        return;
+    }
+
+
     //原药品金额 如果是修改则需要设置
     var temporaryItemsAmount = 0;
     //当前需要被移除元素的下个兄弟节点
@@ -4745,7 +4751,7 @@ function loadYpList(index, event) {
                     "rows": {}   //数据
                 };
             }
-            $("#"+medicinePopoverContent).parent().css("background","#EBEBE4");
+            $("#" + medicinePopoverContent).parent().css("background", "#EBEBE4");
             return {
                 "total": ress.data.length,//总页数
                 "rows": ress.data   //数据
@@ -4773,7 +4779,7 @@ function loadYpList(index, event) {
  */
 function checkYpInfo(code, serial, groupNo, needNotice) {
     //判断是否有重复的项目  返回true 说明有重复的
-    if (verifyRepeat(code, serial, 0)) {
+    if (verifyRepeat(code, serial, null, 0)) {
         return;
     }
     $("#current_groupNo").val(groupNo);
@@ -4899,7 +4905,7 @@ function checkYpInfo(code, serial, groupNo, needNotice) {
  */
 function checkZyInfo(code, serial, async) {
     //判断是否有重复的项目  返回true 说明有重复的
-    if (verifyRepeat(code, serial, 1)) {
+    if (verifyRepeat(code, serial, null, 1)) {
         return;
     }
     $.ajax({
@@ -5045,7 +5051,7 @@ function loadjcJyItemList(event) {
                     "rows": {}   //数据
                 };
             }
-            $("#jcJyItemPopoverContent").parent().css("background","#EBEBE4");
+            $("#jcJyItemPopoverContent").parent().css("background", "#EBEBE4");
             return {
                 "total": ress.data.length,//总页数
                 "rows": ress.data   //数据
@@ -5112,10 +5118,10 @@ function loadjcJyItemList(event) {
  */
 //function checkJcJyItemInfo(code, name, type) {
 function checkJcJyItemInfo(code, name, type, async) {
-    //判断是否有重复的项目  返回true 说明有重复的
-    if (verifyRepeat(code, null, 2)) {
-        return;
-    }
+    // //判断是否有重复的项目  返回true 说明有重复的
+    // if (verifyRepeat(code, null, 2)) {
+    //     return;
+    // }
     //不需要每次都关闭帮助树
     //$("#treeButton").webuiPopover('hide');
     $.ajax({
@@ -5300,11 +5306,12 @@ function getJcJyItemChargeByCode(code, jcJyZltype) {
 
 /**
  * 判断是否有重复的项目  返回true 说明有重复的
- * @param code
- * @param serial
+ * @param code 编码
+ * @param serial 药品规格 null 时是非药品
+ * @param chargeUnitCode 检查部位或者检验物 null 时是检查检验
  * @param index
  */
-function verifyRepeat(code, serial, index) {
+function verifyRepeat(code, serial, chargeUnitCode, index) {
     //是新增药品还是编辑 true 修改 默认false
     var updateFlag = $("#update_flag").val();
     if (updateFlag == undefined || updateFlag == null) {
@@ -5336,23 +5343,15 @@ function verifyRepeat(code, serial, index) {
     if (items != null && items.length > 0) {
         for (var i = 0; i < items.length; i++) {
             if (serial == null) {
-                //西药需要判断组号,因为可能会有不同组的皮试用药,需要相同的药品
-                if (index == 0) {
-                    var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
-                    var temporary_items_groupId = $(items[i]).find("input.temporary_items_groupId").val();
-                    if (code === temporary_items_code && groupId === temporary_items_groupId) {
-                        errorMesageSimaple("项目与第" + numToChineseNum(i + 1) + "条重复");
-                        return true;
-                    }
-                } else {
-                    var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
-                    if (code === temporary_items_code) {
-                        errorMesageSimaple("项目与第" + numToChineseNum(i + 1) + "条重复");
-                        return true;
-                    }
+                var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
+                var temporary_items_desc_value = $(items[i]).find("input.temporary_items_desc_value").val();
+                if (code === temporary_items_code && chargeUnitCode === temporary_items_desc_value) {
+                    errorMesageSimaple("项目与第" + numToChineseNum(i + 1) + "条重复");
+                    return true;
                 }
             } else {
                 if (index == 0) {
+                    //西药需要判断组号,因为可能会有不同组的皮试用药,需要相同的药品
                     var temporary_items_groupId = $(items[i]).find("input.temporary_items_groupId").val();
                     var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
                     var temporary_items_serial = $(items[i]).find("input.temporary_items_serial").val();
@@ -7098,7 +7097,7 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                         });
                     }
                     //未缴费状态的时候可以删除处方
-                    if(oriPayMark==5 || oriPayMark=="5"){
+                    if (oriPayMark == 5 || oriPayMark == "5") {
                         $("#deletePrescription").removeClass("hide").addClass("in");
                         $("#deletePrescription").off("click").on("click", function (t) {
                             deletePrescription(clnicId);
@@ -7452,34 +7451,74 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             index++;
                         }
                     }
-                    if (prescriptionDetailJson.zlPrescription != null && prescriptionDetailJson.zlPrescription.length > 0) {
-                        //诊疗处方
-                        var zlPrescription = prescriptionDetailJson.zlPrescription[0].detail;
-                        if (zlPrescription != null && zlPrescription.length > 0) {
-                            var html = "";
-                            for (var i = 0; i < zlPrescription.length; i++) {
-                                html += "<tr><td>";
-                                html += zlPrescription[i];
-                                html += "</td></tr>";
+                    //暂时不打印 诊疗了
+                    var printZlPrescription = false;
+                    if (printZlPrescription) {
+                        if (prescriptionDetailJson.zlPrescription != null && prescriptionDetailJson.zlPrescription.length > 0) {
+                            //诊疗处方
+                            var zlPrescription = prescriptionDetailJson.zlPrescription[0].detail;
+                            if (zlPrescription != null && zlPrescription.length > 0) {
+                                var html = "";
+                                for (var i = 0; i < zlPrescription.length; i++) {
+                                    html += "<tr><td>";
+                                    html += zlPrescription[i];
+                                    html += "</td></tr>";
+                                }
+                                if (index > 0) {
+                                    LODOP.NewPageA();
+                                }
+                                if (res.deptName != undefined && res.deptName != null) {
+                                    if (res.deptName.indexOf("儿") > 0) {
+                                        $("#typePrescription").text("儿科");
+                                        $("#cfTitle").text("儿科");
+                                    } else if (res.deptName.indexOf("急诊科") > 0) {
+                                        $("#typePrescription").text("急诊");
+                                        $("#cfTitle").text("急诊");
+                                    } else {
+                                        $("#typePrescription").text("诊疗处方");
+                                        $("#cfTitle").text("普通");
+                                    }
+                                }
+                                $("#prescriptionDetail").html(html);
+                                $("#cfAmountPrint").text(prescriptionDetailJson.zlPrescription[0].amount + "元 ");
+                                LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("prescription_table").innerHTML);
+                                index++;
                             }
-                            if (index > 0) {
-                                LODOP.NewPageA();
+                        }
+                    }
+                    //检查申请单打印
+                    var mzYjReqList = res.data.mzYjReqList;
+                    if (mzYjReqList != null && mzYjReqList.length > 0) {
+                        $("#patientIdJcReq").text(mzPatientMi.patientId);
+                        $("#patientNameJcReq").text(mzPatientMi.name);
+                        $("#patientGenderJcReq").text(mzPatientMi.gender);
+                        $("#patientAgeJcReq").text(mzPatientMi.age + "岁");
+                        $("#responseTypeJcReq").text(mzPatientMi.responseTypeName);
+                        $("#patientCardNoJcReq").text(mzPatientMi.icCardNo);
+                        $("#icdTextJcReq").text(res.data.icdText);
+                        var mzBlRecord = res.data.mzBlRecord;
+                        $("#jcReqEmrChiefComplaint").text(mzBlRecord.emrChiefComplaint);
+                        $("#jcReqHis").text(mzBlRecord.emrHpi);
+                        var tz = getTz(mzBlRecord);
+                        $("#jcReqTz").text(tz);
+                        $("#jcReqReqDept").text(res.deptName);
+                        $("#jcReqReqDoctor").text(res.doctorName);
+                        for (var i = 0; i < mzYjReqList.length; i++) {
+                            var mzYjReq = mzYjReqList[i];
+                            if (i == 0) {
+                                var dateStr = format(mzYjReq.reqDate, "yyyy-MM-dd");
+                                $("#jcReqReqDate").text(dateStr);
                             }
-                            if (res.deptName != undefined && res.deptName != null) {
-                                if (res.deptName.indexOf("儿") > 0) {
-                                    $("#typePrescription").text("儿科");
-                                    $("#cfTitle").text("儿科");
-                                } else if (res.deptName.indexOf("急诊科") > 0) {
-                                    $("#typePrescription").text("急诊");
-                                    $("#cfTitle").text("急诊");
-                                } else {
-                                    $("#typePrescription").text("诊疗处方");
-                                    $("#cfTitle").text("普通");
-                                }
+                            if (mzYjReq == null || mzYjReq.reqType == 2) {
+                                continue;
                             }
-                            $("#prescriptionDetail").html(html);
-                            $("#cfAmountPrint").text(prescriptionDetailJson.zlPrescription[0].amount + "元 ");
-                            LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("prescription_table").innerHTML);
+                            if ((i == 0 && index > 0) || i > 0) {
+                                LODOP.NewPageA();
+                            }
+                            $("#reqNoJcReq").text(mzYjReq.reqNo);
+                            $("#jcReqItem").text(mzYjReq.groupName);
+                            $("#jcReqRemark").text(mzYjReq.jyRemark);
+                            LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("jc_card_table").innerHTML);
                             index++;
                         }
                     }
@@ -8038,7 +8077,8 @@ function deletePrescription(clnicId) {
     });
     $("#cancelButton").off("click").on("click", function (t) {
         $("#visitingDetailModal").modal();
-    });;
+    });
+    ;
 }
 
 
@@ -8455,43 +8495,43 @@ function queryInspectionDetail(orderId) {
                             }
                             html += "<td width='25%'>" + range + "</td>";
                             html += "</tr>";
-                            var bacteriaResults=obj.bacteriaResults;
-                            if(bacteriaResults==null || bacteriaResults.length==0){
+                            var bacteriaResults = obj.bacteriaResults;
+                            if (bacteriaResults == null || bacteriaResults.length == 0) {
                                 continue;
                             }
-                            var bacteriaResult= bacteriaResults[0];
-                            if(bacteriaResult==null || bacteriaResult.length==0){
+                            var bacteriaResult = bacteriaResults[0];
+                            if (bacteriaResult == null || bacteriaResult.length == 0) {
                                 continue;
                             }
-                            var antibioticResults=bacteriaResult.antibioticResults;
-                            if(antibioticResults==null || antibioticResults.length==0){
+                            var antibioticResults = bacteriaResult.antibioticResults;
+                            if (antibioticResults == null || antibioticResults.length == 0) {
                                 continue;
                             }
-                            html+= '<tr><th width="35%;" style="text-align: left;padding-left: 2%;" >抗菌药物</th><th width="20%;" style="text-align: left;">药物编码</th><th width="30%;" style="text-align: left;">MIC值</th><th width="15%;" style="text-align: left;padding-right: 2%;">敏感性</th></tr>';
+                            html += '<tr><th width="35%;" style="text-align: left;padding-left: 2%;" >抗菌药物</th><th width="20%;" style="text-align: left;">药物编码</th><th width="30%;" style="text-align: left;">MIC值</th><th width="15%;" style="text-align: left;padding-right: 2%;">敏感性</th></tr>';
                             for (var j = 0; j < antibioticResults.length; j++) {
-                                var antibioticResultsObj=antibioticResults[j];
-                                html+= "<tr>";
-                                html+="<td width='35%' style='padding-left: 2%;";
-                                if(j==0){
-                                    html+="border-top: 1px solid black;";
+                                var antibioticResultsObj = antibioticResults[j];
+                                html += "<tr>";
+                                html += "<td width='35%' style='padding-left: 2%;";
+                                if (j == 0) {
+                                    html += "border-top: 1px solid black;";
                                 }
-                                html+="'>" + antibioticResultsObj.anti_NAME_CN + "</td>";
-                                html+="<td width='20%' ";
-                                if(j==0){
-                                    html+="style='border-top: 1px solid black;'";
+                                html += "'>" + antibioticResultsObj.anti_NAME_CN + "</td>";
+                                html += "<td width='20%' ";
+                                if (j == 0) {
+                                    html += "style='border-top: 1px solid black;'";
                                 }
-                                html+=">" + antibioticResultsObj.anti_ABB + "</td>";
-                                html+="<td width='25%' ";
-                                if(j==0){
-                                    html+="style='border-top: 1px solid black;'";
+                                html += ">" + antibioticResultsObj.anti_ABB + "</td>";
+                                html += "<td width='25%' ";
+                                if (j == 0) {
+                                    html += "style='border-top: 1px solid black;'";
                                 }
-                                html+=">" + antibioticResultsObj.anti_MIC + "</td>";
-                                html+="<td width='20%' style='padding-right: 2%;";
-                                if(j==0){
-                                    html+="border-top: 1px solid black;";
+                                html += ">" + antibioticResultsObj.anti_MIC + "</td>";
+                                html += "<td width='20%' style='padding-right: 2%;";
+                                if (j == 0) {
+                                    html += "border-top: 1px solid black;";
                                 }
-                                html+="'>" + antibioticResultsObj.anti_VALUE + "</td>";
-                                html+= "</tr>";
+                                html += "'>" + antibioticResultsObj.anti_VALUE + "</td>";
+                                html += "</tr>";
                             }
                         }
                     }