|
@@ -44,6 +44,15 @@ public class EntityProcessLeaveHospital extends EntityProcess {
|
|
|
noteses.add(notes);
|
|
|
}
|
|
|
leaveHospitalLabel.setNoteses(noteses);
|
|
|
+ //出院诊断
|
|
|
+ List<Lemma> diagLemmas = createEntityTree(aiOut, EntityEnum.DIEASE.toString());
|
|
|
+ List<Diag> diags = new ArrayList<>();
|
|
|
+ for (Lemma lemma : diagLemmas) {
|
|
|
+ Diag diag = new Diag();
|
|
|
+ diag.setHospitalDiagName(lemma.getText());
|
|
|
+ diags.add(diag);
|
|
|
+ }
|
|
|
+ leaveHospitalLabel.setDiags(diags);
|
|
|
//医嘱
|
|
|
List<Lemma> keyWordForDoctorAdvicesesLemmas = createEntityTree(aiOut, EntityEnum.KEY_WORD_FOR_DOCTOR_ADVICES.toString());
|
|
|
List<Lemma> keyWordForPartLemmas = createEntityTree(aiOut, EntityEnum.KEY_WORD_FOR_PART.toString());
|
|
@@ -58,19 +67,12 @@ public class EntityProcessLeaveHospital extends EntityProcess {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //出院诊断
|
|
|
- List<Lemma> diagLemmas = createEntityTree(aiOut, EntityEnum.DIEASE.toString());
|
|
|
- List<Diag> diags = new ArrayList<>();
|
|
|
- for (Lemma lemma : diagLemmas) {
|
|
|
- Diag diag = new Diag();
|
|
|
- diag.setHospitalDiagName(lemma.getText());
|
|
|
- diags.add(diag);
|
|
|
+ if (keyWordForDoctorAdvicesesStart < minPart) {
|
|
|
+ String content = aiOut.getString("content");
|
|
|
+ String doctorAdviceContent = content.substring(keyWordForDoctorAdvicesesStart, minPart);
|
|
|
+ doctorAdvice.setName(doctorAdviceContent);
|
|
|
+ leaveHospitalLabel.setDoctorAdvices(doctorAdvice);
|
|
|
}
|
|
|
- leaveHospitalLabel.setDiags(diags);
|
|
|
- String content = aiOut.getString("content");
|
|
|
- String doctorAdviceContent = content.substring(keyWordForDoctorAdvicesesStart, minPart);
|
|
|
- doctorAdvice.setName(doctorAdviceContent);
|
|
|
- leaveHospitalLabel.setDoctorAdvices(doctorAdvice);
|
|
|
//好转表现
|
|
|
List<Lemma> betterFindingLemmas = createEntityTree(aiOut, EntityEnum.BETTER_FINDING.toString());
|
|
|
List<BetterFinding> betterFindings = new ArrayList<>();
|