소스 검색

ez入院记录一般检查修改

chengyao 4 년 전
부모
커밋
dc874a66bc

+ 9 - 4
structure-center/src/main/java/com/lantone/structure/ai/process/EntityProcessEZaAll.java

@@ -99,17 +99,22 @@ 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) {
+                String text = lemma.getText();
+                if (lemma.isHaveChildren()) {
+                    for (Lemma relationLemmaRec : lemma.getRelationLemmas()) {
                     if(!diagSet.contains(lemma.getText())){
-                        if(diaTimeList.size()==1 && diaList.size()==1){
-                            diagRetSet.add(diaTimeList.get(0).getText()+lemma.getText());
+                        if(relationLemmaRec.getProperty().equals(EntityEnum.TIME.toString())){
+                            diagRetSet.add(relationLemmaRec.getText()+text);
+                        }else{
+                            diagRetSet.add(text);
                         }
-                        diagRetSet.add(lemma.getText());
                     }
+                    }
+                }
             }
             if(null != diagRetSet && diagRetSet.size()>0){
                 for (String str : diagRetSet) {

+ 1 - 1
structure-center/src/main/java/com/lantone/structure/facade/tran/BeHospitalizedTran.java

@@ -537,7 +537,7 @@ public class BeHospitalizedTran extends TargetTran {
                 String ret = retMap.get("修正诊断");
                 String fir = ret;
                 if( fir.contains("医师签名")){
-                    fir= fir.substring(0,fir.lastIndexOf("医师签名"));
+                     fir = fir.split("医师签名")[0];
                 }else{
                     if(!fir.contains("日  期") &&  fir.contains("年") && fir.contains("月")){
                         String date = lastTime(fir);