|
@@ -1,7 +1,6 @@
|
|
|
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.pub.model.doc.BeHospitalizedDoc;
|
|
@@ -50,8 +49,10 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
} else {
|
|
|
Map<String, String> sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
+ //日间病历修改医师签名时间
|
|
|
+ modifySignDate(sourceMap);
|
|
|
List<String> titles = Lists.newArrayList("婚 姻", "婚姻状况", "住 址", "供 史 者", "性 别", "婚 姻", "民 族", "民 族", "个人史", "妇科检查", "产科检查",
|
|
|
- "实验室", "初步诊断", "修正诊断", "医生签名","补充诊断", "医师签名", "日 期", "诊断和诊断修正");
|
|
|
+ "实验室", "初步诊断", "修正诊断", "医生签名", "补充诊断", "医师签名", "日 期", "诊断和诊断修正");
|
|
|
String text = sourceMap.get("原始文本");
|
|
|
List<String> sortTitles = CommonAnalysisUtil.sortTitlesNoColon(titles, text);
|
|
|
CommonAnalysisUtil.cutByTitlesNoColon(text, sortTitles, 0, sourceMap);
|
|
@@ -90,38 +91,26 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"诊断和诊断修正", "补充诊断");
|
|
|
for (String diagnose : diagnosetitles) {
|
|
|
if (sourceMap.containsKey(diagnose)) {
|
|
|
- String value = sourceMap.get(diagnose).replaceAll("医师签名", "").
|
|
|
- replaceAll(":", "").
|
|
|
- replaceAll("日 期", "").
|
|
|
- replaceAll("■", "").
|
|
|
- replaceAll("补充诊断", "").
|
|
|
- replaceAll("修正诊断", "").
|
|
|
- replaceAll("\"", "").
|
|
|
- replaceAll(":", "").
|
|
|
- replaceAll("日期", "").
|
|
|
- replaceAll("医生签名", "").
|
|
|
- replaceAll("签名时间", "").
|
|
|
- replaceAll("[0-9]{4}-[0-9]{2}-[0-9]{2}", "").
|
|
|
- replaceAll("--", "");
|
|
|
+ String value = sourceMap.get(diagnose).replaceAll("医师签名", "")
|
|
|
+ .replaceAll(":|日 期|■|补充诊断|修正诊断|\"|:|日期|医生签名|签名时间", "")
|
|
|
+ .replaceAll("[0-9]{4}-[0-9]{2}-[0-9]{2}", "")
|
|
|
+ .replace("--", "");
|
|
|
sourceMap.put(diagnose, value);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (sourceMap.containsKey("初步诊断医师签名")) {
|
|
|
- String value = sourceMap.get("初步诊断").replaceAll("日期", "").
|
|
|
- replaceAll(":", "").replaceAll("医师签名", "");
|
|
|
+ String value = sourceMap.get("初步诊断").replaceAll("日期|:|医师签名", "");
|
|
|
sourceMap.put("初步诊断", value);
|
|
|
}
|
|
|
if (sourceMap.containsKey("医师签名")) {
|
|
|
- String value = sourceMap.get("医师签名").replaceAll("日期", "").
|
|
|
- replaceAll(":", "").replaceAll("医师签名", "").
|
|
|
- replaceAll("\\d", "").replaceAll("--", "");
|
|
|
+ String value = sourceMap.get("医师签名").replaceAll("日期|:|医师签名|--|", "")
|
|
|
+ .replaceAll("\\d", "");
|
|
|
sourceMap.put("医师签名", value);
|
|
|
}
|
|
|
if (sourceMap.containsKey("医生签名")) {
|
|
|
- String value = sourceMap.get("医生签名").replaceAll("日期", "").
|
|
|
- replaceAll(":", "").replaceAll("医生签名", "").replaceAll("签名时间", "").
|
|
|
- replaceAll("\\d", "").replaceAll("--", "");
|
|
|
+ String value = sourceMap.get("医生签名").replaceAll("日期|:|医生签名|签名时间|--", "")
|
|
|
+ .replaceAll("\\d", "");
|
|
|
sourceMap.put("医生签名", value);
|
|
|
}
|
|
|
//产科入院记录个人史处理
|
|
@@ -133,9 +122,9 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
//入院记录标题部分解析不出的 婚姻和民族处理
|
|
|
//注意中间的空格是什么字符
|
|
|
List<String> titletitles = Lists.newArrayList("住 址",
|
|
|
- "婚 姻", "民 族", "民 族", "供 史 者", "性 别", "婚 姻", "婚姻状况","病史提供者");
|
|
|
+ "婚 姻", "民 族", "民 族", "供 史 者", "性 别", "婚 姻", "婚姻状况", "病史提供者");
|
|
|
for (String str : titletitles) {
|
|
|
- String str1 = str.replaceAll(" ", "").replaceAll(" ", "");
|
|
|
+ String str1 = str.replaceAll("[ ]", "");
|
|
|
if (sourceMap.containsKey(str)) {
|
|
|
String value = (sourceMap.get(str).split(" ")[0]).split("\\\\n")[0];
|
|
|
sourceMap.put(str1, value);
|
|
@@ -161,6 +150,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
return beHospitalizedDoc;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private List<String> keyContrasts = Lists.newArrayList(
|
|
|
"本人姓名=姓名",
|
|
|
"性别=性别",
|
|
@@ -203,7 +193,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"患者出生地址=出生地",
|
|
|
"入院日期时间=入院日期",
|
|
|
"现住址=户口地址",
|
|
|
-// "_{K4}=性别",
|
|
|
+ // "_{K4}=性别",
|
|
|
"联系住址=户口地址",
|
|
|
"联系地址=户口地址",
|
|
|
"患者工作单位名称=户口地址",
|
|
@@ -242,9 +232,11 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"婚姻=婚姻状况",
|
|
|
"住址=户口地址",
|
|
|
"患者籍贯=出生地",
|
|
|
+ "他=其他",
|
|
|
+ "入院诊断1=初步诊断",
|
|
|
+ "出院诊断1=出院诊断",
|
|
|
+ "主刀医师签名=初步诊断医师签名",
|
|
|
"诊断和诊断修正=修正诊断"
|
|
|
-
|
|
|
-
|
|
|
);
|
|
|
|
|
|
|
|
@@ -393,4 +385,14 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void modifySignDate(Map<String, String> sourceMap) {
|
|
|
+ if (sourceMap.containsKey("医师签名时间")) {
|
|
|
+ String signDateStr = sourceMap.get("医师签名时间");
|
|
|
+ String[] dateStrArray = signDateStr.split(" ");
|
|
|
+ if (dateStrArray.length == 4) {
|
|
|
+ sourceMap.put("医师签名时间", dateStrArray[2] + " " + dateStrArray[3]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|