Browse Source

宁波中医院:嵊州:规则更新

wangsy 4 years ago
parent
commit
191c39f28e

+ 68 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/behospitalized/BEH0042.java

@@ -0,0 +1,68 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.behospitalized;
+
+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.entity.Address;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 出生地未描述
+ * @author: rengb
+ * @time: 2020/3/10 14:02
+ */
+@Component
+public class BEH0042 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if(inputInfo.getBeHospitalizedDoc() == null){
+            status.set("0");
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        if (StringUtils.isNotEmpty(structureMap.get("出生地"))) {
+            status.set("0");
+            return;
+        }
+
+        if (StringUtils.isNotEmpty(structureMap.get("籍贯"))) {
+            status.set("0");
+            return;
+        }
+
+        String text = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getText();
+        if (StringUtil.isBlank(text)) {
+            return;
+        }
+        List<Address> addresses = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getAddresses();
+        if (ListUtil.isNotEmpty(addresses)) {
+            long count = addresses.stream().filter(i -> {
+                boolean flag = false;
+                if (i != null && StringUtil.isNotBlank(i.getName())) {
+                    if (i.getName().indexOf("出生") > -1) {
+                        flag = true;
+                    } else {
+                        Pattern pattern = Pattern.compile("[\\s\\S]*(出生|生长)[\\s\\S]{0,5}" + i.getName() + "[\\s\\S]*");
+                        flag = pattern.matcher(text).matches();
+                    }
+                }
+                return flag;
+            }).count();
+            if (count > 0) {
+                status.set("0");
+            }
+        }
+        if (text.contains("出生")|| text.contains("生于")|| text.contains("见旧病历") || text.contains("见既往病历")) {
+            status.set("0");
+        }
+    }
+
+}

+ 81 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/behospitalized/BEH0441.java

