|
@@ -4,6 +4,8 @@ import com.lantone.common.util.StringUtil;
|
|
|
import com.lantone.structure.model.doc.DailyCourseRecordDoc;
|
|
|
import com.lantone.structure.model.label.DailyCourseRecordLabel;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+
|
|
|
import java.util.*;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
@@ -51,7 +53,8 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
}
|
|
|
}
|
|
|
String signName= parseString(file);
|
|
|
- if(StringUtil.isNotEmpty(signName) && StringUtil.isNotEmpty(signName.trim()) && signName.length()<15){
|
|
|
+ signName = signName.replace("\n", "").replace(" ","").trim();
|
|
|
+ if(StringUtil.isNotEmpty(signName) && signName.length()<15){
|
|
|
retMap.put("医师签名",signName);
|
|
|
}
|
|
|
String ret = text;
|
|
@@ -73,6 +76,21 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
if(file.contains("处理意见:")){
|
|
|
flagStr = "处理意见:";
|
|
|
}
|
|
|
+ if(!file.contains(flagStr) && file.contains("查房指出")){
|
|
|
+ flagStr = "查房指出";
|
|
|
+ }
|
|
|
+ if(!file.contains(flagStr) && file.contains("今予")){
|
|
|
+ flagStr = "今予";
|
|
|
+ }
|
|
|
+ if(!file.contains(flagStr) && file.contains("拟今日")){
|
|
|
+ flagStr = "拟今";
|
|
|
+ }
|
|
|
+ if(!file.contains(flagStr) && file.contains("拟今予")){
|
|
|
+ flagStr = "拟今予";
|
|
|
+ }
|
|
|
+ if(!file.contains(flagStr) && file.contains("继续予")){
|
|
|
+ flagStr = "继续予";
|
|
|
+ }
|
|
|
if(file.contains(flagStr)){
|
|
|
String doctorAdvice = file.substring(file.lastIndexOf(flagStr)+flagStr.length());
|
|
|
if(StringUtil.isNotEmpty(retMap.get("医师签名")) && doctorAdvice.contains(retMap.get("医师签名"))){
|
|
@@ -81,7 +99,30 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
if(doctorAdvice.endsWith(flag)){
|
|
|
doctorAdvice = doctorAdvice.substring(0,doctorAdvice.lastIndexOf(flag));
|
|
|
}
|
|
|
+ if(doctorAdvice.contains("补充诊断")){
|
|
|
+ doctorAdvice = doctorAdvice.substring(0,doctorAdvice.lastIndexOf("补充诊断"));
|
|
|
+ }
|
|
|
+ if(doctorAdvice.contains("AE及合并用药")){
|
|
|
+ doctorAdvice = doctorAdvice.substring(0,doctorAdvice.lastIndexOf("AE及合并用药"));
|
|
|
+ if(doctorAdvice.contains("。")){
|
|
|
+ doctorAdvice = doctorAdvice.substring(0,doctorAdvice.lastIndexOf("。"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(doctorAdvice.contains("药物号:")){
|
|
|
+ doctorAdvice = doctorAdvice.substring(0,doctorAdvice.lastIndexOf("药物号:"));
|
|
|
+ String sub = file.substring(file.lastIndexOf("药物号:"));
|
|
|
+ if(sub.contains("。")){
|
|
|
+ sub = sub.split("。")[0];
|
|
|
+ doctorAdvice = doctorAdvice+sub;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(doctorAdvice.startsWith(",")){
|
|
|
+ doctorAdvice = doctorAdvice.substring(",".length());
|
|
|
+ }
|
|
|
retMap.put("医嘱内容",doctorAdvice);
|
|
|
+ if(StringUtils.isNotEmpty(retMap.get("医嘱内容")) && retMap.get("医嘱内容").replace("\n","").replace(" ","").trim().equals("。")){
|
|
|
+ retMap.remove("医嘱内容");
|
|
|
+ }
|
|
|
}
|
|
|
if(ret.endsWith(flag)){
|
|
|
ret = ret.substring(0,ret.lastIndexOf(flag));
|