|
@@ -8,6 +8,8 @@ import com.lantone.structure.facade.tran.util.CommonAnalysisUtil;
|
|
import com.lantone.structure.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.structure.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.structure.model.label.ThreeLevelWardLabel;
|
|
import com.lantone.structure.model.label.ThreeLevelWardLabel;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
@@ -71,6 +73,9 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
if(notes.length<=1){
|
|
if(notes.length<=1){
|
|
notes = fir.split("查房录");
|
|
notes = fir.split("查房录");
|
|
}
|
|
}
|
|
|
|
+ if(notes.length<=1){
|
|
|
|
+ notes = fir.split("医师查房");
|
|
|
|
+ }
|
|
fir = fir.substring(fir.lastIndexOf(notes[1]));
|
|
fir = fir.substring(fir.lastIndexOf(notes[1]));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -87,6 +92,7 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
retMap.put("查房记录",fir);
|
|
retMap.put("查房记录",fir);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //规则诊疗计划
|
|
if(StringUtil.isNotEmpty(retMap.get("诊疗计划"))){
|
|
if(StringUtil.isNotEmpty(retMap.get("诊疗计划"))){
|
|
String plan = retMap.get("诊疗计划");
|
|
String plan = retMap.get("诊疗计划");
|
|
if(StringUtil.isNotEmpty( retMap.get("记录人签名")) && StringUtil.isNotEmpty( retMap.get("记录人签名").trim())){
|
|
if(StringUtil.isNotEmpty( retMap.get("记录人签名")) && StringUtil.isNotEmpty( retMap.get("记录人签名").trim())){
|
|
@@ -116,6 +122,73 @@ public class ThreeLevelWardTran extends TargetTran {
|
|
}
|
|
}
|
|
retMap.put("诊疗计划",plan);
|
|
retMap.put("诊疗计划",plan);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //内涵诊疗计划
|
|
|
|
+ if(StringUtil.isEmpty(retMap.get("诊疗计划"))){
|
|
|
|
+ text = text.replace("处理意见:","处理意见:").replace("诊疗意见:","处理意见:")
|
|
|
|
+ .replace("处理方案:","处理意见:").replace("查房记录:","查房认为")
|
|
|
|
+ .replace("查房示:","查房认为") .replace("查房后示:","查房认为")
|
|
|
|
+ .replace("分析病情示:","查房认为") .replace("查房后分析","查房认为")
|
|
|
|
+ .replace("查房分析","查房认为") .replace("今查房示","查房认为")
|
|
|
|
+ .replace("医师查看","查房认为") ;
|
|
|
|
+ String sFir = "";
|
|
|
|
+ List<String> subPlanList = Arrays.asList(
|
|
|
|
+ "治疗计划:","分析指出:","处理意见:","查房认为","指出", "认为"//不包含
|
|
|
|
+ );
|
|
|
|
+ //包含
|
|
|
|
+ List<String> containList = Arrays.asList(
|
|
|
|
+ "予查","予复查","后予以", "治疗上", "目前继续","继续目前","。继续",",继续",";继续","今继续","余继续","术后继续",
|
|
|
|
+ "患者现病情","患者目前病情" ,"病情较前好转","较前明显好转","一般情况可","定期监测","患者目前咳嗽","拟明","可先行"
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+ List<String> indexList = Arrays.asList(
|
|
|
|
+ ":",",","。"
|
|
|
|
+ );
|
|
|
|
+ List<String> endStrs = Arrays.asList(
|
|
|
|
+ "注意事项:","今日镇静镇痛评分" //"补充诊断:","予补充诊断:",
|
|
|
|
+ );
|
|
|
|
+ Boolean flag = true;
|
|
|
|
+ for (String str : subPlanList) {
|
|
|
|
+ if(text.contains(str)){
|
|
|
|
+ flag = false;
|
|
|
|
+ sFir = text.substring(text.lastIndexOf(str)+str.length());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(flag){
|
|
|
|
+ for (String conStr : containList) {
|
|
|
|
+ if(text.contains(conStr)){
|
|
|
|
+ sFir = text.substring(text.lastIndexOf(conStr));
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (String str : indexList) {
|
|
|
|
+ if(sFir.startsWith(str)){
|
|
|
|
+ sFir = sFir.split(str)[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (String endStr : endStrs) {
|
|
|
|
+ if(sFir.contains(endStr)){
|
|
|
|
+ sFir = sFir.split(endStr)[0];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String name = retMap.get("记录人签名");
|
|
|
|
+ if(StringUtils.isNotEmpty(name) && sFir.contains(name)){
|
|
|
|
+ sFir = sFir.substring(0,sFir.lastIndexOf(name));
|
|
|
|
+ }
|
|
|
|
+ String endFlag = "/";
|
|
|
|
+ if(fir.endsWith("//")){
|
|
|
|
+ endFlag = "//";
|
|
|
|
+ }
|
|
|
|
+ if(sFir.endsWith(endFlag)){
|
|
|
|
+ sFir = sFir.substring(0,sFir.lastIndexOf(endFlag));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ retMap.put("诊疗计划",sFir);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 取/后
|
|
// 取/后
|