|
@@ -75,10 +75,10 @@ public class EntityProcessEZaAll extends EntityProcess {
|
|
|
Set<String> diagSet = new HashSet<>();
|
|
|
Set<String> diagRetSet = new HashSet<>();
|
|
|
List<Lemma> diagList = createEntityTree(aiOut, EntityEnum.NEGATIVE.toString());
|
|
|
- if( ListUtil.isEmpty(diagList)){
|
|
|
+ /* if( ListUtil.isEmpty(diagList)){
|
|
|
//时间
|
|
|
diagList = createEntityTree(aiOut, EntityEnum.TIME.toString());
|
|
|
- }
|
|
|
+ }*/
|
|
|
for (Lemma lemma : diagList) {
|
|
|
Diag diagFir = new Diag();
|
|
|
String text = lemma.getText();
|
|
@@ -99,11 +99,15 @@ public class EntityProcessEZaAll extends EntityProcess {
|
|
|
|
|
|
//肯定
|
|
|
List<Lemma> diaList = createEntityTree(aiOut, EntityEnum.DIEASE.toString());
|
|
|
+ List<Lemma> diaTimeList = createEntityTree(aiOut, EntityEnum.TIME.toString());
|
|
|
if(ListUtil.isEmpty(diaList)){
|
|
|
diaList = createEntityTree(aiOut, EntityEnum.INJURY.toString());
|
|
|
}
|
|
|
for (Lemma lemma : diaList) {
|
|
|
if(!diagSet.contains(lemma.getText())){
|
|
|
+ if(diaTimeList.size()==1 && diaList.size()==1){
|
|
|
+ diagRetSet.add(diaTimeList.get(0).getText()+lemma.getText());
|
|
|
+ }
|
|
|
diagRetSet.add(lemma.getText());
|
|
|
}
|
|
|
}
|
|
@@ -204,7 +208,10 @@ public class EntityProcessEZaAll extends EntityProcess {
|
|
|
for (String allergySecs : allergieRetSet) {
|
|
|
Allergy allergySec = new Allergy();
|
|
|
allergySec.setName(allergySecs);
|
|
|
- String flagName = allergies.get(allergies.size() - 1).getName();
|
|
|
+ String flagName = "";
|
|
|
+ if(allergies.size()>0) {
|
|
|
+ flagName = allergies.get(allergies.size() - 1).getName();
|
|
|
+ }
|
|
|
if(flagName.contains(allergySecs)){
|
|
|
continue;
|
|
|
}else {
|
|
@@ -278,7 +285,7 @@ public class EntityProcessEZaAll extends EntityProcess {
|
|
|
Operation operationSec = new Operation();
|
|
|
//手术史
|
|
|
if (relationLemmaRec.getProperty().equals(EntityEnum.TIME.toString())) {
|
|
|
- String firText =text+relationLemmaRec.getText()+"病史";
|
|
|
+ String firText ="手术时间:"+relationLemmaRec.getText()+"、"+"手术:"+text;
|
|
|
operationSec.setName(firText);
|
|
|
operations.add(operationSec);
|
|
|
}
|