|
@@ -2,7 +2,7 @@ package com.lantone.qc.trans.shengzhouyy;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
-import com.lantone.qc.dbanaly.facade.yiwu.YiWuXmlUtil;
|
|
|
+import com.lantone.qc.dbanaly.facade.shengzhouzz.ShengzhouyyXmlUtil;
|
|
|
import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
|
|
|
import com.lantone.qc.pub.model.doc.transferrecord.TransferIntoDoc;
|
|
|
import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
|
|
@@ -12,6 +12,7 @@ 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 java.util.*;
|
|
@@ -50,7 +51,7 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
});
|
|
|
for (TransferIntoDoc transferIntoDoc : transferIntoDocMap.values()) {
|
|
|
Map<String, String> structureMap = transferIntoDoc.getStructureMap();
|
|
|
- String inDateStr = structureMap.get("转入日期");
|
|
|
+ String inDateStr = structureMap.get("入科日期");
|
|
|
if (StringUtil.isBlank(inDateStr)) {
|
|
|
continue;
|
|
|
}
|
|
@@ -71,7 +72,7 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
});
|
|
|
for (TransferOutDoc transferOutDoc : transferOutDocMap.values()) {
|
|
|
Map<String, String> structureMap = transferOutDoc.getStructureMap();
|
|
|
- String outDateStr = structureMap.get("转入日期");
|
|
|
+ String outDateStr = structureMap.get("转出日期");
|
|
|
if (StringUtil.isBlank(outDateStr)) {
|
|
|
continue;
|
|
|
}
|
|
@@ -93,7 +94,7 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
});
|
|
|
for (TransferRecordDoc transferRecordAllDoc : transferAllDocMap.values()) {
|
|
|
Map<String, String> structureMap = transferRecordAllDoc.getStructureMap();
|
|
|
- String transferDateStr = structureMap.get("转入日期");
|
|
|
+ String transferDateStr = structureMap.get("入科日期");
|
|
|
if (StringUtil.isBlank(transferDateStr)) {
|
|
|
continue;
|
|
|
}
|
|
@@ -138,7 +139,12 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
} else {
|
|
|
- sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap = ShengzhouyyXmlUtil.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(), "");
|
|
@@ -154,9 +160,9 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
|
|
|
private List<String> transferInto_keyContrasts = Lists.newArrayList(
|
|
|
- "书写日期=记录日期",
|
|
|
+ /*"书写日期=记录日期",
|
|
|
"转入时间=转入日期",
|
|
|
- "本人姓名=姓名"
|
|
|
+ "本人姓名=姓名"*/
|
|
|
);
|
|
|
|
|
|
/**************************************************全部*******************************************************/
|
|
@@ -188,9 +194,16 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
} else {
|
|
|
- sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap = ShengzhouyyXmlUtil.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));
|
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, transferInto_keyContrasts);
|
|
|
+ sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, transferInto_keyContrasts, modeId);
|
|
|
}
|
|
|
TransferRecordDoc transferAllDoc = new TransferRecordDoc();
|
|
|
transferAllDoc.setText(content);
|
|
@@ -228,7 +241,12 @@ public class TransferRecordDocTrans extends ModelDocTrans {
|
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
} else {
|
|
|
- sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
+ sourceMap = ShengzhouyyXmlUtil.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(), "");
|