Explorar o código

Merge remote-tracking branch 'origin/master'

MarkHuang %!s(int64=4) %!d(string=hai) anos
pai
achega
d571bd542b

+ 2 - 2
src/main/java/com/diagbot/enums/StaticTypeEnum.java

@@ -16,8 +16,8 @@ public enum StaticTypeEnum implements KeyedNamed {
     LISSET(3, Constants.lissetname),
     LIS(4, Constants.lisname),
     PACS(5, Constants.pacsname),
-    OPT(6, Constants.yibaoopname),
-    PACSSUBNAME(7, Constants.pacssubname);
+    PACSSUBNAME(6, Constants.pacssubname),
+    OPT(7, Constants.yibaoopname);
 
     @Setter
     private int key;

+ 1 - 1
src/main/java/com/diagbot/model/ai/model/EntityEnum.java

@@ -28,7 +28,7 @@ public enum EntityEnum {
     TITLE_OF_OPERATIVE_FINDINGS("手术经过标题"), TITLE_OF_MEASURES_AFTER_OP("术后处理措施标题"),
     TITLE_OF_RISK_AFTER_OP("术后风险标题"), TITLE_OF_ATTENTION_AFTER_OP("术后注意事项标题"), VITAL("生命体征"),
     BETTER_FINDING("好转表现"),OUTCOME_TO_BETTER("转归情况-好转"),OUTCOME_CURE("转归情况-治愈"),POSITIVE_FINDING("阳性表现"),
-    INSPECTION_ITEMS("检查项目"),DISCHARGE_MODE("出院方式");
+    INSPECTION_ITEMS("检查项目"),DISCHARGE_MODE("出院方式"),OTHER_ALLERGY("其他过敏原");
 
     private String value;
 

+ 17 - 2
src/main/java/com/diagbot/model/ai/process/EntityProcessPast.java

@@ -139,8 +139,8 @@ public class EntityProcessPast extends EntityProcess {
                         allergyFood.setAllergyDesc(findT(relationLemma, new AllergyDesc(), EntityEnum.ALLERGY_SYMPTOM.toString()));//过敏表现
                         allergy.setAllergyFood(allergyFood);
                     }
-                    //药物过敏史
-                    if (relationLemma.getProperty().equals(EntityEnum.DRUG_ALLERGY.toString())) {
+                    //药物过敏史 或 其他过敏
+                    if (relationLemma.getProperty().equals(EntityEnum.DRUG_ALLERGY.toString()) || relationLemma.getProperty().equals(EntityEnum.OTHER_ALLERGY.toString())) {
                         AllergyMedicine allergyMedicine = new AllergyMedicine();
                         allergyMedicine.setName(CoreUtil.replaceStartPunctuation(relationLemma.getText()));
                         allergyMedicine.setStandName(CoreUtil.replaceStartPunctuation(relationLemma.getText()));
@@ -178,6 +178,21 @@ public class EntityProcessPast extends EntityProcess {
                 }
                 pastLabel.addAllergyMedicine(allergyMedicine);
             }
+
+            //其他过敏史
+            List<Lemma> allergyOtherLemmas = createEntityTree(aiOut, EntityEnum.OTHER_ALLERGY.toString());
+            for (Lemma lemma : allergyOtherLemmas) {
+                AllergyMedicine allergyMedicine = new AllergyMedicine();
+                allergyMedicine.setName(CoreUtil.replaceStartPunctuation(lemma.getText()));
+                allergyMedicine.setStandName(CoreUtil.replaceStartPunctuation(lemma.getText()));
+                if (lemma.isHaveChildren()) {
+                    allergyMedicine.setNegative(findNegative(lemma));
+                    allergyMedicine.setPd(findPD(lemma));//时间
+                    allergyMedicine.setDegree(findT(lemma, new Degree(), EntityEnum.TREND.toString()));//程度
+                }
+                pastLabel.addAllergyMedicine(allergyMedicine);
+            }
+
             //输血史
             List<Lemma> bloodTransfusionLemmas = createEntityTree(aiOut, EntityEnum.BLOOD_TRANSFUSION.toString());
             for (Lemma lemma : bloodTransfusionLemmas) {