|
@@ -5,6 +5,7 @@ import com.google.common.collect.Maps;
|
|
|
import com.google.common.collect.Sets;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationInformedConsentDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
@@ -39,11 +40,13 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
Map<String, OperationDiscussionDoc> operationDiscussionDocMap = getOperationDiscussionDocMap(contentMap.get("术后首次病程及谈话记录"));
|
|
|
Map<String, OperationRecordDoc> operationRecordDocMap = getOperationRecordDocMap(contentMap.get("手术记录"));
|
|
|
Map<String, PreoperativeDiscussionDoc> preoperativeDiscussionDocMap = getPreoperativeDiscussionDocMap(contentMap.get("术前讨论、术前小结"));
|
|
|
+ Map<String, OperationInformedConsentDoc> operationInformedConsentDocMap = getOperationInformedConsentDocMap(contentMap.get("手术知情同意书"));
|
|
|
|
|
|
Set<String> operationNameSet = Sets.newHashSet();
|
|
|
operationNameSet.addAll(operationDiscussionDocMap.keySet());
|
|
|
operationNameSet.addAll(operationRecordDocMap.keySet());
|
|
|
operationNameSet.addAll(preoperativeDiscussionDocMap.keySet());
|
|
|
+ operationNameSet.addAll(operationInformedConsentDocMap.keySet());
|
|
|
|
|
|
operationNameSet.forEach(operationName -> {
|
|
|
OperationDoc operationDoc = new OperationDoc();
|
|
@@ -51,6 +54,7 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
operationDoc.setOperationDiscussionDoc(operationDiscussionDocMap.get(operationName));
|
|
|
operationDoc.setOperationRecordDoc(operationRecordDocMap.get(operationName));
|
|
|
operationDoc.setPreoperativeDiscussionDoc(preoperativeDiscussionDocMap.get(operationName));
|
|
|
+ operationDoc.setOperationInformedConsentDoc(operationInformedConsentDocMap.get(operationName));
|
|
|
retList.add(operationDoc);
|
|
|
});
|
|
|
|
|
@@ -315,4 +319,78 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
"术后注意事项="
|
|
|
);
|
|
|
|
|
|
+
|
|
|
+ /**********************************************手术知情同意书****************************************************/
|
|
|
+ private Map<String, OperationInformedConsentDoc> getOperationInformedConsentDocMap(List<String> contents) {
|
|
|
+ Map<String, OperationInformedConsentDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contents)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (String content : contents) {
|
|
|
+ if (StringUtil.isBlank(content)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ OperationInformedConsentDoc operationInformedConsentDoc = getOperationInformedConsentDoc(content);
|
|
|
+ operationInformedConsentDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationInformedConsentDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationInformedConsentDoc getOperationInformedConsentDoc(String content) {
|
|
|
+ Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent", content);
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationInformedConsent_keyContrasts);
|
|
|
+
|
|
|
+ String text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Content_Text");
|
|
|
+ if (StringUtil.isBlank(text)) {
|
|
|
+ text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent");
|
|
|
+ }
|
|
|
+ Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationInformedConsent_sourceTitles, text);
|
|
|
+ cutWordMap.putAll(structureMap);
|
|
|
+
|
|
|
+ OperationInformedConsentDoc operationInformedConsentDoc = ModelDocGenerate.operationInformedConsentDocGen(cutWordMap);
|
|
|
+ operationInformedConsentDoc.setText(text);
|
|
|
+ operationInformedConsentDoc.setPageData((Map) xmlNodeValueMap);
|
|
|
+
|
|
|
+ return operationInformedConsentDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> operationInformedConsent_sourceTitles = Lists.newArrayList(
|
|
|
+ "姓名",
|
|
|
+ "性别",
|
|
|
+ "病区",
|
|
|
+ "床号",
|
|
|
+ "病案号",
|
|
|
+ "手术医生",
|
|
|
+ "目前诊断",
|
|
|
+ "手术名称",
|
|
|
+ "手术指征",
|
|
|
+ "风险及并发症",
|
|
|
+ "保守治疗",
|
|
|
+ "其他手术",
|
|
|
+ "签名",
|
|
|
+ "签名时间"
|
|
|
+ );
|
|
|
+
|
|
|
+ private List<String> operationInformedConsent_keyContrasts = Lists.newArrayList(
|
|
|
+ "姓名++++患者姓名=姓名",
|
|
|
+ "性别=",
|
|
|
+ "病区++++病区名称=病区",
|
|
|
+ "床号=",
|
|
|
+ "病案号++++住院号=病案号",
|
|
|
+ "手术医生=",
|
|
|
+ "目前诊断=",
|
|
|
+ "手术名称=",
|
|
|
+ "手术指征=",
|
|
|
+ "风险及并发症=",
|
|
|
+ "++++保守治疗=保守治疗",
|
|
|
+ "++++其他手术=其他手术",
|
|
|
+ "签名++++=签名",
|
|
|
+ "签名时间=签名时间"
|
|
|
+ );
|
|
|
+
|
|
|
}
|