|
@@ -78,18 +78,35 @@ public class XyOperationRecordHtmlAnalysis implements XyHtmlAnalysis {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ boolean symbol = false;
|
|
|
if(map.containsKey("实施手术") && map.containsKey(cutStr)){
|
|
|
String opStr = text.split("实施手术")[1];
|
|
|
- opStr = opStr.split(cutStr)[1].split("\n")[0];
|
|
|
+ String substring = opStr.substring(opStr.indexOf(cutStr),opStr.indexOf(cutStr)+15);
|
|
|
+ if(substring.contains("\n")){
|
|
|
+ opStr = opStr.split(cutStr)[1].split("\n")[0];
|
|
|
+ }
|
|
|
+ if(substring.contains(" ")){
|
|
|
+ symbol = true;
|
|
|
+ opStr = opStr.split(cutStr)[1].split(" ")[0];
|
|
|
+ }
|
|
|
map.put(cutStr,opStr);
|
|
|
}
|
|
|
|
|
|
if(!map.containsKey("手术过程") && map.containsKey(cutStr)){
|
|
|
- String opStr = text.substring(text.lastIndexOf(cutStr)).split("\n")[1];
|
|
|
+ String opStr = "";
|
|
|
+ if(symbol){
|
|
|
+ opStr = text.substring(text.lastIndexOf(cutStr)).split(" ")[1];
|
|
|
+ }else{
|
|
|
+ opStr = text.substring(text.lastIndexOf(cutStr)).split("\n")[1];
|
|
|
+ }
|
|
|
opStr = text.substring(text.lastIndexOf(opStr));
|
|
|
if(opStr.contains("手术医师签名")){
|
|
|
opStr = opStr.substring(0,opStr.lastIndexOf("手术医师签名"));
|
|
|
}
|
|
|
+ if(!opStr.contains("手术医师签名") &&opStr.contains("医师签名")){
|
|
|
+ opStr = opStr.substring(0,opStr.lastIndexOf("医师签名"));
|
|
|
+ }
|
|
|
if(StringUtil.isNotBlank(opStr)){
|
|
|
map.put("手术过程",opStr);
|
|
|
}
|