@@ -0,0 +1,81 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.behospitalized;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+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.entity.General;
+import com.lantone.qc.pub.model.entity.GeneralDesc;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * @ClassName : BEH0441
+ * @Description :  现病史缺少发病以来食欲描述
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH0441 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        if (presentLabel == null) {
+            status.set("0");
+            return;
+        }
+        List<String> words = Lists.newArrayList("纳", "食欲", "饮食", "睡眠"
+                , "禁食", "未食", "鼻饲", "饮", "未进食");
+        String presentText = presentLabel.getText();
+        if (StringUtil.isNotBlank(presentText)) {
+            for (String word : words) {
+                if (presentText.contains(word)) {
+                    status.set("0");
+                    return;
+                }
+            }
+        } else if("7".equals(Content.hospital_Id)) {
+            status.set("0");
+            return;
+        }
+        List<GeneralDesc> generals = presentLabel.getGenerals();
+        List<General> gens = presentLabel.getGens();
+
+        if (ListUtil.isEmpty(generals) && ListUtil.isEmpty(gens)) {
+            status.set("0");
+            return;
+        }
+
+        if (ListUtil.isNotEmpty(generals)) {
+            for (GeneralDesc general : generals) {
+                for (String word : words) {
+                    if (general.getName().contains(word)) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+
+        if (ListUtil.isNotEmpty(gens)) {
+            for (General general : gens) {
+                for (String word : words) {
+                    if (general.getName().contains(word)) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+
+    }
+}

+ 75 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/behospitalized/BEH0445.java

@@ -0,0 +1,75 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.behospitalized;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+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.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.entity.General;
+import com.lantone.qc.pub.model.entity.GeneralDesc;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * @ClassName : BEH0445
+ * @Description :  现病史缺少发病以来睡眠描述
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH0445 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        if (beHospitalizedDoc == null) {
+            status.set("0");
+            return;
+        }
+        PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
+        if (presentLabel == null) {
+            status.set("0");
+            return;
+        }
+        String presentText = presentLabel.getText();
+        if (StringUtil.isNotBlank(presentText)) {
+            List<String> words = Lists.newArrayList("睡眠", "未眠", "未睡", "未入眠", "入睡", "纳眠", "夜眠", "镇静","寐");
+            for (String word : words) {
+                if (presentText.contains(word)) {
+                    status.set("0");
+                    return;
+                }
+            }
+        } else if("7".equals(Content.hospital_Id)) {
+            status.set("0");
+            return;
+        }
+        List<GeneralDesc> generals = presentLabel.getGenerals();
+        List<General> gens = presentLabel.getGens();
+        if (ListUtil.isEmpty(generals) && ListUtil.isEmpty(gens)) {
+            status.set("0");
+            return;
+        }
+        if (ListUtil.isNotEmpty(generals)) {
+            for (GeneralDesc general : generals) {
+                if (general.getName().contains("睡眠") || general.getName().contains("纳眠") || general.getName().contains("入睡")) {
+                    status.set("0");
+                    break;
+                }
+            }
+        }
+
+        if (ListUtil.isNotEmpty(gens)) {
+            for (General general : gens) {
+                if (general.getName().contains("睡眠") || general.getName().contains("纳眠") || general.getName().contains("入睡")) {
+                    status.set("0");
+                    break;
+                }
+            }
+        }
+    }
+}

+ 57 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/firstcourserecord/FIRC03086.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.firstcourserecord;
+
+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.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.label.TreatPlanLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRC03086
+ * @Description : 治疗措施不具体(缺护理级别)
+ * @Author : wsy
+ * @Date: 2021-01-07 15:21
+ */
+@Component
+public class FIRC03086 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
+        if (firstCourseRecordDoc == null) {
+            status.set("0");
+            return;
+        }
+        TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
+        if (treatPlanLabel == null) {
+            status.set("0");
+            return;
+        }
+        String text = treatPlanLabel.getText();
+        boolean findText = false;
+        if (StringUtil.isNotBlank(text) && text.contains("护理")) {
+            findText = true;
+        }
+        Map<String, String> structureMap = firstCourseRecordDoc.getStructureMap();
+        String structureV = structureMap.get("诊疗计划");
+        if (StringUtil.isBlank(structureV) && StringUtil.isBlank(text)) {
+            status.set("0");
+            return;
+        }
+        if (StringUtil.isNotBlank(structureV) && (structureV.contains("护理") || structureV.contains("三级") || structureV.contains("二级") || structureV.contains("一级"))) {
+            findText = true;
+        }
+        if (treatPlanLabel.getNursingLevel() != null) {
+            if (findText && !treatPlanLabel.getNursingLevel().getName().contains("护理常规")) {
+                status.set("0");
+                return;
+            }
+        }
+        if (treatPlanLabel.getNursingLevel() == null || treatPlanLabel.getNursingLevel().getName().contains("护理常规")) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 109 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/leavehospital/LEA0149.java

@@ -0,0 +1,109 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.leavehospital;
+
+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.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.doc.DeathRecordDoc;
+import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 出院记录内容缺主诉
+ * @author: rengb
+ * @time: 2020/3/10 13:53
+ */
+@Component
+public class LEA0149 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        if (leaveHospitalDoc == null || beHospitalizedDoc == null) {
+            status.set("0");
+            return;
+        }
+        DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
+        if (deathRecordDoc != null) {
+            status.set("0");
+            return;
+        }
+        Map<String, String> lhStructureMap = leaveHospitalDoc.getStructureMap();
+        ChiefLabel chiefLabel = beHospitalizedDoc.getChiefLabel();
+        if (lhStructureMap != null && chiefLabel != null) {
+            String bhChief = CatalogueUtil.int2ChineseNum(chiefLabel.getText().replaceAll("[\\p{Punct}\\pP。-]", ""));
+            String leaveChief = lhStructureMap.get("主诉");
+            String key = getKeyByHospitalId();
+            String bhThings = lhStructureMap.get(key);
+            String reThings = lhStructureMap.get("病史摘要");   //宁波中医院主诉在病史摘要内
+            if (StringUtil.isNotBlank(bhThings)) {
+                bhThings = CatalogueUtil.int2ChineseNum(bhThings.replaceAll("[\\p{Punct}\\pP。-]", ""));
+                if (bhThings.contains("\n")) {
+                    bhThings = bhThings.replace("\n", "");
+                }
+            }
+            if (StringUtil.isNotBlank(reThings)) {
+                reThings = CatalogueUtil.int2ChineseNum(reThings.replaceAll("[\\p{Punct}\\pP。-]", ""));
+                if (reThings.contains("\n")) {
+                    reThings = reThings.replace("\n", "");
+                }
+            }
+
+            //如果出院小结结构化数据能取出主诉,则直接用该主诉和入院记录主诉比较
+            if (StringUtil.isNotBlank(leaveChief)) {
+                leaveChief = CatalogueUtil.int2ChineseNum(leaveChief.replaceAll("[\\p{Punct}\\pP。-]", ""));
+                if (bhChief.equals(leaveChief)) {
+                    status.set("0");
+                    return;
+                }
+            }
+            if (StringUtil.isNotBlank(bhThings) && bhThings.replace(" ", "").contains(bhChief.replace(" ", ""))) {
+                status.set("0");
+                return;
+            }
+            //宁波中医院主诉在病史摘要内
+            if (StringUtil.isNotBlank(reThings) && reThings.replace(" ", "").contains(bhChief.replace(" ", ""))) {
+                status.set("0");
+                return;
+            }
+            if (StringUtils.isNotBlank(bhThings)) {
+                Pattern compile = Pattern.compile("(?<=2.).*(?=3.体格检查)");
+                Matcher matcher = compile.matcher(bhThings);
+                while (matcher.find()) {
+                    String number = matcher.group(0);
+                    if (CatalogueUtil.isEmpty(number)) {
+                        status.set("-1");
+                    }
+                }
+                //处理台州的
+                if (bhThings.contains("患者因")) {
+                    status.set("0");
+                }
+            }
+
+
+            //                    bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
+            //                    if (bhThings.indexOf(bhChief) < 0) {
+            //                        status.set("-1");
+            //                    }
+        }
+    }
+    private String getKeyByHospitalId() {
+        switch (Content.hospital_Id)
+        {
+            case "7":               //厦门
+                return "病史摘要";
+            default:
+                return "入院情况";
+        }
+    }
+}

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

