|
@@ -2,6 +2,7 @@ package com.lantone.qc.trans.beilun.util;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
+import com.lantone.qc.pub.Content;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
|
|
import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -39,7 +40,7 @@ public class BeiLunOperationInformedHtmlAnalysis implements BeiLunHtmlAnalysis {
|
|
Document doc = Jsoup.parse(html);
|
|
Document doc = Jsoup.parse(html);
|
|
String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
|
|
String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
- htmlContent = htmlContent.replaceAll("[ ]", " ").replace("患者签名","").replace("不会签字的按手印并备注手印说明:谁的哪根手指,并注明谁代写的与患者关系:与患者关系","");
|
|
|
|
|
|
+ htmlContent = htmlContent.replaceAll("[ ]", " ");
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
}
|
|
}
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "记录时间");
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "记录时间");
|
|
@@ -59,19 +60,49 @@ public class BeiLunOperationInformedHtmlAnalysis implements BeiLunHtmlAnalysis {
|
|
}
|
|
}
|
|
private List<String> ignoreContrasts = Lists.newArrayList(
|
|
private List<String> ignoreContrasts = Lists.newArrayList(
|
|
"医师陈述",
|
|
"医师陈述",
|
|
|
|
+ "患方签名",
|
|
"签字时间",
|
|
"签字时间",
|
|
"签名时间"
|
|
"签名时间"
|
|
);
|
|
);
|
|
|
|
|
|
private void parseMethod(Map<String, String> result) {
|
|
private void parseMethod(Map<String, String> result) {
|
|
if (result.containsKey("术种使用的植入性材料或高值耗材及风险") && StringUtils.isNotEmpty(result.get("术种使用的植入性材料或高值耗材及风险"))) {
|
|
if (result.containsKey("术种使用的植入性材料或高值耗材及风险") && StringUtils.isNotEmpty(result.get("术种使用的植入性材料或高值耗材及风险"))) {
|
|
|
|
+ Boolean flag= true;
|
|
String str = result.get("术种使用的植入性材料或高值耗材及风险");
|
|
String str = result.get("术种使用的植入性材料或高值耗材及风险");
|
|
- if(str.contains("\uF0FE无") && str.contains("\uF06F有耗材")){
|
|
|
|
|
|
+ if(str.contains("\uF0FE无") && str.contains("\uF06F有")){
|
|
result.put("术种使用的植入性材料或高值耗材及风险","false");
|
|
result.put("术种使用的植入性材料或高值耗材及风险","false");
|
|
|
|
+ flag = false;
|
|
}
|
|
}
|
|
- if(str.contains("\uF06F无") && str.contains("\uF0FE有耗材")){
|
|
|
|
|
|
+ if(str.contains("\uF06F无") && str.contains("\uF0FE有")){
|
|
|
|
+ /* str = str.split("\uF0FE有")[1];
|
|
|
|
+ str = str.replace(",",",").replace("。",",").replace(" ",",");
|
|
|
|
+ str = str.split(",")[0];
|
|
|
|
+ result.put("植入性材料",str);*/
|
|
result.put("术种使用的植入性材料或高值耗材及风险","true");
|
|
result.put("术种使用的植入性材料或高值耗材及风险","true");
|
|
|
|
+ Boolean modelFlag = false;
|
|
|
|
+ for (String model : Content.MODELIST) {
|
|
|
|
+ if(str.contains(model)){
|
|
|
|
+ modelFlag = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Boolean numFlag = false;
|
|
|
|
+ for (String number : Content.NUMBERLIST) {
|
|
|
|
+ if(str.contains(number)){
|
|
|
|
+ numFlag = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(modelFlag && numFlag){
|
|
|
|
+ result.put("型号和数量符合要求","true");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ flag = false;
|
|
|
|
+ }
|
|
|
|
+ if(flag){
|
|
|
|
+ result.put("术种使用的植入性材料或高值耗材及风险","");
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|