|
@@ -2,6 +2,7 @@ package com.lantone.structure.facade.tran;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
+import com.lantone.common.util.ListUtil;
|
|
import com.lantone.common.util.StringUtil;
|
|
import com.lantone.common.util.StringUtil;
|
|
import com.lantone.structure.facade.tran.util.CommonAnalysisUtil;
|
|
import com.lantone.structure.facade.tran.util.CommonAnalysisUtil;
|
|
import com.lantone.structure.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.structure.model.doc.ThreeLevelWardDoc;
|
|
@@ -29,8 +30,6 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
Map<String, String> structureMap = cutWord(text);
|
|
Map<String, String> structureMap = cutWord(text);
|
|
wardRecordContrast(inputInfo.getThreeLevelWardDocs(), structureMap);
|
|
wardRecordContrast(inputInfo.getThreeLevelWardDocs(), structureMap);
|
|
wardRecordDoc.setStructureMap(structureMap);
|
|
wardRecordDoc.setStructureMap(structureMap);
|
|
- wardRecordDocList.add(wardRecordDoc);
|
|
|
|
- inputInfo.setThreeLevelWardDocs(wardRecordDocList);
|
|
|
|
aiProcess();
|
|
aiProcess();
|
|
lastSovle(inputInfo.getThreeLevelWardDocs(),structureMap);
|
|
lastSovle(inputInfo.getThreeLevelWardDocs(),structureMap);
|
|
return structureMap;
|
|
return structureMap;
|
|
@@ -43,15 +42,7 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
text
|
|
text
|
|
);
|
|
);
|
|
CommonAnalysisUtil.cutByTitles(text, titles, 0, sourceMap);
|
|
CommonAnalysisUtil.cutByTitles(text, titles, 0, sourceMap);
|
|
-
|
|
|
|
- if(sourceMap.containsKey("鉴别诊断") || sourceMap.containsKey("补充诊断")|| sourceMap.containsKey("注意事项")
|
|
|
|
- || sourceMap.containsKey("Caprini评分为") || sourceMap.containsKey("诊断考虑")){
|
|
|
|
- sourceMap.remove("鉴别诊断");
|
|
|
|
- sourceMap.remove("补充诊断");
|
|
|
|
- sourceMap.remove("注意事项");
|
|
|
|
- sourceMap.remove("Caprini评分为");
|
|
|
|
- sourceMap.remove("诊断考虑");
|
|
|
|
- }
|
|
|
|
|
|
+ sourceMap.entrySet().removeIf(entry -> entry.getKey().equals("鉴别诊断") || entry.getKey().equals("补充诊断") || entry.getKey().equals("注意事项") || entry.getKey().equals("Caprini评分为") || entry.getKey().equals("诊断考虑"));
|
|
return sourceMap;
|
|
return sourceMap;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -70,17 +61,20 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
retMap.put("记录人签名",signName);
|
|
retMap.put("记录人签名",signName);
|
|
}
|
|
}
|
|
|
|
|
|
- String[] split = text.split("\n");
|
|
|
|
- String logo = split[1];
|
|
|
|
- fir = text.substring(text.indexOf(logo) + logo.length());
|
|
|
|
|
|
+ if(StringUtil.isNotEmpty(sumdDate)){
|
|
|
|
+ String[] split = text.split(sumdDate);
|
|
|
|
+ fir = text.substring(text.lastIndexOf(split[1]));
|
|
|
|
+ String[] notes = fir.split("查房记录");
|
|
|
|
+ fir = fir.substring(fir.lastIndexOf(notes[1]));
|
|
|
|
+ }
|
|
|
|
+
|
|
if( StringUtil.isNotEmpty(signName.trim()) && signName.length()<15){
|
|
if( StringUtil.isNotEmpty(signName.trim()) && signName.length()<15){
|
|
- fir = text.substring(text.indexOf(logo) + logo.length(),text.lastIndexOf(signName));
|
|
|
|
|
|
+ fir = fir.substring(0,fir.lastIndexOf(signName));
|
|
String flag = "/";
|
|
String flag = "/";
|
|
if(fir.endsWith("//")){
|
|
if(fir.endsWith("//")){
|
|
flag = "//";
|
|
flag = "//";
|
|
}
|
|
}
|
|
fir = fir.substring(0,fir.lastIndexOf(flag));
|
|
fir = fir.substring(0,fir.lastIndexOf(flag));
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if(StringUtil.isNotEmpty(fir)){
|
|
if(StringUtil.isNotEmpty(fir)){
|
|
@@ -158,8 +152,8 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
}
|
|
}
|
|
|
|
|
|
public static void lastSovle(List<ThreeLevelWardDoc> threeLevelWardDocs, Map<String,String> structureMap) {
|
|
public static void lastSovle(List<ThreeLevelWardDoc> threeLevelWardDocs, Map<String,String> structureMap) {
|
|
- if(!threeLevelWardDocs.isEmpty() && threeLevelWardDocs.get(0)!=null && threeLevelWardDocs.get(0)
|
|
|
|
- .getThreeLevelWardLabel()!=null){
|
|
|
|
|
|
+ if(ListUtil.isNotEmpty(threeLevelWardDocs) && threeLevelWardDocs.get(0)!=null && threeLevelWardDocs.get(0)
|
|
|
|
+ .getThreeLevelWardLabel().size()>0 && threeLevelWardDocs.get(0).getThreeLevelWardLabel().get(0)!=null){
|
|
ThreeLevelWardLabel threeLevelWardLabel = threeLevelWardDocs.get(0).getThreeLevelWardLabel().get(0);
|
|
ThreeLevelWardLabel threeLevelWardLabel = threeLevelWardDocs.get(0).getThreeLevelWardLabel().get(0);
|
|
String doctorAdviceRecord = threeLevelWardLabel.getDoctorAdviceRecord();
|
|
String doctorAdviceRecord = threeLevelWardLabel.getDoctorAdviceRecord();
|
|
if(StringUtil.isNotEmpty(doctorAdviceRecord)){
|
|
if(StringUtil.isNotEmpty(doctorAdviceRecord)){
|