|
@@ -0,0 +1,412 @@
|
|
|
+package com.lantone.qc.trans.wenfuyi;
|
|
|
+
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
+import com.google.common.collect.Sets;
|
|
|
+import com.lantone.qc.dbanaly.facade.wenfuyi.WenfuyiXmlUtil;
|
|
|
+import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.*;
|
|
|
+import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
+import com.lantone.qc.pub.util.FastJsonUtils;
|
|
|
+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.comsis.CommonAnalysisUtil;
|
|
|
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: 手术文档生成
|
|
|
+ */
|
|
|
+public class OperationDocTrans extends ModelDocTrans {
|
|
|
+ /**
|
|
|
+ * 手术文档包含:术后首次病程及谈话记录;手术记录;术前讨论、术前小结;手术知情同意书;手术安全核查表
|
|
|
+ *
|
|
|
+ * @param medrecVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<OperationDoc> extract(MedrecVo medrecVo) {
|
|
|
+ List<OperationDoc> retList = Lists.newArrayList();
|
|
|
+
|
|
|
+ Map<String, List<String>> contentMap = (Map) medrecVo.getContent().get("content");
|
|
|
+ if (contentMap == null) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, OperationDiscussionDoc> operationDiscussionDocMap = getOperationDiscussionDocMap((List) contentMap.get("术后首次病程及谈话记录"));
|
|
|
+ Map<String, OperationRecordDoc> operationRecordDocMap = getOperationRecordDocMap((List) contentMap.get("手术记录"));
|
|
|
+ Map<String, PreoperativeDiscussionDoc> preoperativeDiscussionDocMap = getPreoperativeDiscussionDocMap((List) contentMap.get("术前讨论、术前小结"));
|
|
|
+ Map<String, OperationInformedConsentDoc> operationInformedConsentDocMap = getOperationInformedConsentDocMap((List) contentMap.get("手术知情同意书"));
|
|
|
+ //Map<String, OperationSafetyChecklistDoc> operationSafetyChecklistDocMap = getOperationSafetyChecklistDocMap((List) contentMap.get("手术安全核查表"));
|
|
|
+
|
|
|
+ Set<String> operationNameSet = Sets.newHashSet();
|
|
|
+ operationNameSet.addAll(operationDiscussionDocMap.keySet());
|
|
|
+ operationNameSet.addAll(operationRecordDocMap.keySet());
|
|
|
+ operationNameSet.addAll(preoperativeDiscussionDocMap.keySet());
|
|
|
+ operationNameSet.addAll(operationInformedConsentDocMap.keySet());
|
|
|
+ //operationNameSet.addAll(operationSafetyChecklistDocMap.keySet());
|
|
|
+
|
|
|
+ operationNameSet.forEach(operationName -> {
|
|
|
+ OperationDoc operationDoc = new OperationDoc();
|
|
|
+ operationDoc.setOperationName(operationName);
|
|
|
+ operationDoc.setOperationDiscussionDoc(operationDiscussionDocMap.get(operationName));
|
|
|
+ operationDoc.setOperationRecordDoc(operationRecordDocMap.get(operationName));
|
|
|
+ operationDoc.setPreoperativeDiscussionDoc(preoperativeDiscussionDocMap.get(operationName));
|
|
|
+ operationDoc.setOperationInformedConsentDoc(operationInformedConsentDocMap.get(operationName));
|
|
|
+ //operationDoc.setOperationSafetyChecklistDoc(operationSafetyChecklistDocMap.get(operationName));
|
|
|
+ retList.add(operationDoc);
|
|
|
+ });
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /*******************************************术后首次病程及谈话记录***************************************************/
|
|
|
+ private Map<String, OperationDiscussionDoc> getOperationDiscussionDocMap(List<Map<String, Object>> contentMaps) {
|
|
|
+ Map<String, OperationDiscussionDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contentMaps)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (Map<String, Object> contentMap : contentMaps) {
|
|
|
+ if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ OperationDiscussionDoc operationDiscussionDoc = getOperationDiscussionDoc(contentMap);
|
|
|
+ operationDiscussionDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationDiscussionDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationDiscussionDoc getOperationDiscussionDoc(Map<String, Object> contentMap) {
|
|
|
+ String modeId = "18";
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
+ } else {
|
|
|
+ Map<String, String> sourceMap = WenfuyiXmlUtil.xmlToMap(content);
|
|
|
+ List<String> titles = Lists.newArrayList(
|
|
|
+ "术后处理措施","医师签名","患方签名",
|
|
|
+ "记录医师","术后注意事项","术后处理措施","术后诊断",
|
|
|
+ "手术方式","麻醉方式","术中诊断","手术结束时间","手术开始时间","手术简要经过",
|
|
|
+ "手术名称","手术时间","术前诊断","手术医生","助手","手术经过","术后生命体征",
|
|
|
+ "患者家属签名");
|
|
|
+
|
|
|
+ String text = sourceMap.get("原始文本");
|
|
|
+ List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, text);
|
|
|
+ CommonAnalysisUtil.cutByTitles(text, sortTitles, 0, sourceMap);
|
|
|
+ sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_keyContrasts, modeId);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ OperationDiscussionDoc operationDiscussionDoc = new OperationDiscussionDoc();
|
|
|
+ operationDiscussionDoc.setStructureMap(structureMap);
|
|
|
+ operationDiscussionDoc.setPageData((Map) structureMap);
|
|
|
+
|
|
|
+ return operationDiscussionDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
|
|
|
+ "病程时间=病历日期","病程标题=标题",
|
|
|
+ "本人姓名=姓名",
|
|
|
+ "书写日期=记录时间",
|
|
|
+ "注意事项=术后注意事项",
|
|
|
+ "治疗计划和措施=术后处理措施",
|
|
|
+ "术后注意观察事项=术后注意事项",
|
|
|
+ "手术名称=手术名称方式",
|
|
|
+ "术中诊断=术中后诊断",
|
|
|
+ "术后诊断=术中后诊断",
|
|
|
+ "术后诊疗计划(处理措施)=术后处理措施",
|
|
|
+ "术后谈话=术后注意事项",
|
|
|
+ "记录医师签名=记录医生",
|
|
|
+ "医师签名=记录医生",
|
|
|
+ "签名时间=记录时间",
|
|
|
+ "会诊日期=手术日期",
|
|
|
+ "记录医师=记录医生",
|
|
|
+ "医师签名日期=记录时间",
|
|
|
+ "手术经过=手术简要经过",
|
|
|
+ "术后生命体征=术后注意事项"
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ /**********************************************手术记录*************************************************************/
|
|
|
+ private Map<String, OperationRecordDoc> getOperationRecordDocMap(List<Map<String, Object>> contentMaps) {
|
|
|
+ Map<String, OperationRecordDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contentMaps)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (Map<String, Object> contentMap : contentMaps) {
|
|
|
+ if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ OperationRecordDoc operationRecordDoc = getOperationRecordDoc(contentMap);
|
|
|
+ operationRecordDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationRecordDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationRecordDoc getOperationRecordDoc(Map<String, Object> contentMap) {
|
|
|
+ String modeId = "17";
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
+ } else {
|
|
|
+ Map<String, String> sourceMap = WenfuyiXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ List<String> titles = Lists.newArrayList("手术开始时间", "手术结束时间","术中诊断","手术简要经过","主 刀",
|
|
|
+ "第一助手", "第二助手","第三助手","洗手护士", "巡回护士","麻醉方式","手术方式","麻醉医师","手术标本","冰冻切片结果",
|
|
|
+ "术中并发症","术中失血量","手术经过及处理","手术简要经过","医师签名","主刀医师签名","时间",
|
|
|
+ "患方签名","记录时间");
|
|
|
+
|
|
|
+ String text = sourceMap.get("原始文本");
|
|
|
+ List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, text);
|
|
|
+ CommonAnalysisUtil.cutByTitles(text, sortTitles, 0, sourceMap);
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationRecord_keyContrasts, modeId);
|
|
|
+ //出血量、输血量有些有ml有些没有,统一一下
|
|
|
+ if(structureMap.containsKey("输血量")){
|
|
|
+ structureMap.put("输血量",structureMap.get("输血量").replaceAll("ml",""));
|
|
|
+ }
|
|
|
+ OrdinaryAssistant.removeBlank(structureMap);
|
|
|
+ }
|
|
|
+ OperationRecordDoc operationRecordDoc = new OperationRecordDoc();
|
|
|
+ operationRecordDoc.setStructureMap(structureMap);
|
|
|
+ operationRecordDoc.setPageData((Map) structureMap);
|
|
|
+ return operationRecordDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 手术记录
|
|
|
+ private List<String> operationRecord_keyContrasts = Lists.newArrayList(
|
|
|
+ "病程时间=病历日期","病程标题=标题","麻醉医师=麻醉人员","巡回护士姓名=巡回护士",
|
|
|
+ "待产日期=手术日期",
|
|
|
+ "医生=主刀医师签名",
|
|
|
+ "助手=一助",
|
|
|
+ "本人姓名=姓名",
|
|
|
+ "手术记录手术开始日期=开始时间",
|
|
|
+ "手术开始时间=开始时间",
|
|
|
+ "手术记录手术结束日期=结束时间",
|
|
|
+ "手术结束日期时间=结束时间",
|
|
|
+ "手术结束时间=结束时间",
|
|
|
+ "术后诊断=术中后诊断",
|
|
|
+ "术中后诊断=术中后诊断",
|
|
|
+ "术中诊断=术中后诊断",
|
|
|
+ "手术记录手术过程=手术经过",
|
|
|
+ "手术简要经过=手术经过",
|
|
|
+ "主刀医师=主刀医师",
|
|
|
+ "Ⅰ助姓名=一助",
|
|
|
+ "Ⅱ助姓名=二助",
|
|
|
+ "手术记录麻醉方式=麻醉方式",
|
|
|
+ "麻醉医师签名=麻醉医师",
|
|
|
+ "主刀医师签名=医师签名",
|
|
|
+ "医师签名=医师签名",
|
|
|
+ "记录时间=医师签名时间",
|
|
|
+ "时间=医师签名时间"
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ /**********************************************术前讨论、术前小结****************************************************/
|
|
|
+ private Map<String, PreoperativeDiscussionDoc> getPreoperativeDiscussionDocMap(List<Map<String, Object>> contentMaps) {
|
|
|
+ Map<String, PreoperativeDiscussionDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contentMaps)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (Map<String, Object> contentMap : contentMaps) {
|
|
|
+ if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ PreoperativeDiscussionDoc preoperativeDiscussionDoc = getPreoperativeDiscussionDoc(contentMap);
|
|
|
+ preoperativeDiscussionDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, preoperativeDiscussionDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(Map<String, Object> contentMap) {
|
|
|
+ String modeId = "11";
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
+ } else {
|
|
|
+ Map<String, String> sourceMap = WenfuyiXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ List<String> titles = Lists.newArrayList("简要病情","术前诊断","手术指征","手术禁忌症",
|
|
|
+ "拟施手术名称和方式","拟施麻醉方式","其他术前相关情况","术中或术后可能发生的并发症","手术风险及防治对策",
|
|
|
+ "术前与患方谈话及签定手术知情同意书情况","注意事项","术前准备","记录医师","手术名称"
|
|
|
+ );
|
|
|
+ String text = sourceMap.get("原始文本");
|
|
|
+ List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, text);
|
|
|
+ CommonAnalysisUtil.cutByTitles(text, sortTitles, 0, sourceMap);
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts, modeId);
|
|
|
+ }
|
|
|
+ PreoperativeDiscussionDoc preoperativeDiscussionDoc = new PreoperativeDiscussionDoc();
|
|
|
+ preoperativeDiscussionDoc.setStructureMap(structureMap);
|
|
|
+ preoperativeDiscussionDoc.setPageData((Map) structureMap);
|
|
|
+ return preoperativeDiscussionDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
|
|
|
+ "拟施手术名称和方式=拟施手术名称及方式",
|
|
|
+ "拟行术式=拟施手术名称及方式",
|
|
|
+ "病程标题=文书标题",
|
|
|
+ "临床诊断=术前诊断",
|
|
|
+ "术前准备内容=术前准备",
|
|
|
+ "中术后可能出现的风险及应对措施=风险及防范措施",
|
|
|
+ "术中、术后应当充分注意的事项=术中术后注意事项",
|
|
|
+ "术中术后注意事项含护理事项=术中术后注意事项","注意事项=术中术后注意事项",
|
|
|
+ "手术风险及防治对策=风险及防范措施",
|
|
|
+ "主要术中、术后风险及防范措施=风险及防范措施",
|
|
|
+ "意外及防范措施=风险及防范措施",
|
|
|
+ "术前术后注意事项=注意事项",
|
|
|
+ "麻醉方式=拟施麻醉方式",
|
|
|
+ "记录医师签名=记录医生"
|
|
|
+ );
|
|
|
+
|
|
|
+ /**********************************************手术知情同意书****************************************************/
|
|
|
+ private Map<String, OperationInformedConsentDoc> getOperationInformedConsentDocMap(List<Map<String, Object>> contentMaps) {
|
|
|
+ Map<String, OperationInformedConsentDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contentMaps)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (Map<String, Object> contentMap : contentMaps) {
|
|
|
+ if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ OperationInformedConsentDoc operationInformedConsentDoc = getOperationInformedConsentDoc(contentMap);
|
|
|
+ operationInformedConsentDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationInformedConsentDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationInformedConsentDoc getOperationInformedConsentDoc(Map<String, Object> contentMap) {
|
|
|
+ String modeId = "16";
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
+ } else {
|
|
|
+ Map<String, String> sourceMap = WenfuyiXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationInformedConsent_keyContrasts, modeId);
|
|
|
+ }
|
|
|
+ OperationInformedConsentDoc operationInformedConsentDoc = new OperationInformedConsentDoc();
|
|
|
+ operationInformedConsentDoc.setStructureMap(structureMap);
|
|
|
+ operationInformedConsentDoc.setPageData((Map) structureMap);
|
|
|
+ return operationInformedConsentDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> operationInformedConsent_keyContrasts = Lists.newArrayList(
|
|
|
+ "姓名++++患者姓名=姓名",
|
|
|
+ "性别=",
|
|
|
+ "病区++++病区名称=病区",
|
|
|
+ "床号=",
|
|
|
+ "病案号++++住院号=病案号",
|
|
|
+ "手术医生=",
|
|
|
+ "目前诊断=",
|
|
|
+ "手术名称=",
|
|
|
+ "手术指征=手术指征与禁忌",
|
|
|
+ "风险及并发症=",
|
|
|
+ "++++保守治疗=保守治疗",
|
|
|
+ "++++其他手术=其他手术",
|
|
|
+ "签名++++=签名",
|
|
|
+ "签名时间=签名时间",
|
|
|
+ "术前准备内容=术前准备"
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ /**********************************************手术安全核查表****************************************************/
|
|
|
+ private Map<String, OperationSafetyChecklistDoc> getOperationSafetyChecklistDocMap(List<Map<String, Object>> contentMaps) {
|
|
|
+ Map<String, OperationSafetyChecklistDoc> retMap = Maps.newHashMap();
|
|
|
+ if (ListUtil.isEmpty(contentMaps)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ int index = 1;
|
|
|
+ String operationName = null;
|
|
|
+ for (Map<String, Object> contentMap : contentMaps) {
|
|
|
+ if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ operationName = index + "";
|
|
|
+ OperationSafetyChecklistDoc operationSafetyChecklistDoc = getOperationSafetyChecklistDoc(contentMap);
|
|
|
+ operationSafetyChecklistDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationSafetyChecklistDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationSafetyChecklistDoc getOperationSafetyChecklistDoc(Map<String, Object> contentMap) {
|
|
|
+ String modeId = "21";
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
+ } else {
|
|
|
+ Map<String, String> sourceMap = WenfuyiXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationSafetyChecklist_keyContrasts, modeId);
|
|
|
+ }
|
|
|
+ OperationSafetyChecklistDoc operationSafetyChecklistDoc = new OperationSafetyChecklistDoc();
|
|
|
+ operationSafetyChecklistDoc.setStructureMap(structureMap);
|
|
|
+ operationSafetyChecklistDoc.setPageData((Map) structureMap);
|
|
|
+
|
|
|
+ return operationSafetyChecklistDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> operationSafetyChecklist_keyContrasts = Lists.newArrayList(
|
|
|
+ "姓名++++患者姓名=姓名",
|
|
|
+ "性别",
|
|
|
+ "病区",
|
|
|
+ "床号",
|
|
|
+ "病案号++++住院号=病案号",
|
|
|
+ "签名++++=签名"
|
|
|
+ );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 给structureMap添加一个key(映射)
|
|
|
+ *
|
|
|
+ * @param structureMap
|
|
|
+ * @param target 需要用到的key
|
|
|
+ * @param source structureMap中含有的key
|
|
|
+ */
|
|
|
+ protected void addKeyMapping(Map<String, String> structureMap, String target, String source) {
|
|
|
+ if (StringUtils.isEmpty(structureMap.get(target)) && StringUtils.isNotEmpty(structureMap.get(source))) {
|
|
|
+ structureMap.put(target, structureMap.get(source));
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|