|
@@ -28,7 +28,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
List<Family> families = new ArrayList<>();
|
|
List<Family> families = new ArrayList<>();
|
|
//读取家属所有本体及关联信息
|
|
//读取家属所有本体及关联信息
|
|
List<Lemma> familyLemmas = createEntityTree(aiOut, EntityEnum.RELATIVES.toString());
|
|
List<Lemma> familyLemmas = createEntityTree(aiOut, EntityEnum.RELATIVES.toString());
|
|
- for (Lemma lemma :familyLemmas) {
|
|
|
|
|
|
+ for (Lemma lemma : familyLemmas) {
|
|
Family family = new Family();
|
|
Family family = new Family();
|
|
family.setName(lemma.getText());
|
|
family.setName(lemma.getText());
|
|
if (lemma.isHaveChildren()) {
|
|
if (lemma.isHaveChildren()) {
|
|
@@ -43,18 +43,23 @@ public class EntityProcessFamily extends EntityProcess {
|
|
family.setHealthCondition(addHealthCondition(relationLemma));
|
|
family.setHealthCondition(addHealthCondition(relationLemma));
|
|
} else if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
|
|
} else if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
|
|
family.addDiag(addDiags(relationLemma));
|
|
family.addDiag(addDiags(relationLemma));
|
|
- } else if (relationLemma.getProperty().equals(EntityEnum.SIMILAR_DISEASE_KEYWORD.toString())) {
|
|
|
|
- family.setSimilarDiag(addSimilarDiag(relationLemma));
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
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);
|
|
|
|
+ }
|
|
return families;
|
|
return families;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 家属死亡
|
|
* 家属死亡
|
|
|
|
+ *
|
|
* @param deadLemma
|
|
* @param deadLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -63,16 +68,16 @@ public class EntityProcessFamily extends EntityProcess {
|
|
dead.setName(deadLemma.getText());
|
|
dead.setName(deadLemma.getText());
|
|
if (deadLemma.isHaveChildren()) {
|
|
if (deadLemma.isHaveChildren()) {
|
|
dead.setDesc(deadLemma.getRelationLemmas().get(0).getText());
|
|
dead.setDesc(deadLemma.getRelationLemmas().get(0).getText());
|
|
- for (Lemma lemma:deadLemma.getRelationLemmas()) {
|
|
|
|
|
|
+ for (Lemma lemma : deadLemma.getRelationLemmas()) {
|
|
if (lemma.getProperty().equals(EntityEnum.DEAD_REASON.toString())) {
|
|
if (lemma.getProperty().equals(EntityEnum.DEAD_REASON.toString())) {
|
|
DeadReason deadReason = new DeadReason();
|
|
DeadReason deadReason = new DeadReason();
|
|
deadReason.setName(lemma.getText());
|
|
deadReason.setName(lemma.getText());
|
|
dead.setDeadReason(deadReason);
|
|
dead.setDeadReason(deadReason);
|
|
- } else if (lemma.getProperty().equals(EntityEnum.UNKNOWN.toString())){
|
|
|
|
|
|
+ } else if (lemma.getProperty().equals(EntityEnum.UNKNOWN.toString())) {
|
|
Unknow unknow = new Unknow();
|
|
Unknow unknow = new Unknow();
|
|
unknow.setName(lemma.getText());
|
|
unknow.setName(lemma.getText());
|
|
dead.setUnknow(unknow);
|
|
dead.setUnknow(unknow);
|
|
- } else if (lemma.getProperty().equals(EntityEnum.AGE.toString())){
|
|
|
|
|
|
+ } else if (lemma.getProperty().equals(EntityEnum.AGE.toString())) {
|
|
Age age = new Age();
|
|
Age age = new Age();
|
|
age.setName(lemma.getText());
|
|
age.setName(lemma.getText());
|
|
dead.setAge(age);
|
|
dead.setAge(age);
|
|
@@ -84,6 +89,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 家属传染病史
|
|
* 家属传染病史
|
|
|
|
+ *
|
|
* @param infectiouLemma
|
|
* @param infectiouLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -98,6 +104,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 家属遗传病史
|
|
* 家属遗传病史
|
|
|
|
+ *
|
|
* @param geneticLemma
|
|
* @param geneticLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -112,6 +119,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 家属健康情况
|
|
* 家属健康情况
|
|
|
|
+ *
|
|
* @param healthConditionLemma
|
|
* @param healthConditionLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -123,6 +131,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 家属疾病史
|
|
* 家属疾病史
|
|
|
|
+ *
|
|
* @param diagLemma
|
|
* @param diagLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -136,6 +145,7 @@ public class EntityProcessFamily extends EntityProcess {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 相似疾病
|
|
* 相似疾病
|
|
|
|
+ *
|
|
* @param diagLemma
|
|
* @param diagLemma
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|