louhr преди 5 години
родител
ревизия
23e25a273f
променени са 23 файла, в които са добавени 133 реда и са изтрити 67 реда
  1. 13 5
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0014.java
  2. 3 5
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0023.java
  3. 9 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0031.java
  4. 1 3
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0049.java
  5. 6 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0050.java
  6. 6 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0051.java
  7. 2 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0052.java
  8. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0070.java
  9. 2 18
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0074.java
  10. 7 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0372.java
  11. 4 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0089.java
  12. 2 0
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java
  13. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/model/EntityEnum.java
  14. 3 3
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcess.java
  15. 9 1
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessClinic.java
  16. 36 25
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessFamily.java
  17. 9 0
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessPersonal.java
  18. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/util/CatalogueUtil.java
  19. 3 2
      kernel/src/test/java/com/lantone/qc/kernel/TaizDataImportApiTest.java
  20. 1 0
      public/src/main/java/com/lantone/qc/pub/model/entity/Family.java
  21. 10 0
      public/src/main/java/com/lantone/qc/pub/model/entity/Tumour.java
  22. 2 0
      public/src/main/java/com/lantone/qc/pub/model/label/PersonalLabel.java
  23. 2 0
      public/src/main/java/com/lantone/qc/pub/model/label/PresentLabel.java

+ 13 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0014.java

@@ -27,15 +27,23 @@ public class BEH0014 extends QCCatalogue {
             String clinicalName = clinical.getName();
             Cause cause = clinical.getCause();
             if(cause == null){
-                int causeIndex = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText().indexOf("因");
-                if (causeIndex < 15 && causeIndex > -1) {
-                    status.set("0");
-                } else {
+//                int causeIndex = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText().indexOf("因");
+//                if (causeIndex < 15 && causeIndex > -1) {
+//                    status.set("0");
+//                } else {
                     info.set(clinicalName);
-                }
+//                }
             }else {
                 status.set("0");
             }
         }
+        //硬规则匹配 前30个字有"体检"或"发现"或"检查"字样
+        String present = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText();
+        if (StringUtils.isNotEmpty(present)) {
+            if (present.length() > 30) present = present.substring(0, 30);
+            if (present.contains("体检") || present.contains("发现") || present.contains("检查")) {
+                status.set("0");
+            }
+        }
     }
 }

+ 3 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0023.java

