Ver código fonte

宁波中医院 嵊州:规则处理

wangsy 4 anos atrás
pai
commit
900283f810

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/dutyshiftsystem/DUT0597.java

@@ -32,7 +32,7 @@ public class DUT0597 extends QCCatalogue {
         }
         String rollOutRecordDateStr = "", recordDateStr = "", removeDate = "";
         List<TransferOutDoc> transferOutDocs = transferRecordDoc.getTransferOutDocs();
-        if (transferOutDocs == null || transferOutDocs.get(0).getStructureMap() == null) {
+        if (transferOutDocs == null || transferOutDocs.size() == 0 || transferOutDocs.get(0).getStructureMap() == null) {
             return;
         }
         //转入时间

+ 3 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/dutyshiftsystem/DUT0598.java

@@ -35,7 +35,7 @@ public class DUT0598 extends QCCatalogue {
         List<TransferIntoDoc> transferIntoDocs = transferRecordDoc.getTransferIntoDocs();
         String rollInRecordDateStr = "", recordDateStr = "", removeDate = "";
         Date rollOutRecordDate = null, recordDate = null;
-        if (transferIntoDocs == null || transferIntoDocs.get(0).getStructureMap() == null) {
+        if (transferIntoDocs == null || transferIntoDocs.size() == 0 || transferIntoDocs.get(0).getStructureMap() == null) {
             return;
         }
         //转入时间
@@ -89,9 +89,9 @@ public class DUT0598 extends QCCatalogue {
             }
         }
     }
+
     private String getKeyByHospitalId() {
-        switch (Content.hospital_Id)
-        {
+        switch (Content.hospital_Id) {
             case "7":               //厦门
                 return "病历日期";
             default:

+ 173 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/operationdiscussion/OPE0369.java

@@ -0,0 +1,173 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.operationdiscussion;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.util.DateUtil;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.util.*;
+
+/**
+ * @Description: 手术患者缺术前主刀医师查房记录
+ * @author: WANGSY
+ * @time: 2020/11/11 11:22
+ */
+@Component
+public class OPE0369 extends QCCatalogue {
+
+    @Override
+    protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        status.set("0");
+        if (outputInfo.getResult() != null) {
+            Map<String, Object> thr03090 = outputInfo.getResult().get("THR03090");
+            if (thr03090 != null && thr03090.size() > 0 && thr03090.get("status").equals("-1")) {
+                return;
+            }
+        }
+
+        MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
+        String admisTime = "";
+        if (medicalRecordInfoDoc != null && medicalRecordInfoDoc.getStructureMap() != null) {
+            //入院日期
+            admisTime = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
+            if (CatalogueUtil.isEmpty(admisTime)) {
+                return;
+            }
+        }
+        //先判断是否有手术记录
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            return;
+        }
+        List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
+        int operationCount = getOperationSum(operationDocs); // 获取手术记录次数
+//        long operationCount = operationDocs.stream().filter(operationDoc -> operationDoc.getOperationRecordDoc() != null).count();
+        //主刀查房次数
+        long operateCount = 0;
+        if (operationCount > 0) {
+            //存在手术记录无查房记录
+            if (ListUtil.isEmpty(threeLevelWardDocs)) {
+                status.set("-1");
+                return;
+            }
+            String operationStartDate = "";
+            List<Date> operDateList = new ArrayList<>();
+            for (OperationDoc operationDoc : operationDocs) {
+                if (operationDoc.getOperationRecordDoc() != null) {
+                    Map<String, String> operationDocStructureMap = operationDoc.getOperationRecordDoc().getStructureMap();
+                    operationStartDate = operationDocStructureMap.get("手术日期");
+                    if (StringUtil.parseDateTime(operationStartDate) == null) {
+                        continue;
+                    }
+                    if (StringUtil.isNotBlank(operationStartDate)) {
+                        if (!CatalogueUtil.compareTime(
+                                StringUtil.parseDateTime(admisTime),
+                                StringUtil.parseDateTime(operationStartDate),
+                                Long.valueOf(30))) {
+                            continue;
+                        }
+                        operDateList.add(StringUtil.parseDateTime(operationStartDate));
+                    } else {//取不到手术时间
+                        return;
+                    }
+                }
+            }
+
+            if (operDateList.size() > 1) {
+                for (int i = 0; i < operDateList.size(); i++) {
+                    if (i + 1 < operDateList.size()) {
+                        if (!CatalogueUtil.compareTime(operDateList.get(i), operDateList.get(i + 1),
+                                Long.valueOf(24 * 60))) {//如果手术记录是同一天,需有一次术前主刀查房
+                            operationCount--;
+                        }
+                    }
+                }
+            }
+
+            ThreeLevelWardDoc threeLevelWardDoc = threeLevelWardDocs.get(0);
+            List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
+            for (ThreeLevelWardDoc threeLevelWard : allDoctorWradDocs) {
+                Map<String, String> structureMap = threeLevelWard.getStructureMap();
+                String makeTitle = structureMap.get("查房标题");
+                String writTitle = structureMap.get("文书标题");
+                String recordDateStr = structureMap.get("查房日期");
+                if (operDateList.size() > 0) {
+                    for (Date date : operDateList) {
+                        if (StringUtil.isNotBlank(recordDateStr) && date != null
+                                && StringUtil.parseDateTime(recordDateStr).before(date)) {
+                            if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(recordDateStr), date, Long.valueOf(24 * 60))
+                                    && (((StringUtil.isNotBlank(makeTitle) && makeTitle.contains("主刀")) || (StringUtil.isNotBlank(writTitle) && writTitle.contains("主刀")))
+                                    || ((StringUtil.isNotBlank(makeTitle) && makeTitle.contains("术前")) || (StringUtil.isNotBlank(writTitle) && writTitle.contains("术前"))))) {
+                                operateCount++;
+                            }
+                        }
+                    }
+                } else {//手术开始时间跟入院时间 小于30分钟,规则不判断
+                    return;
+                }
+            }
+        }
+
+        if (operationCount > 0 && operationCount > operateCount) {
+            status.set("-1");
+            return;
+        }
+    }
+
+
+    /**
+     * 获取手术记录次数
+     *
+     * @param operationDocs
+     * @return
+     */
+    private int getOperationSum(List<OperationDoc> operationDocs) {
+        List<Map<String, Date>> operationDateList = new ArrayList<>();
+        Map<String, Date> operationDate = null;
+        for (OperationDoc operationDoc : operationDocs) {
+            OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+            if (operationRecordDoc == null) {
+                continue;
+            }
+            Map<String, String> structureMap = operationRecordDoc.getStructureMap();
+            String operationStartDateStr = structureMap.get("手术日期");
+            if (StringUtil.isNotBlank(operationStartDateStr) && StringUtil.parseDateTime(operationStartDateStr) != null) {
+                Date operationStartDate = StringUtil.parseDateTime(operationStartDateStr);
+                operationStartDate = DateUtil.dateZeroClear(operationStartDate);
+                if (operationStartDate != null) {
+                    /* 放第一个手术记录的日期到operationDateList */
+                    if (operationDateList.size() == 0) {
+                        operationDate = new HashMap<>();
+                        operationDate.put("手术日期", operationStartDate);
+                        operationDateList.add(operationDate);
+                        continue;
+                    }
+                    /* 如果其中一个手术记录的开始时间到结束时间之间还包含另一个手术,就不往operationDateList里加 */
+                    boolean findInnerOperation = false;
+                    for (Map<String, Date> date : operationDateList) {
+                        Date listStartDate = DateUtil.dateZeroClear(date.get("手术日期"));
+                        if (listStartDate.equals(operationStartDate)) {
+                            findInnerOperation = true;
+                            break;
+                        }
+                    }
+                    if (!findInnerOperation) {
+                        operationDate = new HashMap<>();
+                        operationDate.put("手术日期", operationStartDate);
+                        operationDateList.add(operationDate);
+                    }
+                }
+            }
+        }
+        return operationDateList.size();
+    }
+}

