|
@@ -35,12 +35,7 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
String text = dailyCourseRecordDocs.get(0).getText();
|
|
|
String file = text;
|
|
|
String[] split = file.split("\n");
|
|
|
- if( split.length>1){
|
|
|
- String ret = text.substring(text.lastIndexOf(split[1]) + split[1].length());
|
|
|
- if(StringUtil.isNotEmpty(ret)){
|
|
|
- retMap.put("住院病程",ret);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
String str = extractDate(file);
|
|
|
if(StringUtil.isNotEmpty(str)){
|
|
|
retMap.put("记录日期时间",str);
|
|
@@ -58,9 +53,26 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
}
|
|
|
}
|
|
|
String signName= parseString(file);
|
|
|
- if(StringUtil.isNotEmpty(signName) && StringUtil.isNotEmpty(signName.trim())){
|
|
|
+ if(StringUtil.isNotEmpty(signName) && StringUtil.isNotEmpty(signName.trim()) && signName.length()<15){
|
|
|
retMap.put("医师签名",signName);
|
|
|
}
|
|
|
+
|
|
|
+ if( split.length>1){
|
|
|
+ String ret = text.substring(text.lastIndexOf(split[1]) + split[1].length());
|
|
|
+ if(StringUtil.isNotEmpty(retMap.get("医师签名")) && ret.contains(retMap.get("医师签名"))){
|
|
|
+ ret = ret.substring(0, ret.lastIndexOf(retMap.get("医师签名")));
|
|
|
+ }
|
|
|
+ String falg = "/";
|
|
|
+ if(ret.endsWith("//")){
|
|
|
+ falg = "//";
|
|
|
+ }
|
|
|
+ if(ret.endsWith(falg)){
|
|
|
+ ret = ret.substring(0,ret.lastIndexOf(falg));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(ret)){
|
|
|
+ retMap.put("住院病程",ret);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static void lastSovle(List<DailyCourseRecordDoc> dailyCourseRecordDocs , Map<String,String> rep) {
|
|
@@ -104,4 +116,13 @@ public class DailyCourseRecordTran extends TargetTran {
|
|
|
}
|
|
|
return text;
|
|
|
}
|
|
|
+
|
|
|
+ // 取/前
|
|
|
+ public static String parseStr(String text){
|
|
|
+ if(text.contains("/")){
|
|
|
+ text = text.substring(0,text.lastIndexOf("/"));
|
|
|
+ text= parseStr(text);
|
|
|
+ }
|
|
|
+ return text;
|
|
|
+ }
|
|
|
}
|