|
@@ -11,7 +11,9 @@ import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
+import com.lantone.qc.trans.changx.util.CxXmlUtil;
|
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
|
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
import com.lantone.qc.trans.comsis.Preproc;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -231,13 +233,39 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
|
|
|
private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(String content) {
|
|
|
- Map<String, String> pageData = Preproc.extract_doc_pub(true, preoperativeDiscussion_pageDataTitles, content);
|
|
|
- pageData.put("病程记录内容",
|
|
|
- pageData.get("病程记录内容")
|
|
|
- .replace(pageData.get("病程记录时间"), "")
|
|
|
- .replace(pageData.get("病程记录名称"), "")
|
|
|
+ Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent//Region", content);
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, preoperativeDiscussion_keyContrasts);
|
|
|
+ structureMap.put(
|
|
|
+ "术前准备内容",
|
|
|
+ (StringUtil.isBlank(structureMap.get("术前准备内容")) ? "" : structureMap.get("术前准备内容")) + (StringUtil.isBlank(structureMap.get("术前准备++++术前准备情况")) ? "" : structureMap.get("术前准备++++术前准备情况"))
|
|
|
);
|
|
|
+ structureMap.put(
|
|
|
+ "术前术后注意事项",
|
|
|
+ (StringUtil.isBlank(structureMap.get("术前术后注意事项")) ? "" : structureMap.get("术前术后注意事项")) + (StringUtil.isBlank(structureMap.get("术后注意事项")) ? "" : structureMap.get("术后注意事项"))
|
|
|
+ );
|
|
|
+ structureMap.put("讨论时间", structureMap.get("记录时间"));
|
|
|
+ if (StringUtil.isNotBlank(structureMap.get("签名"))) {
|
|
|
+ structureMap.put("记录医师", structureMap.get("签名"));
|
|
|
+ }
|
|
|
+
|
|
|
+ String text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region/Content_Text");
|
|
|
+ if (StringUtil.isBlank(text)) {
|
|
|
+ text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region");
|
|
|
+ }
|
|
|
+ Map<String, String> cutWordMap = getCutWordMap(text);
|
|
|
+ cutWordMap.putAll(structureMap);
|
|
|
|
|
|
+ PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(cutWordMap);
|
|
|
+ preoperativeDiscussionDoc.setText(text);
|
|
|
+ preoperativeDiscussionDoc.setPageData((Map) xmlNodeValueMap);
|
|
|
+
|
|
|
+ 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 = "";
|
|
@@ -250,35 +278,16 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
targetTitles.add(targetTitle);
|
|
|
});
|
|
|
-
|
|
|
- Map<String, String> sourceMap = Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
- sourceMap.put("记录时间", sourceMap.get("病程记录时间"));
|
|
|
- sourceMap.put("拟行术式", sourceMap.get("拟施手术方式、名称及可能的变更"));
|
|
|
- sourceMap.put("手术指征", sourceMap.get("手术指征与禁忌征"));
|
|
|
- sourceMap.put("可能意外和防范措施", sourceMap.get("主要术中、术后风险及防范措施"));
|
|
|
- sourceMap.put("术前术后注意事项", sourceMap.get("术中、术后注意事项(含护理事项)"));
|
|
|
- sourceMap.put("麻醉方式", sourceMap.get("拟施麻醉方式"));
|
|
|
- sourceMap.put("术前准备内容", sourceMap.get("术前特殊准备"));
|
|
|
-
|
|
|
- PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(sourceMap);
|
|
|
- preoperativeDiscussionDoc.setText(content);
|
|
|
- preoperativeDiscussionDoc.setPageData((Map) pageData);
|
|
|
-
|
|
|
- return preoperativeDiscussionDoc;
|
|
|
+ if (ListUtil.isEmpty(targetTitles)) {
|
|
|
+ return Maps.newHashMap();
|
|
|
+ }
|
|
|
+ return Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
}
|
|
|
|
|
|
- private List<String> preoperativeDiscussion_pageDataTitles = Lists.newArrayList(
|
|
|
- "病程记录时间",
|
|
|
- "病程记录名称",
|
|
|
- "病程记录内容",
|
|
|
- "记录医师"
|
|
|
- );
|
|
|
private List<String> preoperativeDiscussion_sourceTitles = Lists.newArrayList(
|
|
|
- "病程记录时间",
|
|
|
- "病程记录名称",
|
|
|
- "病程记录内容",
|
|
|
"记录医师",
|
|
|
"记录时间",
|
|
|
+ "讨论时间",
|
|
|
"讨论方式",
|
|
|
"参加人员",
|
|
|
"简要病情",
|
|
@@ -295,4 +304,19 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
"拟行术式"
|
|
|
);
|
|
|
|
|
|
+ private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
|
|
|
+ "讨论时间++++记录日期=记录时间",
|
|
|
+ "参加人员姓名=参加人员",
|
|
|
+ "病情摘要++++简要病情=简要病情",
|
|
|
+ "术前诊断++++初步诊断=",
|
|
|
+ "手术指征与禁忌征++++手术指征=手术指征",
|
|
|
+ "拟行治疗指征及禁忌症=",
|
|
|
+ "拟施麻醉方式=麻醉方式",
|
|
|
+ "术前准备情况=术前准备内容",
|
|
|
+ "术前准备++++术前准备情况=",
|
|
|
+ "手术风险及预防措施++++文本框=可能意外和防范措施",
|
|
|
+ "术中注意事项=术前术后注意事项",
|
|
|
+ "术后注意事项="
|
|
|
+ );
|
|
|
+
|
|
|
}
|