+ 98 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/threelevelward/THR0134.java

@@ -0,0 +1,98 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.threelevelward;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
+import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @ClassName : THR0134
+ * @Description : 上级医师(主治医师)首次查房无初步诊断
+ * @Author : 胡敬
+ * @Date: 2020-03-23 14:16
+ */
+@Component
+public class THR0134 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+        //先取结构化数据判断
+        Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
+        String admisDateStr = inputInfo.getBeHospitalizedDoc().getStructureMap().get("入院日期");
+        String recordDateStr = firstAttendStructureMap.get("查房日期");
+        String content = firstAttendStructureMap.get("病情记录");
+        if (content.contains("诊断明确") || content.contains("目前诊断") || content.contains("目前考虑") || content.contains("当前诊断") ||
+                content.contains("考虑诊断") || content.contains("诊断考虑") || content.contains("诊断基本明确") || content.contains("初步诊断") ||
+                content.contains("诊断为") || regexFind(content, "诊断", "基本明确")) {
+            status.set("0");
+            return;
+        }
+        if (CatalogueUtil.isEmpty(admisDateStr) || CatalogueUtil.isEmpty(recordDateStr)) {
+            status.set("0");
+            return;
+        }
+        //如果首次查房超过48小时则不判断该条规则
+        if (CatalogueUtil.compareTime(StringUtil.parseDateTime(admisDateStr), StringUtil.parseDateTime(recordDateStr), 48 * 60L)) {
+            status.set("0");
+            return;
+        }
+        //如果首次查房在手术记录之后不提示规则
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs != null) {
+            for (OperationDoc operationDoc : operationDocs) {
+                if (operationDoc.getOperationRecordDoc() != null) {
+                    Map<String, String> structureMap = operationDoc.getOperationRecordDoc().getStructureMap();
+                    String opeEndDate = structureMap.get("手术日期");
+                    if (StringUtil.isBlank(opeEndDate)) {
+                        opeEndDate = structureMap.get("日期");
+                    }
+                    if (StringUtil.parseDateTime(opeEndDate) == null) {
+                        continue;
+                    }
+                    if (StringUtil.isNotBlank(opeEndDate) &&
+                            StringUtil.parseDateTime(opeEndDate).before(StringUtil.parseDateTime(recordDateStr))) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+        ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+        if (firstAttendLabel == null) {
+            return;
+        }
+
+        if (firstAttendLabel.getDiags().size() != 0 || StringUtil.isNotBlank(firstAttendLabel.getDiagText())) {
+            status.set("0");
+        }
+    }
+
+    private boolean regexFind(String content, String... str) {
+        String s = "";
+        for (String word : str) {
+            s += word + ".*";
+        }
+        s = s.substring(0, s.lastIndexOf(".*"));
+        Pattern p = Pattern.compile(s);
+        Matcher m = p.matcher(content);
+        return m.find();
+    }
+}

+ 99 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/threelevelward/THR0139.java

@@ -0,0 +1,99 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.threelevelward;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
+import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @ClassName : THR0139
+ * @Description : 上级医师(副主任医师/主任医师)首次查房无补充诊断/初步诊断/修正诊断
+ * @Author : 胡敬
+ * @Date: 2020-03-23 14:16
+ */
+@Component
+public class THR0139 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+        //先取结构化数据判断
+        Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
+        String admisDateStr = inputInfo.getBeHospitalizedDoc().getStructureMap().get("入院日期");
+        String recordDateStr = firstDirectStructureMap.get("查房日期");
+        String content = firstDirectStructureMap.get("病情记录");
+        if (content.contains("诊断明确") || content.contains("目前诊断") || content.contains("目前考虑") || content.contains("当前诊断") ||
+                content.contains("考虑诊断") || content.contains("诊断考虑") || content.contains("诊断基本明确") || content.contains("初步诊断") ||
+                content.contains("诊断为") || regexFind(content, "诊断", "基本明确")) {
+            status.set("0");
+            return;
+        }
+
+        if (CatalogueUtil.isEmpty(admisDateStr) || CatalogueUtil.isEmpty(recordDateStr)) {
+            status.set("0");
+            return;
+        }
+        //如果首次查房超过72小时则不判断该条规则
+        if (CatalogueUtil.compareTime(StringUtil.parseDateTime(admisDateStr), StringUtil.parseDateTime(recordDateStr), 72 * 60L)) {
+            status.set("0");
+            return;
+        }
+        //如果首次查房在手术记录之后不提示规则
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs != null) {
+            for (OperationDoc operationDoc : operationDocs) {
+                if (operationDoc.getOperationRecordDoc() != null) {
+                    Map<String, String> structureMap = operationDoc.getOperationRecordDoc().getStructureMap();
+                    String opeEndDate = structureMap.get("手术日期");
+                    if (StringUtil.isBlank(opeEndDate)) {
+                        opeEndDate = structureMap.get("日期");
+                    }
+                    if (StringUtil.parseDateTime(opeEndDate) == null) {
+                        continue;
+                    }
+                    if (StringUtil.isNotBlank(opeEndDate) &&
+                            StringUtil.parseDateTime(opeEndDate).before(StringUtil.parseDateTime(recordDateStr))) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+        ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+        if (firstDirectLabel == null) {
+            return;
+        }
+
+        if (firstDirectLabel.getDiags().size() != 0 || StringUtil.isNotBlank(firstDirectLabel.getDiagText())) {
+            status.set("0");
+        }
+    }
+
+    private boolean regexFind(String content, String... str) {
+        String s = "";
+        for (String word : str) {
+            s += word + ".*";
+        }
+        s = s.substring(0, s.lastIndexOf(".*"));
+        Pattern p = Pattern.compile(s);
+        Matcher m = p.matcher(content);
+        return m.find();
+    }
+}

+ 158 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/threelevelward/THR02900.java

@@ -0,0 +1,158 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.threelevelward;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.util.DateUtil;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : THR02900
+ * @Description : 术后24小时内无主刀或一助查房记录
+ * @Author : 胡敬
+ * @Date: 2020-05-27 14:23
+ */
+@Component
+public class THR02900 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getOperationDocs().size() == 0) {
+            return;
+        }
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        List<ThreeLevelWardDoc> allDoctorWradDocs = new ArrayList<>();
+        if (inputInfo.getThreeLevelWardDocs() != null && inputInfo.getThreeLevelWardDocs().size() > 0) {
+            allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        }
+        //标题
+        String allTitle = "";
+        //病情记录
+        String allPathography = "";
+        String[] split = null;
+        //一助或助手
+        String firstAssistant = "";
+        //手术结束时间
+        String opeEndTime = "";
+        for (OperationDoc operationDoc : operationDocs) {
+            OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+            if (operationRecordDoc == null) {
+                continue;
+            }
+            Map<String, String> structureMap = operationRecordDoc.getStructureMap();
+            String opeAssName = structureMap.get("手术人员");
+            if (StringUtil.isNotBlank(opeAssName)) {
+                split = opeAssName.split(" ");
+                firstAssistant = structureMap.get("助手");
+                opeEndTime = structureMap.get("手术日期");
+            } else {
+                firstAssistant = structureMap.get("一助");
+                //取得手术时间截取结束时间(格式 2020-07-24 10:30-2020-07-24 11:45)
+                String key = getKeyByHospitalId();
+                opeEndTime = structureMap.get(key);
+                opeEndTime = getTime(opeEndTime, structureMap);
+            }
+            String chiefSurgeon = structureMap.get("主刀医师");
+            if (opeEndTime.contains("年月日")) {
+                continue;
+            }
+            Date opeEndDate = CatalogueUtil.parseStringDate(opeEndTime);
+            if (opeEndDate == null) {
+                continue;
+            }
+            if (!CatalogueUtil.compareTime(
+                    StringUtil.parseDateTime(opeEndTime),
+                    StringUtil.parseDateTime(DateUtil.nowString()),
+                    Long.valueOf(24 * 60))) {//如果接收未超过6小时,规则不判断
+                return;
+            } else {
+                if ((StringUtil.isNotEmpty(chiefSurgeon) || StringUtil.isNotEmpty(firstAssistant)) && ListUtil.isEmpty(allDoctorWradDocs)) {
+                    status.set("-1");
+                    return;
+                }
+            }
+            if (ListUtil.isNotEmpty(allDoctorWradDocs)) {
+                for (ThreeLevelWardDoc wardDoc : allDoctorWradDocs) {
+                    Map<String, String> wardStructureMap = wardDoc.getStructureMap();
+                    String recordDateStr = wardStructureMap.get("查房日期");
+                    String recordTitle = wardStructureMap.get("查房标题");
+                    String writTitle = wardStructureMap.get("文书标题");
+                    String pathography = wardStructureMap.get("病情记录");
+                    Date recordDate = CatalogueUtil.parseStringDate(recordDateStr);
+                    if (StringUtil.isBlank(recordTitle) || StringUtil.isBlank(pathography) || recordDate == null) {
+                        continue;
+                    }
+                    if (opeEndDate.before(recordDate) && !CatalogueUtil.compareTime(opeEndDate, recordDate, 24 * 60L)) {
+                        allTitle += recordTitle;
+                        allPathography += pathography;
+                        if (StringUtil.isNotBlank(writTitle)) {
+                            allTitle += writTitle;
+                        }
+                    }
+                }
+            }
+            //查房标题中有主刀
+            if (allTitle.contains("主刀") || allTitle.contains("术后第一天") || allTitle.contains("术后第1天")) {
+                return;
+            }
+            //病情记录对比
+            if ((StringUtil.isNotBlank(chiefSurgeon) && allPathography.contains(chiefSurgeon)) || allPathography.contains("术后第一天") || allPathography.contains("术后第1天") ||
+                    (StringUtil.isNotBlank(firstAssistant) && allPathography.contains(firstAssistant))) {
+                return;
+            }
+            //查房标题对比
+            if (StringUtil.isNotBlank(chiefSurgeon) && !allTitle.contains(chiefSurgeon) &&
+                    StringUtil.isNotBlank(firstAssistant) && !allTitle.contains(firstAssistant)) {
+                status.set("-1");
+                return;
+            } else if (StringUtil.isBlank(chiefSurgeon) && StringUtil.isBlank(firstAssistant) && split != null && split.length > 1) {
+                for (int i = 0; i < split.length; i++) {
+                    if (allTitle.contains(split[i])) {
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    private String getTime(String opeEndTime, Map<String, String> structureMap) {
+        String time = "";
+        switch (Content.hospital_Id) {
+            case "7":               //厦门
+                if (StringUtil.isBlank(opeEndTime)) {
+                }
+                String endTime = structureMap.get("结束时间");
+                if (StringUtil.isNotBlank(endTime)) {
+                    if (endTime.length() > 5) {
+                        time = opeEndTime.substring(0, Math.min(5, opeEndTime.length())) + endTime;
+                    } else {
+                        time = opeEndTime + " " + endTime;
+                    }
+                }
+                return time;
+            default:
+                time = opeEndTime.substring(17);
+                return time;
+        }
+    }
+
+    private String getKeyByHospitalId() {
+        switch (Content.hospital_Id) {
+            case "7":               //厦门
+                return "病历日期";
+            default:
+                return "记录时间";
+        }
+    }
+}

+ 85 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/threelevelward/THR03090.java

@@ -0,0 +1,85 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.threelevelward;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.util.DateUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @ClassName : THR03090
+ * @Description : 手术患者无术前主刀医师查房记录
+ * @Author : wsy
+ * @Date: 2021-01-11 10:39
+ */
+@Component
+public class THR03090 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
+        long cou = inputInfo.getOperationDocs().stream().map(OperationDoc::getOperationRecordDoc).filter(Objects::nonNull).count();
+        if (cou == 0) {
+            return;
+        }
+        if (threeLevelWardDocs.size() == 0 && cou > 0) {
+            status.set("-1");
+            return;
+        }
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            return;
+        }
+        String operationStartDate = "";
+        if (operationDocs.get(operationDocs.size() - 1).getOperationRecordDoc() != null) {
+            Map<String, String> operationDocStructureMap = operationDocs.get(operationDocs.size() - 1).getOperationRecordDoc().getStructureMap();
+            operationStartDate = operationDocStructureMap.get("手术日期");
+            if (StringUtil.parseDateTime(operationStartDate) == null) {
+                return;
+            }
+        }
+
+        List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
+        for (ThreeLevelWardDoc threeLevelWard : allDoctorWradDocs) {
+            Map<String, String> structureMap = threeLevelWard.getStructureMap();
+            String makeTitle = structureMap.get("查房标题");
+            String writTitle = structureMap.get("文书标题");
+            String makeDate = structureMap.get("查房日期");
+            if (StringUtil.isNotBlank(makeDate) && StringUtil.parseDateTime(makeDate).before(StringUtil.parseDateTime(operationStartDate))) {
+                if (((StringUtil.isNotBlank(makeTitle) && makeTitle.contains("主刀")) || (StringUtil.isNotBlank(writTitle) && writTitle.contains("主刀"))
+                        || ((StringUtil.isNotBlank(makeTitle) && makeTitle.contains("术前")) || (StringUtil.isNotBlank(writTitle) && writTitle.contains("术前"))))) {
+                    return;
+                }
+            }
+        }
+
+        //判断医嘱里有无手术
+        List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
+        if (doctorAdviceDocs.size() == 0) {
+            return;
+        }
+        for (DoctorAdviceDoc dad : doctorAdviceDocs) {
+            String name = dad.getStructureMap().get("医嘱项目名称");
+            if (name.contains("非手术") || name.contains("手术室") || (name.contains("手术") && name.contains("取消")) || (name.contains("暂停") && name.contains("手术")) || name.contains("静脉穿刺置管术") || name.startsWith("停") || name.contains("前一次")
+                    || name.contains("特殊病人手术使用一次性卫生材料") || name.contains("人免疫缺陷病毒抗体检测免费")) {
+                continue;
+            }
+            if (name.contains("手术")) {
+                status.set("-1");
+                return;
+            }
+        }
+
+        if (cou > 0) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 32 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/deathrecord/DEAR0344.java

@@ -0,0 +1,32 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.deathrecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0344
+ * @Description : 死亡记录无抢救经过
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:35
+ */
+@Component
+public class DEAR0344 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            String diagnosisTreatmentProcess = deathRecordStructureMap.get("诊疗经过");
+            if (CatalogueUtil.isEmpty(diagnosisTreatmentProcess)) {
+                return;
+            }
+            if (!diagnosisTreatmentProcess.contains("救")) {
+                status.set("-1");
+            }
+        }
+    }
+}