|
@@ -7,6 +7,7 @@ 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.OperationSafetyChecklistDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
@@ -41,12 +42,14 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
Map<String, OperationRecordDoc> operationRecordDocMap = getOperationRecordDocMap(contentMap.get("手术记录"));
|
|
|
Map<String, PreoperativeDiscussionDoc> preoperativeDiscussionDocMap = getPreoperativeDiscussionDocMap(contentMap.get("术前讨论、术前小结"));
|
|
|
Map<String, OperationInformedConsentDoc> operationInformedConsentDocMap = getOperationInformedConsentDocMap(contentMap.get("手术知情同意书"));
|
|
|
+ Map<String, OperationSafetyChecklistDoc> operationSafetyChecklistDocMap = getOperationSafetyChecklistDocMap(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();
|
|
@@ -55,6 +58,7 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
operationDoc.setOperationRecordDoc(operationRecordDocMap.get(operationName));
|
|
|
operationDoc.setPreoperativeDiscussionDoc(preoperativeDiscussionDocMap.get(operationName));
|
|
|
operationDoc.setOperationInformedConsentDoc(operationInformedConsentDocMap.get(operationName));
|
|
|
+ operationDoc.setOperationSafetyChecklistDoc(operationSafetyChecklistDocMap.get(operationName));
|
|
|
retList.add(operationDoc);
|
|
|
});
|
|
|
|
|
@@ -393,4 +397,62 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
|
|
|
"签名时间=签名时间"
|
|
|
);
|
|
|
|
|
|
+
|
|
|
+ /**********************************************手术安全核查表****************************************************/
|
|
|
+ private Map<String, OperationSafetyChecklistDoc> getOperationSafetyChecklistDocMap(List<String> contents) {
|
|
|
+ Map<String, OperationSafetyChecklistDoc> 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 + "";
|
|
|
+ OperationSafetyChecklistDoc operationSafetyChecklistDoc = getOperationSafetyChecklistDoc(content);
|
|
|
+ operationSafetyChecklistDoc.setOperationName(operationName);
|
|
|
+ retMap.put(operationName, operationSafetyChecklistDoc);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private OperationSafetyChecklistDoc getOperationSafetyChecklistDoc(String content) {
|
|
|
+ Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent", content);
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationSafetyChecklist_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, operationSafetyChecklist_sourceTitles, text);
|
|
|
+ cutWordMap.putAll(structureMap);
|
|
|
+
|
|
|
+ OperationSafetyChecklistDoc operationSafetyChecklistDoc = ModelDocGenerate.operationSafetyChecklistDocGen(cutWordMap);
|
|
|
+ operationSafetyChecklistDoc.setText(text);
|
|
|
+ operationSafetyChecklistDoc.setPageData((Map) xmlNodeValueMap);
|
|
|
+
|
|
|
+ return operationSafetyChecklistDoc;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> operationSafetyChecklist_sourceTitles = Lists.newArrayList(
|
|
|
+ "姓名",
|
|
|
+ "性别",
|
|
|
+ "病区",
|
|
|
+ "床号",
|
|
|
+ "病案号",
|
|
|
+ "签名"
|
|
|
+ );
|
|
|
+
|
|
|
+ private List<String> operationSafetyChecklist_keyContrasts = Lists.newArrayList(
|
|
|
+ "姓名++++患者姓名=姓名",
|
|
|
+ "性别",
|
|
|
+ "病区",
|
|
|
+ "床号",
|
|
|
+ "病案号++++住院号=病案号",
|
|
|
+ "签名++++=签名"
|
|
|
+ );
|
|
|
+
|
|
|
}
|