Browse Source

1、增加夫妻关系描述

louhr 5 years ago
parent
commit
1f8a7d3cff

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

@@ -16,9 +16,9 @@ public enum EntityEnum {
     TRANSFUSION_REACTION("输血反应"), VACCINATION("预防接种史"), DISEASE_KEYWORD("疾病史"), INFECTIOUS_KEYWORD("传染病史"),
     UNKNOWN("情况不详"), HEALTH("健康状况"), AGE("年龄"), SMOKING_HISTORY("吸烟史"),
     HISTORY_OF_ALCOHOL_INTAKE("饮酒史"), USAGE("用量"), MENSES("月经"), LEUKORRHEA("白带"),
-    BIRTH_HIS("生育情况"), RELATIVES("家属"), GROUP_CONSULTATION("会诊"), ORGANISM("生物体"),
+    BIRTH_HIS("生育情况"), CONJUGAL_RELATION("夫妻关系"), RELATIVES("家属"), GROUP_CONSULTATION("会诊"), ORGANISM("生物体"),
     OCCUPATION("职业"), LOCATION("地点"), DEAD("死亡"), DEAD_REASON("死亡原因"),
-    SIMILAR_DISEASE_KEYWORD("相似疾病"), GENETIC_DISEASE_KEYWORD("家族遗传病"), EPIDEMIC_AREA_HISTORY("疫区史"),
+    SIMILAR_DISEASE_KEYWORD("相似疾病"), GENETIC_DISEASE_KEYWORD("家族遗传病"), EPIDEMIC_AREA_HISTORY("疫区史"), SPECIAL_HOBBY("特殊嗜好"),
     CONTACT_HISTORY("接触史"), MARITAL_HISTORY("冶游史"), MARITAL_STATUS("婚姻情况"), MARRYIAGE("结婚年龄"), NEAR_RELATION("近亲史"),
     CURE_AIM("治疗目的"), OTHER("其他");
 
@@ -173,6 +173,9 @@ public enum EntityEnum {
             case "生育情况":
                 entityEnum = EntityEnum.BIRTH_HIS;
                 break;
+            case "夫妻关系":
+                entityEnum = EntityEnum.CONJUGAL_RELATION;
+                break;
             case "家属":
                 entityEnum = EntityEnum.RELATIVES;
                 break;
@@ -203,6 +206,9 @@ public enum EntityEnum {
             case "疫区史":
                 entityEnum = EntityEnum.EPIDEMIC_AREA_HISTORY;
                 break;
+            case "特殊嗜好":
+                entityEnum = EntityEnum.SPECIAL_HOBBY;
+                break;
             case "接触史":
                 entityEnum = EntityEnum.CONTACT_HISTORY;
                 break;

+ 8 - 4
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessMarital.java

@@ -3,10 +3,7 @@ package com.lantone.qc.kernel.structure.ai.process;
 import com.alibaba.fastjson.JSONObject;
 import com.lantone.qc.kernel.structure.ai.model.EntityEnum;
 import com.lantone.qc.kernel.structure.ai.model.Lemma;
-import com.lantone.qc.pub.model.entity.Consanguineous;
-import com.lantone.qc.pub.model.entity.Fertility;
-import com.lantone.qc.pub.model.entity.MaritalStatus;
-import com.lantone.qc.pub.model.entity.Marryiage;
+import com.lantone.qc.pub.model.entity.*;
 import com.lantone.qc.pub.model.label.MaritalLabel;
 
 import java.util.List;
@@ -47,6 +44,13 @@ public class EntityProcessMarital extends EntityProcess {
             maritalStatus.setName(lemma.getText());
             maritalLabel.setMaritalStatus(maritalStatus);
         }
+        //夫妻关系描述
+        List<Lemma> conjugalRelationLemmas = createEntityTree(aiOut, EntityEnum.CONJUGAL_RELATION.toString());
+        for (Lemma lemma :conjugalRelationLemmas) {
+            ConjugalRelation conjugalRelation = new ConjugalRelation();
+            conjugalRelation.setName(lemma.getText());
+            maritalLabel.setConjugalRelation(conjugalRelation);
+        }
         //生育情况描述
         List<Lemma> fertilityLemmas = createEntityTree(aiOut, EntityEnum.BIRTH_HIS.toString());
         for (Lemma lemma :fertilityLemmas) {

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

@@ -48,6 +48,13 @@ public class EntityProcessPersonal extends EntityProcess {
             contact.setName(lemma.getText());
             personalLabel.setContact(contact);
         }
+        //特殊嗜好
+        List<Lemma> specialHobbyLemmas = createEntityTree(aiOut, EntityEnum.SPECIAL_HOBBY.toString());
+        for (Lemma lemma :specialHobbyLemmas) {
+            SpecialHobby specialHobby = new SpecialHobby();
+            specialHobby.setName(lemma.getText());
+            personalLabel.setSpecialHobby(specialHobby);
+        }
         //吸烟史
         List<Lemma> smokingLemmas = createEntityTree(aiOut, EntityEnum.SMOKING_HISTORY.toString());
         for (Lemma lemma :smokingLemmas) {

+ 15 - 0
public/src/main/java/com/lantone/qc/pub/model/entity/ConjugalRelation.java

@@ -0,0 +1,15 @@
+package com.lantone.qc.pub.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : ConjugalRelation
+ * @Description : 夫妻关系
+ * @Author : 楼辉荣
+ * @Date: 2020-03-11 15:06
+ */
+@Setter
+@Getter
+public class ConjugalRelation extends General {
+}

+ 15 - 0
public/src/main/java/com/lantone/qc/pub/model/entity/SpecialHobby.java

@@ -0,0 +1,15 @@
+package com.lantone.qc.pub.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : SpecialHobby
+ * @Description : 特殊嗜好
+ * @Author : 楼辉荣
+ * @Date: 2020-03-11 14:49
+ */
+@Getter
+@Setter
+public class SpecialHobby extends General{
+}

+ 1 - 0
public/src/main/java/com/lantone/qc/pub/model/label/MaritalLabel.java

@@ -19,5 +19,6 @@ public class MaritalLabel extends GeneralLabel{
     private Marryiage marryiage;//结婚年龄
     private MaritalStatus maritalStatus;//婚姻情况
     private Fertility fertility;//生育情况
+    private ConjugalRelation conjugalRelation;//夫妻关系
     private List<Family> family;//家属
 }

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

@@ -22,6 +22,7 @@ public class PersonalLabel extends GeneralLabel {
     private Smoking smoking;    //吸烟史
     private Drinking drinking;  //饮酒史
     private MaritalHistory maritalHistory;  //冶游史
+    private SpecialHobby specialHobby;  //特殊嗜好
 
     public void addAddress(Address address) {
         this.addresses.add(address);