Selaa lähdekoodia

xy死亡记录无死亡时间、输血记录中未记录是否有不良反应

chengyao 3 vuotta sitten
vanhempi
commit
3eb20f0903

+ 3 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/clinicalblood/CLI0308.java

@@ -28,9 +28,11 @@ public class CLI0308 extends QCCatalogue {
 
         if (clinicalBloodDocs != null && clinicalBloodDocs.size() > 0) {
             String regex = ".*(未.*|无.*|否.*).*(输血反应|不良反应).*";
+            String regexSec = "[\\s\\S]*(?=输血过程).{0,25}((?=发热)|(?=胸闷)|(?=过敏反应))[\\s\\S]*";
             for (ClinicalBloodDoc cliB : clinicalBloodDocs) {
                 Map<String, String> cliBStructureMap = cliB.getStructureMap();
-                if (StringUtils.isNotEmpty(cliBStructureMap.get("病历内容")) && (cliBStructureMap.get("病历内容").contains("不良反应")
+                if ((StringUtils.isNotEmpty(cliBStructureMap.get("病历内容")) &&( cliBStructureMap.get("病历内容").matches(regex) ||cliBStructureMap.get("病历内容").matches(regexSec)))
+                        ||StringUtils.isNotEmpty(cliBStructureMap.get("病历内容")) && (cliBStructureMap.get("病历内容").contains("不良反应")
                         || cliBStructureMap.get("病历内容").contains("不适") || cliBStructureMap.get("病历内容").contains("未见"))) {
                     status.set("0");
                 }else {

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR0347.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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 : DEAR0347
+ * @Description : 死亡记录无死亡时间
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAR0347 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();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("死亡日期"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 1 - 1
trans/src/main/java/com/lantone/qc/trans/changshaxy/util/XyDeathRecordHtmlAnalysis.java

@@ -26,7 +26,7 @@ public class XyDeathRecordHtmlAnalysis implements XyHtmlAnalysis {
     public Map<String, String> analysis(String... args) {
         Map<String, String> structureMap = Maps.newLinkedHashMap();
         try {
-            List<String> titles = Lists.newArrayList("入院日期", "死亡时间", "住院天数", "入院诊断", "病情摘要", "辅助资料","入院后诊疗经过",
+            List<String> titles = Lists.newArrayList("入院日期", "死亡时间","死亡日期", "住院天数", "入院诊断", "病情摘要", "辅助资料","入院后诊疗经过",
                     "抢救经过","死亡诊断", "死亡原因", "医师签名", "上级医师签名", "签名时间");
             String html = args[0];
             String recTitle = args[1];

+ 19 - 2
trans/src/main/java/com/lantone/qc/trans/changshaxy/util/XyOperationRecordHtmlAnalysis.java

@@ -78,18 +78,35 @@ public class XyOperationRecordHtmlAnalysis implements XyHtmlAnalysis {
                break;
            }
         }
+
+        boolean symbol = false;
         if(map.containsKey("实施手术") && map.containsKey(cutStr)){
             String opStr = text.split("实施手术")[1];
-            opStr = opStr.split(cutStr)[1].split("\n")[0];
+            String substring = opStr.substring(opStr.indexOf(cutStr),opStr.indexOf(cutStr)+15);
+            if(substring.contains("\n")){
+                opStr = opStr.split(cutStr)[1].split("\n")[0];
+            }
+            if(substring.contains(" ")){
+                symbol = true;
+                opStr = opStr.split(cutStr)[1].split(" ")[0];
+            }
             map.put(cutStr,opStr);
         }
 
         if(!map.containsKey("手术过程") && map.containsKey(cutStr)){
-            String opStr =  text.substring(text.lastIndexOf(cutStr)).split("\n")[1];
+            String opStr = "";
+            if(symbol){
+                opStr =  text.substring(text.lastIndexOf(cutStr)).split(" ")[1];
+            }else{
+                opStr =  text.substring(text.lastIndexOf(cutStr)).split("\n")[1];
+            }
             opStr = text.substring(text.lastIndexOf(opStr));
             if(opStr.contains("手术医师签名")){
                 opStr =  opStr.substring(0,opStr.lastIndexOf("手术医师签名"));
             }
+            if(!opStr.contains("手术医师签名") &&opStr.contains("医师签名")){
+                opStr =  opStr.substring(0,opStr.lastIndexOf("医师签名"));
+            }
             if(StringUtil.isNotBlank(opStr)){
                 map.put("手术过程",opStr);
             }