|
@@ -3,7 +3,9 @@ package com.lantone.qc.trans.hangzhoufubao.util;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
|
|
|
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Element;
|
|
|
|
|
@@ -33,9 +35,14 @@ public class OperationHtmlAnalysis implements HtmlAnalysis {
|
|
|
htmlText = HtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
|
|
|
/* analysisGeneral(recTitle, bigDivElement, map);
|
|
|
CommonAnalysisUtil.makeEmpty(map, "医生签名");*/
|
|
|
-
|
|
|
- HangzhoufubaoTranUtils.getStructureMapSplitCommonCutByList(structureMap,htmlText,recTitle,null);
|
|
|
-
|
|
|
+ List<String> titles = Lists.newArrayList("时间", "手术日期", "医生签名");
|
|
|
+ HangzhoufubaoTranUtils.getStructureMapSplitCommonCutByList(structureMap,htmlText,recTitle,titles);
|
|
|
+ if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(structureMap, keyContrasts);
|
|
|
+ }
|
|
|
+ if (structureMap.containsKey("病情记录")){
|
|
|
+ structureMap.put("病情记录","手术日期"+structureMap.get("病情记录"));
|
|
|
+ }
|
|
|
// structureMap.put("记录医生")
|
|
|
HtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
|
|
|
|
|
@@ -45,6 +52,12 @@ public class OperationHtmlAnalysis implements HtmlAnalysis {
|
|
|
return structureMap;
|
|
|
}
|
|
|
|
|
|
+ private List<String> keyContrasts = Lists.newArrayList(
|
|
|
+ "时间=病历时间",
|
|
|
+ "手术日期=病情记录",
|
|
|
+ "医生签名=记录医师"
|
|
|
+ );
|
|
|
+
|
|
|
private void getStructureMap(Map<String, String> structureMap, String htmlText, String recTitle) {
|
|
|
extractedDate(structureMap, htmlText);
|
|
|
String[] split = htmlText.split("\n");
|