|
@@ -1,7 +1,6 @@
|
|
package com.lantone.qc.trans.changx;
|
|
package com.lantone.qc.trans.changx;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
-import com.google.common.collect.Maps;
|
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
@@ -36,7 +35,7 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
|
|
if (StringUtil.isBlank(text)) {
|
|
if (StringUtil.isBlank(text)) {
|
|
text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region");
|
|
text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region");
|
|
}
|
|
}
|
|
- Map<String, String> cutWordMap = getCutWordMap(text);
|
|
|
|
|
|
+ Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
|
|
Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent//Region", content);
|
|
Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent//Region", content);
|
|
cutWordMap.putAll(xmlNodeValueMap);
|
|
cutWordMap.putAll(xmlNodeValueMap);
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(cutWordMap, keyContrasts);
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(cutWordMap, keyContrasts);
|
|
@@ -55,25 +54,6 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
|
|
return threeLevelWardDoc;
|
|
return threeLevelWardDoc;
|
|
}
|
|
}
|
|
|
|
|
|
- private Map<String, String> getCutWordMap(String content) {
|
|
|
|
- if (StringUtil.isBlank(content)) {
|
|
|
|
- return Maps.newHashMap();
|
|
|
|
- }
|
|
|
|
- List<String> targetTitles = Lists.newArrayList();
|
|
|
|
- sourceTitles.forEach(sourceTitle -> {
|
|
|
|
- String targetTitle = "";
|
|
|
|
- for (int index = 0; index < sourceTitle.length(); index++) {
|
|
|
|
- if (index == sourceTitle.length() - 1) {
|
|
|
|
- targetTitle += sourceTitle.substring(index, index + 1);
|
|
|
|
- } else {
|
|
|
|
- targetTitle += sourceTitle.substring(index, index + 1) + "[\\s\\p{Zs}]*";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- targetTitles.add(targetTitle);
|
|
|
|
- });
|
|
|
|
- return Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private List<String> sourceTitles = Lists.newArrayList(
|
|
private List<String> sourceTitles = Lists.newArrayList(
|
|
"记录医生"
|
|
"记录医生"
|
|
);
|
|
);
|