فهرست منبع

Merge branch 'dev-1.2' into dev

rengb 5 سال پیش
والد
کامیت
1fc1ee36e1

+ 32 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02813.java

@@ -0,0 +1,32 @@
+package com.lantone.qc.kernel.catalogue.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.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : BEH02813
+ * @Description :  手术外伤史未填写
+ * @Author : 胡敬
+ * @Date: 2020-06-16 10:04
+ */
+@Component
+public class BEH02813 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        if (inputInfo.getBeHospitalizedDoc() != null) {
+            Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+            if (StringUtil.isBlank(beHospitalStructureMap.get("手术外伤史"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0185.java

@@ -5,6 +5,7 @@ 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.entity.AllergyMedicine;
 import com.lantone.qc.pub.model.label.PastLabel;
 import com.lantone.qc.pub.util.ListUtil;
@@ -25,12 +26,11 @@ import java.util.Map;
 public class FIRP0185 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null
-                && inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null) {
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getBeHospitalizedDoc() != null) {
             Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
             String drugAllergy = firstpageStructureMap.get(Content.drugAllergy);
-
-            PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+            BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+            PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
             List<AllergyMedicine> allergyMedicines = pastLabel.getAllergyMedicines();
             if (allergyMedicines.size() == 0 || CatalogueUtil.isEmpty(drugAllergy)) {
                 return;

+ 71 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR02931.java

@@ -0,0 +1,71 @@
+package com.lantone.qc.kernel.catalogue.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.DeathCaseDiscussDoc;
+import com.lantone.qc.pub.model.doc.DeathRecordDoc;
+import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : THR02931
+ * @Description : 最后一次查房记录时间晚于患者出院时间
+ * @Author : 胡敬
+ * @Date: 2020-06-16 10:06
+ */
+@Component
+public class THR02931 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || inputInfo.getLeaveHospitalDoc() == null) {
+            status.set("0");
+            return;
+        }
+        DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
+        DeathCaseDiscussDoc deathCaseDiscussDoc = inputInfo.getDeathCaseDiscussDoc();
+        if (deathRecordDoc != null || deathCaseDiscussDoc != null) {
+            status.set("0");
+            return;
+        }
+        LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
+        String leaveDateStr = leaveHospitalDoc.getStructureMap().get("出院时间");
+        if (StringUtil.isBlank(leaveDateStr)) {
+            status.set("0");
+            return;
+        }
+        Date leaveDate = StringUtil.parseDateTime(leaveDateStr);
+        if (leaveDate == null) {
+            status.set("0");
+            return;
+        }
+        List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        if (allDoctorWradDocs.size() == 0) {
+            status.set("0");
+            return;
+        }
+        int j = 0; //最后两次查房记录
+        for (int i = allDoctorWradDocs.size() - 1; i > 0 && j < 2; i--) {
+            j++;
+            ThreeLevelWardDoc lastWardDoc = allDoctorWradDocs.get(i);
+            Map<String, String> structureMap = lastWardDoc.getStructureMap();
+            String title = structureMap.get("查房标题");
+            if (StringUtil.isBlank(title) || title.contains("病理报告")) {
+                continue;
+            }
+            String recordDateStr = structureMap.get("查房日期");
+            if (StringUtil.isNotBlank(recordDateStr)) {
+                Date recordDate = StringUtil.parseDateTime(recordDateStr);
+                if (recordDate != null && recordDate.after(leaveDate)) {
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/BeHospitalizedAI.java

@@ -83,7 +83,7 @@ public class BeHospitalizedAI extends ModelAI {
             String vitalSpecial_text = beHospitalizedDoc.getVitalLabelSpecial().getText();
             if (beHospitalizedDoc.getChiefLabel().isCrfLabel()) {
                 if (StringUtil.isNotBlank(chief_text)) {
-                    chief_text = StringUtil.removeBlank(chief_text);
+                    chief_text = "主诉:" + StringUtil.removeBlank(chief_text);//主诉入参 文本前需加 “主诉:”
                     /* 2020-06-08修改主诉模型为现病史模型 */
                     putContent(crfContent, medicalTextType.get(7), chief_text, Content.chief);  //主诉
                 }