|
@@ -3,9 +3,8 @@ package com.lantone.qc.trans.changx;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
-import com.lantone.qc.pub.model.keys.ModelStandardKeys;
|
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
-import com.lantone.qc.pub.util.ListUtil;
|
|
|
|
|
|
+import com.lantone.qc.pub.util.MapUtil;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.Preproc;
|
|
import com.lantone.qc.trans.comsis.Preproc;
|
|
@@ -25,7 +24,6 @@ public class ChangxFirstCourseRecordDocTrans extends ModelDocTrans {
|
|
String content = ((List<String>) medrecVo.getContent().get("content")).get(0);
|
|
String content = ((List<String>) medrecVo.getContent().get("content")).get(0);
|
|
|
|
|
|
List<String> targetTitles = Lists.newArrayList();
|
|
List<String> targetTitles = Lists.newArrayList();
|
|
- List<String> sourceTitles = ListUtil.isEmpty(medrecVo.getLabel()) ? ModelStandardKeys.firstCourseRecord : medrecVo.getLabel();
|
|
|
|
sourceTitles.forEach(sourceTitle -> {
|
|
sourceTitles.forEach(sourceTitle -> {
|
|
String targetTitle = "[一二三四五六七八九十]{0,1}[、.]{0,1}";
|
|
String targetTitle = "[一二三四五六七八九十]{0,1}[、.]{0,1}";
|
|
for (int index = 0; index < sourceTitle.length(); index++) {
|
|
for (int index = 0; index < sourceTitle.length(); index++) {
|
|
@@ -38,29 +36,37 @@ public class ChangxFirstCourseRecordDocTrans extends ModelDocTrans {
|
|
targetTitles.add(targetTitle);
|
|
targetTitles.add(targetTitle);
|
|
});
|
|
});
|
|
|
|
|
|
- Map<String, String> sourceMap = Preproc.extract_doc_pub(false, targetTitles, content);
|
|
|
|
- sourceMap.put("病程记录内容",
|
|
|
|
- sourceMap.get("病程记录内容")
|
|
|
|
- .replace(sourceMap.get("病程记录时间"), "")
|
|
|
|
- .replace(sourceMap.get("病程记录名称"), "")
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
|
|
+ Map<String, String> sourceMap = Preproc.extract_doc_pub(true, targetTitles, content);
|
|
Map<String, String> targetMap = Maps.newHashMap();
|
|
Map<String, String> targetMap = Maps.newHashMap();
|
|
- Map<String, Object> pageData = Maps.newHashMap();
|
|
|
|
for (String key : sourceMap.keySet()) {
|
|
for (String key : sourceMap.keySet()) {
|
|
- if (key.equals("病程记录时间")) {
|
|
|
|
- targetMap.put("记录时间", sourceMap.get(key));
|
|
|
|
- } else {
|
|
|
|
- targetMap.put(key.replaceAll("[一二三四五六七八九十][、.]", ""), sourceMap.get(key));
|
|
|
|
- }
|
|
|
|
- pageData.put(key.replaceAll("[一二三四五六七八九十][、.]", ""), sourceMap.get(key));
|
|
|
|
|
|
+ targetMap.put(key.replaceAll("[一二三四五六七八九十][、.]", ""), sourceMap.get(key));
|
|
}
|
|
}
|
|
|
|
+ targetMap.put("记录时间", sourceMap.get("病程记录时间"));
|
|
|
|
+ Map<String, String> pageData = MapUtil.copyMap((Map) targetMap);
|
|
|
|
+ pageData.put("病程记录内容",
|
|
|
|
+ pageData.get("病程记录内容")
|
|
|
|
+ .replace(pageData.get("病程记录时间"), "")
|
|
|
|
+ .replace(pageData.get("病程记录名称"), "")
|
|
|
|
+ );
|
|
|
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = ModelDocGenerate.firstCourseRecordDocGen(targetMap);
|
|
FirstCourseRecordDoc firstCourseRecordDoc = ModelDocGenerate.firstCourseRecordDocGen(targetMap);
|
|
firstCourseRecordDoc.setText(content);
|
|
firstCourseRecordDoc.setText(content);
|
|
- firstCourseRecordDoc.setPageData(pageData);
|
|
|
|
|
|
+ firstCourseRecordDoc.setPageData((Map) pageData);
|
|
|
|
|
|
return firstCourseRecordDoc;
|
|
return firstCourseRecordDoc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private List<String> sourceTitles = Lists.newArrayList(
|
|
|
|
+ "病程记录时间",
|
|
|
|
+ "病程记录名称",
|
|
|
|
+ "病程记录内容",
|
|
|
|
+ "病例特点",
|
|
|
|
+ "初步诊断",
|
|
|
|
+ "诊断依据",
|
|
|
|
+ "鉴别诊断",
|
|
|
|
+ "诊疗计划",
|
|
|
|
+ "记录医师",
|
|
|
|
+ "记录时间"
|
|
|
|
+ );
|
|
|
|
+
|
|
}
|
|
}
|