|
@@ -64,48 +64,48 @@ public class EntityProcessVital extends EntityProcess {
|
|
vitals.add(vital);
|
|
vitals.add(vital);
|
|
}
|
|
}
|
|
vitalLabel.setVitals(vitals);
|
|
vitalLabel.setVitals(vitals);
|
|
- try{
|
|
|
|
- //临床表现
|
|
|
|
- List<Lemma> clinicLemmas = createEntityTree(outputs, EntityEnum.CLINICAL_FEATURE.toString());
|
|
|
|
- for (Lemma lemma : clinicLemmas) {
|
|
|
|
- Clinical clinical = new Clinical();
|
|
|
|
- clinical.setName(lemma.getText());
|
|
|
|
- clinical.setStandName(lemma.getText());
|
|
|
|
|
|
+ try {
|
|
|
|
+ //临床表现
|
|
|
|
+ List<Lemma> clinicLemmas = createEntityTree(outputs, EntityEnum.CLINICAL_FEATURE.toString());
|
|
|
|
+ for (Lemma lemma : clinicLemmas) {
|
|
|
|
+ Clinical clinical = new Clinical();
|
|
|
|
+ clinical.setName(lemma.getText());
|
|
|
|
+ clinical.setStandName(lemma.getText());
|
|
|
|
|
|
- List<PD> timestamp = new LinkedList<>();
|
|
|
|
- for (Lemma relationLemma : lemma.getRelationLemmas()) {
|
|
|
|
- if (relationLemma.getProperty().equals(EntityEnum.NEGATIVE.toString())) {
|
|
|
|
- clinical.setNegative(findNegative(lemma));
|
|
|
|
- }
|
|
|
|
- clinical.setModification(findT(lemma, new Modification(), EntityEnum.MODIFICATION.toString()));//修饰
|
|
|
|
- clinical.setBodyPart(findT(lemma, new BodyPart(), EntityEnum.BODY.toString()));//部位
|
|
|
|
- clinical.setTrend(findT(lemma, new Trend(), EntityEnum.TREND.toString()));//趋势
|
|
|
|
- clinical.setCause(findT(lemma, new Cause(), EntityEnum.CAUSE.toString()));//诱因
|
|
|
|
- clinical.setProperty(findT(lemma, new Property(), EntityEnum.PROPERTY.toString()));//性质
|
|
|
|
- clinical.setDegree(findT(lemma, new Degree(), EntityEnum.DEGREE.toString()));//程度
|
|
|
|
- clinical.setAggravate(findT(lemma, new Aggravate(), EntityEnum.AGGRAVATE.toString()));//加重因素
|
|
|
|
- clinical.setRelief(findT(lemma, new Relief(), EntityEnum.RELIEF.toString()));//缓解因素
|
|
|
|
- if (relationLemma.getProperty().equals(EntityEnum.TIME.toString())) {
|
|
|
|
- String[] time_split = relationLemma.getText().split(",");
|
|
|
|
- for (String time : time_split) {
|
|
|
|
- PD pd = new PD();
|
|
|
|
- String[] val_unit = new String[2];
|
|
|
|
- if (time.trim().length() > 0) {
|
|
|
|
- val_unit = extract_digit(time);
|
|
|
|
|
|
+ List<PD> timestamp = new LinkedList<>();
|
|
|
|
+ for (Lemma relationLemma : lemma.getRelationLemmas()) {
|
|
|
|
+ if (relationLemma.getProperty().equals(EntityEnum.NEGATIVE.toString())) {
|
|
|
|
+ clinical.setNegative(findNegative(lemma));
|
|
|
|
+ }
|
|
|
|
+ clinical.setModification(findT(lemma, new Modification(), EntityEnum.MODIFICATION.toString()));//修饰
|
|
|
|
+ clinical.setBodyPart(findT(lemma, new BodyPart(), EntityEnum.BODY.toString()));//部位
|
|
|
|
+ clinical.setTrend(findT(lemma, new Trend(), EntityEnum.TREND.toString()));//趋势
|
|
|
|
+ clinical.setCause(findT(lemma, new Cause(), EntityEnum.CAUSE.toString()));//诱因
|
|
|
|
+ clinical.setProperty(findT(lemma, new Property(), EntityEnum.PROPERTY.toString()));//性质
|
|
|
|
+ clinical.setDegree(findT(lemma, new Degree(), EntityEnum.DEGREE.toString()));//程度
|
|
|
|
+ clinical.setAggravate(findT(lemma, new Aggravate(), EntityEnum.AGGRAVATE.toString()));//加重因素
|
|
|
|
+ clinical.setRelief(findT(lemma, new Relief(), EntityEnum.RELIEF.toString()));//缓解因素
|
|
|
|
+ if (relationLemma.getProperty().equals(EntityEnum.TIME.toString())) {
|
|
|
|
+ String[] time_split = relationLemma.getText().split(",");
|
|
|
|
+ for (String time : time_split) {
|
|
|
|
+ PD pd = new PD();
|
|
|
|
+ String[] val_unit = new String[2];
|
|
|
|
+ if (time.trim().length() > 0) {
|
|
|
|
+ val_unit = extract_digit(time);
|
|
|
|
+ }
|
|
|
|
+ pd.setValue(val_unit[0]);
|
|
|
|
+ pd.setUnit(val_unit[1]);
|
|
|
|
+ pd.setName(time);
|
|
|
|
+ timestamp.add(pd);
|
|
}
|
|
}
|
|
- pd.setValue(val_unit[0]);
|
|
|
|
- pd.setUnit(val_unit[1]);
|
|
|
|
- pd.setName(time);
|
|
|
|
- timestamp.add(pd);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ clinical.setTimestamp(timestamp);
|
|
|
|
+ vitalLabel.add(vitalLabel.getClinicals(), clinical);
|
|
}
|
|
}
|
|
- clinical.setTimestamp(timestamp);
|
|
|
|
- vitalLabel.add(vitalLabel.getClinicals(), clinical);
|
|
|
|
- }
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
return vitalLabel;
|
|
return vitalLabel;
|
|
}
|
|
}
|
|
}
|
|
}
|