|
@@ -161,46 +161,27 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
}
|
|
}
|
|
|
|
|
|
private OperationRecordDoc getOperationRecordDoc(String content) {
|
|
private OperationRecordDoc getOperationRecordDoc(String content) {
|
|
- Map<String, String> pageData = Preproc.extract_doc_pub(true, operationRecord_pageDataTitles, content);
|
|
|
|
- pageData.put("病程记录内容",
|
|
|
|
- pageData.get("病程记录内容")
|
|
|
|
- .replace(pageData.get("病程记录时间"), "")
|
|
|
|
- .replace(pageData.get("病程记录名称"), "")
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- List<String> targetTitles = Lists.newArrayList();
|
|
|
|
- operationRecord_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);
|
|
|
|
- });
|
|
|
|
|
|
+ Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent", content);
|
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationRecord_keyContrasts);
|
|
|
|
+ if (StringUtil.isNotBlank(structureMap.get("签名"))) {
|
|
|
|
+ structureMap.put("记录医师", structureMap.get("签名"));
|
|
|
|
+ }
|
|
|
|
|
|
- Map<String, String> sourceMap = Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
|
- sourceMap.put("记录时间", sourceMap.get("病程记录时间"));
|
|
|
|
|
|
+ String text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Content_Text");
|
|
|
|
+ if (StringUtil.isBlank(text)) {
|
|
|
|
+ text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent");
|
|
|
|
+ }
|
|
|
|
+ Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationRecord_sourceTitles, text);
|
|
|
|
+ cutWordMap.putAll(structureMap);
|
|
|
|
|
|
- OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(sourceMap);
|
|
|
|
- operationRecordDoc.setText(content);
|
|
|
|
- operationRecordDoc.setPageData((Map) pageData);
|
|
|
|
|
|
+ OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(cutWordMap);
|
|
|
|
+ operationRecordDoc.setText(text);
|
|
|
|
+ operationRecordDoc.setPageData((Map) xmlNodeValueMap);
|
|
|
|
|
|
return operationRecordDoc;
|
|
return operationRecordDoc;
|
|
}
|
|
}
|
|
|
|
|
|
- private List<String> operationRecord_pageDataTitles = Lists.newArrayList(
|
|
|
|
- "病程记录时间",
|
|
|
|
- "病程记录名称",
|
|
|
|
- "病程记录内容",
|
|
|
|
- "记录医师"
|
|
|
|
- );
|
|
|
|
private List<String> operationRecord_sourceTitles = Lists.newArrayList(
|
|
private List<String> operationRecord_sourceTitles = Lists.newArrayList(
|
|
- "病程记录时间",
|
|
|
|
- "病程记录名称",
|
|
|
|
- "病程记录内容",
|
|
|
|
"记录医师",
|
|
"记录医师",
|
|
"记录时间",
|
|
"记录时间",
|
|
"手术名称",
|
|
"手术名称",
|
|
@@ -210,6 +191,42 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
"手术经过"
|
|
"手术经过"
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+ private List<String> operationRecord_keyContrasts = Lists.newArrayList(
|
|
|
|
+ "姓名++++患者姓名=",
|
|
|
|
+ "性别=",
|
|
|
|
+ "病区++++病区名称=",
|
|
|
|
+ "床号=",
|
|
|
|
+ "病案号++++住院号=",
|
|
|
|
+ "手术开始时间=",
|
|
|
|
+ "手术结束时间=",
|
|
|
|
+ "术前诊断=",
|
|
|
|
+ "手术名称=",
|
|
|
|
+ "术后诊断=",
|
|
|
|
+ "主刀医师=",
|
|
|
|
+ "一助=",
|
|
|
|
+ "二助=",
|
|
|
|
+ "器械护士=",
|
|
|
|
+ "麻醉方式=",
|
|
|
|
+ "麻醉医生=",
|
|
|
|
+ "清洁程度=",
|
|
|
|
+ "ASA分级++++麻醉ASA分级=",
|
|
|
|
+ "手术持续时间=",
|
|
|
|
+ "风险评估分值=",
|
|
|
|
+ "++++浅层组织手术=",
|
|
|
|
+ "++++深层组织手术=",
|
|
|
|
+ "++++器官手术=",
|
|
|
|
+ "++++空隙手术=",
|
|
|
|
+ "++++术中送检无=",
|
|
|
|
+ "++++术中送检有=",
|
|
|
|
+ "冰冻切片结果=",
|
|
|
|
+ "++++并发症无=",
|
|
|
|
+ "++++并发症有=",
|
|
|
|
+ "手术并发症=",
|
|
|
|
+ "失血量=",
|
|
|
|
+ "手术经过=",
|
|
|
|
+ "记录时间="
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
|
|
/**********************************************术前讨论、术前小结****************************************************/
|
|
/**********************************************术前讨论、术前小结****************************************************/
|
|
private Map<String, PreoperativeDiscussionDoc> getPreoperativeDiscussionDocMap(List<String> contents) {
|
|
private Map<String, PreoperativeDiscussionDoc> getPreoperativeDiscussionDocMap(List<String> contents) {
|
|
@@ -252,7 +269,7 @@ public class ChangxOperationDocTrans 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, preoperativeDiscussion_sourceTitles, text);
|
|
cutWordMap.putAll(structureMap);
|
|
cutWordMap.putAll(structureMap);
|
|
|
|
|
|
PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(cutWordMap);
|
|
PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(cutWordMap);
|
|
@@ -262,28 +279,6 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
return preoperativeDiscussionDoc;
|
|
return preoperativeDiscussionDoc;
|
|
}
|
|
}
|
|
|
|
|
|
- private Map<String, String> getCutWordMap(String content) {
|
|
|
|
- if (StringUtil.isBlank(content)) {
|
|
|
|
- return Maps.newHashMap();
|
|
|
|
- }
|
|
|
|
- List<String> targetTitles = Lists.newArrayList();
|
|
|
|
- preoperativeDiscussion_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);
|
|
|
|
- });
|
|
|
|
- if (ListUtil.isEmpty(targetTitles)) {
|
|
|
|
- return Maps.newHashMap();
|
|
|
|
- }
|
|
|
|
- return Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private List<String> preoperativeDiscussion_sourceTitles = Lists.newArrayList(
|
|
private List<String> preoperativeDiscussion_sourceTitles = Lists.newArrayList(
|
|
"记录医师",
|
|
"记录医师",
|
|
"记录时间",
|
|
"记录时间",
|