@@ -3,10 +3,7 @@ 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.model.entity.GeneralDesc;
-import com.lantone.qc.pub.model.entity.Lis;
-import com.lantone.qc.pub.model.entity.Pacs;
-import com.lantone.qc.pub.model.entity.Treat;
+import com.lantone.qc.pub.model.entity.*;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -25,7 +22,8 @@ public class BEH0023 extends QCCatalogue {
         List<Lis> lises = inputInfo.getBeHospitalizedDoc().getPresentLabel().getLises();
         List<Pacs> pacses = inputInfo.getBeHospitalizedDoc().getPresentLabel().getPacses();
         List<Treat> treats = inputInfo.getBeHospitalizedDoc().getPresentLabel().getTreats();
-        if(lises == null && pacses.size() == 0 && treats.size() == 0){
+        List<Operation> operations = inputInfo.getBeHospitalizedDoc().getPresentLabel().getOperations();
+        if(lises == null && pacses.size() == 0 && treats.size() == 0 && operations.size() == 0){
             status.set("-1");
         }
     }

+ 9 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0031.java

@@ -5,6 +5,7 @@ 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.util.ListUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 
 /**
@@ -26,6 +27,14 @@ public class BEH0031 extends QCCatalogue {
         )) {
             status.set("0");
         }
+        //硬规则匹配
+        String text = inputInfo.getBeHospitalizedDoc().getPastLabel().getText();
+        if (StringUtils.isNotEmpty(text)) {
+            if (text.contains("心脑血管") || text.contains("肺肝")
+                    || text.contains("内分泌") || text.contains("高血压") || text.contains("糖尿病")) {
+                status.set("0");
+            }
+        }
     }
 
 }

+ 1 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0049.java

@@ -18,9 +18,7 @@ public class BEH0049 extends QCCatalogue {
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         SpecialHobby specialHobby = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getSpecialHobby();
-        if (specialHobby == null
-                || StringUtil.isBlank(specialHobby.getName())
-                || (specialHobby.getNegative() != null && StringUtil.isNotBlank(specialHobby.getNegative().getName()))) {
+        if (specialHobby != null && StringUtil.isNotEmpty(specialHobby.getName())) {
             status.set("0");
         }
     }

+ 6 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0050.java

@@ -4,6 +4,7 @@ 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.Smoking;
+import com.lantone.qc.pub.model.entity.Usage;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -25,6 +26,11 @@ public class BEH0050 extends QCCatalogue {
                 || (smoking.getUsage() != null && StringUtil.isNotBlank(smoking.getUsage().getName()))) {
             status.set("0");
         }
+        //出现用量实体,即认为规范
+        Usage usage = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getUsage();
+        if (usage != null && StringUtil.isNotEmpty(usage.getName())) {
+            status.set("0");
+        }
     }
 
 }

+ 6 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0051.java

@@ -4,6 +4,7 @@ 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.Drinking;
+import com.lantone.qc.pub.model.entity.Usage;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -25,6 +26,11 @@ public class BEH0051 extends QCCatalogue {
                 || (drinking.getUsage() != null && StringUtil.isNotBlank(drinking.getUsage().getName()))) {
             status.set("0");
         }
+        //出现用量实体,即认为规范
+        Usage usage = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getUsage();
+        if (usage != null && StringUtil.isNotEmpty(usage.getName())) {
+            status.set("0");
+        }
     }
 
 }

+ 2 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0052.java

@@ -16,7 +16,8 @@ public class BEH0052 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (StringUtil.isNotBlank(inputInfo.getBeHospitalizedDoc().getMaritalLabel().getText())) {
+        if (inputInfo.getBeHospitalizedDoc().getMaritalLabel() == null
+                || StringUtil.isNotBlank(inputInfo.getBeHospitalizedDoc().getMaritalLabel().getText())) {
             status.set("0");
         }
     }

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0070.java

@@ -46,7 +46,7 @@ public class BEH0070 extends QCCatalogue {
                         isFindDiagInfectious = true;
                     }
                 }
-                if (isFindGeneticDiseaseKeyword && isFindDiagInfectious) {
+                if (isFindGeneticDiseaseKeyword || isFindDiagInfectious) {
                     status.set("0");
                     return;
                 }

+ 2 - 18
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0074.java

@@ -21,29 +21,13 @@ import java.util.List;
 public class BEH0074 extends QCCatalogue {
     @Override
     protected void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        status.set("0");
         if (inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getFamilyLabel() != null) {
             FamilyLabel familyLabel = inputInfo.getBeHospitalizedDoc().getFamilyLabel();
             List<Family> families = familyLabel.getFamilies();
-            boolean findCancer = false;
             for (Family family : families) {
-                if (family.getDiags() == null || family.getDiags().size() == 0) {
-                    continue;
+                if (family.getTumour() != null) {
+                    status.set("0");
                 }
-                for (Diag diag : family.getDiags()) {
-                    if (StringUtil.isNotBlank(diag.getName()) && (diag.getName().contains("癌") || diag.getName().contains("肿瘤"))
-                            ||
-                            StringUtil.isNotBlank(diag.getHospitalDiagName()) && (diag.getHospitalDiagName().contains("癌") || diag.getHospitalDiagName().contains("肿瘤"))) {
-                        findCancer = true;
-                        break;
-                    }
-                }
-                if (findCancer) {
-                    break;
-                }
-            }
-            if (!findCancer) {
-                status.set("-1");
             }
         }
     }

+ 7 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0372.java

@@ -21,6 +21,12 @@ public class BEH0372 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        //无婚育史
+        if (inputInfo.getBeHospitalizedDoc().getMaritalLabel().getText() == null) {
+            status.set("0");
+            return;
+        }
+
         String basicInfoStatus = inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚姻");
         basicInfoStatus = StringUtil.isNotBlank(basicInfoStatus) ? basicInfoStatus : "";
 
@@ -42,7 +48,7 @@ public class BEH0372 extends QCCatalogue {
         boolean flag = false;
         List<String> regxs = Lists.newArrayList(
                 "([\\s\\S]*离[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*离[\\s\\S]*异[\\s\\S]*)",
-                "([\\s\\S]*已[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*结[\\s\\S]*婚[\\s\\S]*)",
+                "([\\s\\S]*已[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*结[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*丧[\\s\\S]*偶[\\s\\S]*)",
                 "[\\s\\S]*未[\\s\\S]*婚[\\s\\S]*",
                 "[\\s\\S]*丧[\\s\\S]*偶[\\s\\S]*",
                 "[\\s\\S]*其[\\s\\S]*他[\\s\\S]*"

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0089.java

@@ -32,6 +32,10 @@ public class FIRC0089 extends QCCatalogue {
                     status.set("-1");
                 }
             }
+            //硬规则匹配
+            if (StringUtils.isNotEmpty(firstCourseRecordDoc.getText()) && firstCourseRecordDoc.getText().contains("诊疗计划")) {
+                status.set("0");
+            }
         }
     }
 }

+ 2 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java

@@ -50,10 +50,12 @@ public class FirstCourseRecordAI extends ModelAI {
             //诊疗计划
             if (StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("诊疗计划")) && StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("需求评估"))) {
                 putContent(crfContent, medicalTextType.get(2), firstCourseRecordDoc.getStructureMap().get("需求评估") + StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("诊疗计划")), Content.treat_plan);
+                firstCourseRecordDoc.getTreatPlanLabel().setText(firstCourseRecordDoc.getStructureMap().get("需求评估") + StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("诊疗计划")));
             } else if (StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("诊疗计划"))) {
                 putContent(crfContent, medicalTextType.get(2), firstCourseRecordDoc.getStructureMap().get("诊疗计划"), Content.treat_plan);
             } else if (StringUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap().get("需求评估"))) {
                 putContent(crfContent, medicalTextType.get(2), firstCourseRecordDoc.getStructureMap().get("需求评估"), Content.treat_plan);
+                firstCourseRecordDoc.getTreatPlanLabel().setText(firstCourseRecordDoc.getStructureMap().get("需求评估"));
             } else {
                 putContent(crfContent, medicalTextType.get(2), firstCourseRecordDoc.getTreatPlanLabel().getText(), Content.treat_plan);
             }

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

@@ -18,7 +18,7 @@ public enum EntityEnum {
     UNKNOWN("情况不详"), HEALTH("健康情况"), AGE("年龄"), SMOKING_HISTORY("吸烟史"),
     HISTORY_OF_ALCOHOL_INTAKE("饮酒史"), USAGE("用量"), MENSES("月经"), LEUKORRHEA("白带"),
     BIRTH_HIS("生育情况"), CONJUGAL_RELATION("夫妻关系"), RELATIVES("家属"), GROUP_CONSULTATION("会诊"), ORGANISM("生物体"),
-    OCCUPATION("职业"), LOCATION("地点"), DEAD("死亡"), DEAD_REASON("死亡原因"),
+    OCCUPATION("职业"), LOCATION("地点"), DEAD("死亡"), DEAD_REASON("死亡原因"),TUMOUR("肿瘤病史"),
     SIMILAR_DISEASE_KEYWORD("相似疾病"), GENETIC_DISEASE_KEYWORD("家族遗传病"), EPIDEMIC_AREA_HISTORY("疫区史"), SPECIAL_HOBBY("特殊嗜好"),
     CONTACT_HISTORY("接触史"), MARITAL_HISTORY("冶游史"), MARITAL_STATUS("婚姻情况"), MARRYIAGE("结婚年龄"), NEAR_RELATION("近亲史"),
     CURE_AIM("治疗目的"), OTHER("其他"), OUTERCOURTYARD("外院"), NURSING_LEVEL("护理级别"), CHIEF("主诉"), NOTES("注意事项"),

+ 3 - 3
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcess.java

@@ -49,9 +49,9 @@ public class EntityProcess {
         if (entitys == null || entitys.isEmpty()) return resultLemmaList;
 
         List<Lemma> allLemmaList = loadAllLemmaList(entitys);
-        List<String> relationIds = new ArrayList<>();
         for (Lemma l : allLemmaList) {
             if (entityType.equals(l.getProperty())) {
+                List<String> relationIds = new ArrayList<>();
                 findRelationLemma(l, allLemmaList, relations, relationIds);
                 resultLemmaList.add(l);
             }
@@ -93,11 +93,11 @@ public class EntityProcess {
         for (Lemma l : allLemmaList) {
             for (Relation relation : connectEntityIdList) {
                 if (l.getId() == relation.getId()) {
-                    l.setRelationName(relation.getRelationName());
                     if (!hasRelation(l.getId(), lemma.getId(), relationIds)) {
+                        l.setRelationName(relation.getRelationName());
+                        lemma.addRelationLemmas(l);
                         findRelationLemma(l, allLemmaList, relations, relationIds);
                     }
-                    lemma.addRelationLemmas(l);
                 }
             }
         }

+ 9 - 1
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessClinic.java

@@ -18,7 +18,7 @@ import java.util.List;
  * 现病史处理
  */
 public class EntityProcessClinic extends EntityProcess {
-    private Logger logger = LoggerFactory.getLogger(EntityProcessPast.class);
+    private Logger logger = LoggerFactory.getLogger(EntityProcessClinic.class);
 
     public PresentLabel extractEntity(JSONObject aiOut) {
         PresentLabel presentLabel = new PresentLabel();
@@ -100,6 +100,14 @@ public class EntityProcessClinic extends EntityProcess {
             }
             presentLabel.setTreats(treats);
 
+            //手术
+            List<Lemma> operationLemmas = createEntityTree(aiOut, EntityEnum.OPERATION.toString());
+            for (Lemma lemma : operationLemmas) {
+                Operation operation = new Operation();
+                operation.setName(lemma.getText());
+                presentLabel.add(presentLabel.getOperations(), operation);
+            }
+
             //时间
             List<Lemma> pdLemmas = createEntityTree(aiOut, EntityEnum.TIME.toString());
             List<PD> pds = new ArrayList<>();

+ 36 - 25
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessFamily.java

@@ -7,6 +7,8 @@ import com.lantone.qc.kernel.structure.ai.model.Lemma;
 import com.lantone.qc.kernel.util.DiagEnhancer;
 import com.lantone.qc.pub.model.entity.*;
 import com.lantone.qc.pub.model.label.FamilyLabel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -15,6 +17,7 @@ import java.util.List;
  * 家族史标签处理
  */
 public class EntityProcessFamily extends EntityProcess {
+    private Logger logger = LoggerFactory.getLogger(EntityProcessFamily.class);
 
     public FamilyLabel extractEntity(JSONObject aiOut) {
         FamilyLabel familyLabel = new FamilyLabel();
@@ -26,33 +29,42 @@ public class EntityProcessFamily extends EntityProcess {
     public List<Family> loadFamilies(JSONObject aiOut) {
         //家属情况
         List<Family> families = new ArrayList<>();
-        //读取家属所有本体及关联信息
-        List<Lemma> familyLemmas = createEntityTree(aiOut, EntityEnum.RELATIVES.toString());
-        for (Lemma lemma : familyLemmas) {
-            Family family = new Family();
-            family.setName(lemma.getText());
-            if (lemma.isHaveChildren()) {
-                for (Lemma relationLemma : lemma.getRelationLemmas()) {
-                    if (relationLemma.getProperty().equals(EntityEnum.DEAD.toString())) {
-                        family.setDead(addDeadLemma(relationLemma));
-                    } else if (relationLemma.getProperty().equals(EntityEnum.INFECTIOUS_KEYWORD.toString())) {
-                        family.setDiagInfectious(addInfectious(relationLemma));
-                    } else if (relationLemma.getProperty().equals(EntityEnum.GENETIC_DISEASE_KEYWORD.toString())) {
-                        family.setGeneticDiseaseKeyword(addGeneticDisease(relationLemma));
-                    } else if (relationLemma.getProperty().equals(EntityEnum.HEALTH.toString())) {
-                        family.setHealthCondition(addHealthCondition(relationLemma));
-                    } else if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
-                        family.addDiag(addDiags(relationLemma));
+        try {
+            //读取家属所有本体及关联信息
+            List<Lemma> familyLemmas = createEntityTree(aiOut, EntityEnum.RELATIVES.toString());
+            for (Lemma lemma : familyLemmas) {
+                Family family = new Family();
+                family.setName(lemma.getText());
+                if (lemma.isHaveChildren()) {
+                    for (Lemma relationLemma : lemma.getRelationLemmas()) {
+                        if (relationLemma.getProperty().equals(EntityEnum.DEAD.toString())) {
+                            if (family.getDead() == null) {
+                                family.setDead(addDeadLemma(relationLemma));
+                            }
+                        } else if (relationLemma.getProperty().equals(EntityEnum.INFECTIOUS_KEYWORD.toString())) {
+                            family.setDiagInfectious(addInfectious(relationLemma));
+                        } else if (relationLemma.getProperty().equals(EntityEnum.GENETIC_DISEASE_KEYWORD.toString())) {
+                            family.setGeneticDiseaseKeyword(addGeneticDisease(relationLemma));
+                        } else if (relationLemma.getProperty().equals(EntityEnum.HEALTH.toString())) {
+                            family.setHealthCondition(addHealthCondition(relationLemma));
+                        } else if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
+                            family.addDiag(addDiags(relationLemma));
+                        } else if (relationLemma.getProperty().equals(EntityEnum.TUMOUR.toString())) {
+                            family.setTumour(findT(lemma, new Tumour(), EntityEnum.TUMOUR.toString()));//肿瘤病史
+                        }
                     }
                 }
+                families.add(family);
             }
-            families.add(family);
-        }
-        List<Lemma> similarDiseaseLemmas = createEntityTree(aiOut, EntityEnum.SIMILAR_DISEASE_KEYWORD.toString());
-        for (Lemma relationLemma : similarDiseaseLemmas) {
-            Family family = new Family();
-            family.setSimilarDiag(addSimilarDiag(relationLemma));
-            families.add(family);
+            List<Lemma> similarDiseaseLemmas = createEntityTree(aiOut, EntityEnum.SIMILAR_DISEASE_KEYWORD.toString());
+            for (Lemma relationLemma : similarDiseaseLemmas) {
+                Family family = new Family();
+                family.setSimilarDiag(addSimilarDiag(relationLemma));
+                families.add(family);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(e.getMessage(), e);
         }
         return families;
     }
@@ -67,7 +79,6 @@ public class EntityProcessFamily extends EntityProcess {
         Dead dead = new Dead();
         dead.setName(deadLemma.getText());
         if (deadLemma.isHaveChildren()) {
-            dead.setDesc(deadLemma.getRelationLemmas().get(0).getText());
             for (Lemma lemma : deadLemma.getRelationLemmas()) {
                 if (lemma.getProperty().equals(EntityEnum.DEAD_REASON.toString())) {
                     DeadReason deadReason = new DeadReason();

+ 9 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessPersonal.java

@@ -94,6 +94,15 @@ public class EntityProcessPersonal extends EntityProcess {
             }
             personalLabel.setDrinking(drinking);
         }
+
+        //用量 用于判断吸烟 和 饮酒符合规范
+        List<Lemma> usageLemmas = createEntityTree(aiOut, EntityEnum.USAGE.toString());
+        for (Lemma lemma :usageLemmas) {
+            Usage usage = new Usage();
+            usage.setName(lemma.getText());
+            personalLabel.setUsage(usage);
+        }
+
         //冶游史
         List<Lemma> maritalHistoryLemmas = createEntityTree(aiOut, EntityEnum.MARITAL_HISTORY.toString());
         for (Lemma lemma :maritalHistoryLemmas) {

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/util/CatalogueUtil.java

@@ -41,7 +41,7 @@ public class CatalogueUtil {
         if (StringUtil.isEmpty(content)) {
             return "";
         }
-        return content.replaceAll("[\r\n|/r/n|\n|/n|/t|\t|-]", "").trim();
+        return content.replaceAll("[\r\n|/r/n|\n|/n|/t|\t]", "").trim();
     }
 
     public static String[] extractDigit(String value) {

+ 3 - 2
kernel/src/test/java/com/lantone/qc/kernel/TaizDataImportApiTest.java

@@ -311,8 +311,9 @@ public class TaizDataImportApiTest {
         List<PatientText> patientTexts = new ArrayList<>();
         try {
             st = conn.createStatement();
-            String sql = "select brzyid,bllbid,bljlnr from MR_MEDICALRECORDS_CX a " +
+            String sql = "select a.brzyid,c.bllbmc,b.bljlnr from MR_MEDICALRECORDS_CX a " +
                     "left join MR_MRCONTENT_CX b on a.bljlid=b.bljlid " +
+                    "left join AR_MEDIRECCLASS_CX c on a.Bllbid = c.bllbid " +
                     "where bljlnr is not null and brzyid = '" + brzyid + "' " +
                     "order by brzyid";
             rs = st.executeQuery(sql);
@@ -361,7 +362,7 @@ public class TaizDataImportApiTest {
         Map<String, String> map = new HashMap<>();
         try {
             st = conn.createStatement();
-            String sql = "select id, case_number from qc_cases_number where hospital_id = " + hospitalId;
+            String sql = "select id, case_number from qc_cases_number_copy where hospital_id = " + hospitalId;
             rs = st.executeQuery(sql);
             while (rs.next()) {
                 r1 = rs.getString(1);

+ 1 - 0
public/src/main/java/com/lantone/qc/pub/model/entity/Family.java

@@ -21,6 +21,7 @@ public class Family extends General{
     private List<Diag> diags = new ArrayList<>();//疾病名称
     private HealthCondition healthCondition;//健康状况
     private SimilarDiag similarDiag;//相似疾病
+    private Tumour tumour;//肿瘤病史
 
     public void addDiag(Diag diag) {
         this.diags.add(diag);

+ 10 - 0
public/src/main/java/com/lantone/qc/pub/model/entity/Tumour.java

@@ -0,0 +1,10 @@
+package com.lantone.qc.pub.model.entity;
+
+/**
+ * @ClassName : Tumour
+ * @Description : 肿瘤病史
+ * @Author : 楼辉荣
+ * @Date: 2020-04-09 10:18
+ */
+public class Tumour extends General {
+}

+ 2 - 0
public/src/main/java/com/lantone/qc/pub/model/label/PersonalLabel.java

@@ -25,6 +25,8 @@ public class PersonalLabel extends GeneralLabel {
     private MaritalHistory maritalHistory;  //冶游史
     private SpecialHobby specialHobby;  //特殊嗜好
 
+    private Usage usage;   //用量
+
     public void addAddress(Address address) {
         this.addresses.add(address);
     }

+ 2 - 0
public/src/main/java/com/lantone/qc/pub/model/label/PresentLabel.java

@@ -30,6 +30,8 @@ public class PresentLabel extends GeneralLabel {
     private List<GeneralDesc> generals;
     //疾病信息
     private List<Diag> diags = new ArrayList<>();
+    //手术信息
+    private List<Operation> operations = new ArrayList<>();
     //入院途径
     private BeHospitalizedWay beHospitalizedWay;
     //现病史中所有时间实体存入