|
@@ -1,21 +1,12 @@
|
|
|
package com.lantone.qc.trans.yiwu;
|
|
|
|
|
|
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.util.ModuleMappingUtil;
|
|
|
import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
-import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
-import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
-import com.lantone.qc.pub.model.label.FamilyLabel;
|
|
|
-import com.lantone.qc.pub.model.label.MaritalLabel;
|
|
|
-import com.lantone.qc.pub.model.label.MenstrualLabel;
|
|
|
-import com.lantone.qc.pub.model.label.PacsLabel;
|
|
|
-import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
-import com.lantone.qc.pub.model.label.PersonalLabel;
|
|
|
-import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
-import com.lantone.qc.pub.model.label.VitalLabel;
|
|
|
-import com.lantone.qc.pub.model.label.VitalLabelSpecial;
|
|
|
+import com.lantone.qc.pub.model.label.*;
|
|
|
import com.lantone.qc.pub.model.vo.BehospitalInfoVO;
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
@@ -57,10 +48,15 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
//日间病历单独处理
|
|
|
String behDeptId = behospitalInfoVO.getBehDeptId();
|
|
|
if ("51923".equals(behDeptId) || "52883".equals(behDeptId) || "52903".equals(behDeptId) || "52923".equals(behDeptId) || "53523".equals(behDeptId)) {
|
|
|
- dailyTrans(sourceMap, text, behDeptId);
|
|
|
+ Map<String, String> dailyTrans = dailyTrans(text, behDeptId);
|
|
|
+ dailyTrans.forEach((k, v) -> {
|
|
|
+ if (!sourceMap.containsKey(k)) {
|
|
|
+ sourceMap.put(k, v);
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
List<String> titles = Lists.newArrayList("婚 姻", "婚姻状况", "住 址", "供 史 者", "性 别", "婚 姻", "民 族", "民 族", "个人史", "个 人 史", "妇科检查", "产科检查",
|
|
|
- "实验室", "诊断和诊断修正", "婚 育 史", "家 族 史", "体格检查(一)", "体 格 检 查(一)", "现 病 史", "既往史", "既 往 史", "系统回顾", "职 业", "联系人及电话");
|
|
|
+ "实验室", "诊断和诊断修正", "婚 育 史", "家 族 史", "体格检查(一)", "体 格 检 查(一)", "现 病 史", "既往史", "既 往 史", "系统回顾", "其他", "职 业", "联系人及电话");
|
|
|
List<String> sortTitles = CommonAnalysisUtil.sortTitlesNoColon(titles, text);
|
|
|
CommonAnalysisUtil.cutByTitlesNoColon(text, sortTitles, 0, sourceMap);
|
|
|
List<String> modifyKey = Lists.newArrayList("初步诊断", "修正诊断", "补充诊断");
|
|
@@ -130,7 +126,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
addKeyMapping(structureMap, "职业", "工作性质");
|
|
|
BeHospitalizedDoc beHospitalizedDoc = beHospitalizedDocGen(structureMap); // 不走共用
|
|
|
beHospitalizedDoc.setPageData((Map) structureMap);
|
|
|
- structureMap.forEach((k, v) -> System.out.println(k + "\n" + v + "\n----------------------------------------"));
|
|
|
+ //structureMap.forEach((k, v) -> System.out.println(k + "\n" + v + "\n----------------------------------------"));
|
|
|
return beHospitalizedDoc;
|
|
|
}
|
|
|
|
|
@@ -367,11 +363,11 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
/**
|
|
|
* 日间病历解析全用切词方式
|
|
|
*
|
|
|
- * @param sourceMap
|
|
|
* @param text
|
|
|
* @param behDeptId
|
|
|
*/
|
|
|
- private void dailyTrans(Map<String, String> sourceMap, String text, String behDeptId) {
|
|
|
+ private Map<String, String> dailyTrans(String text, String behDeptId) {
|
|
|
+ Map<String, String> parseMap = Maps.newHashMap();
|
|
|
List<String> titles = Lists.newArrayList();
|
|
|
switch (behDeptId) {
|
|
|
case "51923":
|
|
@@ -410,7 +406,8 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"记录医师", "记录时间", "时间");
|
|
|
break;
|
|
|
}
|
|
|
- CommonAnalysisUtil.cutByTitles(text, titles, 0, sourceMap);
|
|
|
+ CommonAnalysisUtil.cutByTitles(text, titles, 0, parseMap);
|
|
|
+ return parseMap;
|
|
|
}
|
|
|
|
|
|
private String modifyDiagKey(String text, String key) {
|