@@ -0,0 +1,68 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.operationdiscussion;
+
+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.operation.OperationDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description: 术后首次病程记录未记录患者生命体征
+ * @author: 胡敬
+ * @time: 2020/3/24 13:28
+ */
+@Component
+public class OPE0351 extends QCCatalogue {
+    @Override
+    protected void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        //医嘱
+        //        List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
+        //        if (ListUtil.isEmpty(doctorAdviceDocs)) {
+        //            return;
+        //        }
+        //        boolean isOperativePatient = CatalogueUtil.isOperativePatients(doctorAdviceDocs);
+        //        boolean isOperativePatient = true;//是手术患者(暂时默认是)
+        //        if (isOperativePatient) {
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        if (ListUtil.isNotEmpty(operationDocs)) {
+            long count = operationDocs.stream().filter(operationDoc -> {
+                boolean flag = false;
+                if (operationDoc.getOperationDiscussionDoc() != null
+                        && operationDoc.getOperationDiscussionDoc().getOperationDiscussionLabel() != null
+                        && operationDoc.getOperationDiscussionDoc().getOperationDiscussionLabel().getVitals().size() == 0) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+            long matchCount = operationDocs.stream().filter(operationDoc -> {
+                boolean flag = false;
+                if (operationDoc.getOperationDiscussionDoc() != null
+                        && StringUtil.isNotBlank(operationDoc.getOperationDiscussionDoc().getText())
+                        && (operationDoc.getOperationDiscussionDoc().getText().contains("°C")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("次/分")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("mmHg")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("MMHG")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("生命体征")
+                )) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+            /* count为术后首程中没有生命体征的数量,matchCount为术后首程包含体温 呼吸 脉搏 血压 心率这些词的数量 */
+            if (count > 0 && matchCount == 0) {
+                status.set("-1");
+            }
+        }
+        //        }
+    }
+
+}

+ 91 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/operationdiscussion/OPE02930.java

@@ -0,0 +1,91 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.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.operation.OperationDiscussionDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.time.DateUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : OPE02930
+ * @Description : 术后首次病程未即刻完成
+ * @Author : 胡敬
+ * @Date: 2020-06-15 17:30
+ */
+@Component
+public class OPE02930 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        //        boolean isOperativePatient = true;//是手术患者(暂时默认是)
+        //        if (isOperativePatient) {
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        for (OperationDoc operationDoc : operationDocs) {
+            OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+            if (operationRecordDoc == null) {
+                continue;
+            }
+            Map<String, String> operationRecordStructureMap = operationRecordDoc.getStructureMap();
+            String operationStartDateStr = operationRecordStructureMap.get("开始时间");
+            String operationEndDateStr = operationRecordStructureMap.get("结束时间");
+            if (StringUtil.isEmpty(operationStartDateStr) || StringUtil.isEmpty(operationEndDateStr)) {
+                continue;
+            }
+            if (!isDate(operationStartDateStr) || !isDate(operationEndDateStr)) {
+                continue;
+            }
+            Date operationStartDate = StringUtil.parseDateTime(operationStartDateStr);
+            Date operationEndDate = StringUtil.parseDateTime(operationEndDateStr);
+            for (OperationDoc o : operationDocs) {
+                OperationDiscussionDoc operationDiscussionDoc = o.getOperationDiscussionDoc();
+                if (operationDiscussionDoc == null) {
+                    continue;
+                }
+                Map<String, String> structureMap = operationDiscussionDoc.getStructureMap();
+                String discussionRecordDateStr = structureMap.get("病历日期");
+                if (StringUtil.isBlank(discussionRecordDateStr)) {
+                    status.set("0");
+                    return;
+                }
+
+                if (!isDate(discussionRecordDateStr)) {
+                    status.set("0");
+                    return;
+                }
+                Date discussionRecordDate = StringUtil.parseDateTime(discussionRecordDateStr);
+                if (operationEndDate.before(discussionRecordDate) || DateUtils.isSameDay(operationEndDate, discussionRecordDate)) {
+                    if (CatalogueUtil.compareTime(operationEndDate, discussionRecordDate, 2 * 60L)) {
+                        status.set("-1");
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 判断是否为日期
+     *
+     * @param dateStr
+     */
+    private boolean isDate(String dateStr) {
+        try {
+            StringUtil.parseDateTime(dateStr);
+            return true;
+        } catch (IllegalArgumentException e) {
+            return false;
+        }
+    }
+}

+ 68 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/operationdiscussion/OPE0351.java

@@ -0,0 +1,68 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.operationdiscussion;
+
+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.operation.OperationDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description: 术后首次病程记录未记录患者生命体征
+ * @author: 胡敬
+ * @time: 2020/3/24 13:28
+ */
+@Component
+public class OPE0351 extends QCCatalogue {
+    @Override
+    protected void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        //医嘱
+        //        List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
+        //        if (ListUtil.isEmpty(doctorAdviceDocs)) {
+        //            return;
+        //        }
+        //        boolean isOperativePatient = CatalogueUtil.isOperativePatients(doctorAdviceDocs);
+        //        boolean isOperativePatient = true;//是手术患者(暂时默认是)
+        //        if (isOperativePatient) {
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        if (ListUtil.isNotEmpty(operationDocs)) {
+            long count = operationDocs.stream().filter(operationDoc -> {
+                boolean flag = false;
+                if (operationDoc.getOperationDiscussionDoc() != null
+                        && operationDoc.getOperationDiscussionDoc().getOperationDiscussionLabel() != null
+                        && operationDoc.getOperationDiscussionDoc().getOperationDiscussionLabel().getVitals().size() == 0) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+            long matchCount = operationDocs.stream().filter(operationDoc -> {
+                boolean flag = false;
+                if (operationDoc.getOperationDiscussionDoc() != null
+                        && StringUtil.isNotBlank(operationDoc.getOperationDiscussionDoc().getText())
+                        && (operationDoc.getOperationDiscussionDoc().getText().contains("°C")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("次/分")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("mmHg")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("MMHG")
+                        || operationDoc.getOperationDiscussionDoc().getText().contains("生命体征")
+                )) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+            /* count为术后首程中没有生命体征的数量,matchCount为术后首程包含体温 呼吸 脉搏 血压 心率这些词的数量 */
+            if (count > 0 && matchCount == 0) {
+                status.set("-1");
+            }
+        }
+        //        }
+    }
+
+}

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

@@ -0,0 +1,173 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.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: 主刀医师术前查房未在术前24小时内完成
+ * @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 (operationStartDate.contains("年月日")) {
+                        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) && !operationStartDateStr.contains("年月日")) {
+                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();
+    }
+}

+ 135 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/preoperativediscussion/PRE0328.java

@@ -0,0 +1,135 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.preoperativediscussion;
+
+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.DoctorAdviceDoc;
+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.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.util.*;
+
+/**
+ * @Description: 手术患者无术前讨论记录
+ * @author: rengb
+ * @time: 2020/3/23 15:09
+ */
+@Component
+public class PRE0328 extends QCCatalogue {
+
+    @Override
+    protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        /**
+         * 1:如果急诊手术【入院时间-手术开始时间小于30分钟】则可不用写术前小结。
+         * 2:如果入院时间-手术开始时间小于30分钟,则术前讨论、术前小结次数+1。
+         * 3:如果手术记录次数(第一次手术的日期内有其他手术不算次数) 大于 术前讨论、术前小结次数,则出错
+         */
+        status.set("0");
+        List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        if (operationDocs == null || operationDocs.size() == 0) {
+            return;
+        }
+        boolean emergencyOperation = false;
+        if (inputInfo.getBeHospitalizedDoc() != null) {
+            Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+            String admisTime = beHospitalStructureMap.get("入院日期");
+            //取手术记录第一次手术开始时间和入院时间比较,相差30分钟内不报缺陷
+            OperationRecordDoc operationRecordDoc = operationDocs.get(0).getOperationRecordDoc();
+            String startTime = "";
+            if (operationRecordDoc != null) {
+                startTime = operationRecordDoc.getStructureMap().get("开始时间");
+            }
+            if (StringUtil.isNotBlank(startTime) && StringUtil.isNotBlank(admisTime) &&
+                    !startTime.contains("年月日")) {
+                if (!CatalogueUtil.compareTime(
+                        StringUtil.parseDateTime(admisTime),
+                        StringUtil.parseDateTime(startTime),
+                        Long.valueOf(30))) {//入院到手术未超过30分钟,则可不用写术前小结
+                    emergencyOperation = true;
+                }
+            }
+        }
+
+        int i = getOperationSum(operationDocs); // 获取手术记录次数
+        int j = 0;  // 获取术前讨论、术前小结次数
+        for (OperationDoc operationDoc : operationDocs) {
+            if (operationDoc.getPreoperativeDiscussionDoc() != null) {
+                j++;
+            }
+        }
+        /* 如果入院时间-手术开始时间小于30分钟,则术前讨论、术前小结次数+1*/
+        if (emergencyOperation) {
+            if (j == 0) {
+                j++;
+            }
+        }
+        //医嘱中包含“冠状动脉造影术”,且无术前讨论.则报规则
+        for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
+            Map<String, String> doctorAdviceStructuerMap = doctorAdviceDoc.getStructureMap();
+            String advicename = doctorAdviceStructuerMap.get("医嘱项目名称");
+            if (StringUtil.isNotBlank(advicename) && advicename.contains("冠状动脉造影术") && j == 0) {
+                status.set("-1");
+                info.set("手术记录不一致");
+            }
+        }
+
+        if (i > 0 && i > j) {
+            status.set("-1");
+            info.set("手术记录不一致");
+        }
+    }
+
+    /**
+     * 获取手术记录次数
+     *
+     * @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) && !operationStartDateStr.contains("年月日")) {
+                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();
+    }
+
+}

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

@@ -0,0 +1,161 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.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.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":               //厦门
+            case "20":
+                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/shengzhouyy/threelevelward/THR03090.java

@@ -0,0 +1,85 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.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 (operationStartDate.contains("年月日")) {
+                operationStartDate = DateUtil.nowString();
+            }
+        }
+
+        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;
+        }
+    }
+}