|
@@ -11,6 +11,7 @@ import com.lantone.structure.model.label.RescueLabel;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.regex.Matcher;
|
|
@@ -44,15 +45,26 @@ public class RescueTran extends TargetTran {
|
|
|
text
|
|
|
);
|
|
|
CommonAnalysisUtil.cutByTitles(text, titles, 0, sourceMap);
|
|
|
- if(sourceMap.containsKey("参与现场抢救的医务人员")){
|
|
|
- sourceMap.remove("参与现场抢救的医务人员");
|
|
|
- }
|
|
|
+// if(sourceMap.containsKey("参与现场抢救的医务人员")){
|
|
|
+// sourceMap.remove("参与现场抢救的医务人员");
|
|
|
+// }
|
|
|
return sourceMap;
|
|
|
}
|
|
|
|
|
|
|
|
|
public void rescueContrast(String text, List<RescueDoc> rescueDocs,Map<String, String> retMap) {
|
|
|
if(ListUtil.isNotEmpty(rescueDocs)){
|
|
|
+ List<String> str= Arrays.asList("修正诊断", "补充诊断","入院后辅助检查补充","辅助检查补充","抢救情况",".","。","/");
|
|
|
+ if(StringUtils.isNotEmpty(retMap.get("参与现场抢救的医务人员"))){
|
|
|
+ String rescuePersons = retMap.get("参与现场抢救的医务人员");
|
|
|
+ for (String s : str) {
|
|
|
+ if(rescuePersons.contains(s)){
|
|
|
+ rescuePersons = rescuePersons.split(s)[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ retMap.put("参与现场抢救的医务人员",rescuePersons);
|
|
|
+ }
|
|
|
+
|
|
|
rescueDocs.forEach(rescueDoc -> {
|
|
|
int auxiliaryCount = 1;
|
|
|
int auxiliaryResultCount = 1;
|
|
@@ -82,7 +94,7 @@ public class RescueTran extends TargetTran {
|
|
|
for (AuxiliaryResult auxiliaryResult : auxiliaryTest.getAuxiliaryResult()) {
|
|
|
if(StringUtils.isNotEmpty( auxiliaryResult.getName())){
|
|
|
if(auxiliaryTest.getAuxiliaryResult().size()>1){
|
|
|
- auxiliaryResultString.append((auxiliaryResultCount++) + ".");
|
|
|
+ auxiliaryResultString.append(" "+(auxiliaryResultCount++) + ".");
|
|
|
}
|
|
|
auxiliaryResultString.append(auxiliaryResult.getName());
|
|
|
}
|
|
@@ -194,7 +206,7 @@ public class RescueTran extends TargetTran {
|
|
|
}
|
|
|
if(ListUtil.isNotEmpty(strDate)){
|
|
|
retMap.put("抢救开始日期时间",strDate.get(0));
|
|
|
- if(strDate.size()>1){
|
|
|
+ if(strDate.size()>1 && ! strDate.get(0).equals(strDate.get(strDate.size()-1))){
|
|
|
retMap.put("抢救结束日期时间",strDate.get(strDate.size()-1));
|
|
|
}
|
|
|
}
|