|
@@ -2,10 +2,7 @@ package com.lantone.qc.trans.changx;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
-import com.lantone.qc.pub.model.keys.ModelStandardKeys;
|
|
|
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.comsis.ModelDocGenerate;
|
|
|
import com.lantone.qc.trans.comsis.Preproc;
|
|
@@ -24,14 +21,20 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
public List<ThreeLevelWardDoc> extract(MedrecVo medrecVo) {
|
|
|
List<ThreeLevelWardDoc> retList = Lists.newArrayList();
|
|
|
List<String> contents = (List) medrecVo.getContent().get("content");
|
|
|
- List<String> sourceTitles = ListUtil.isEmpty(medrecVo.getLabel()) ? ModelStandardKeys.threeLevelWard : medrecVo.getLabel();
|
|
|
contents.forEach(content -> {
|
|
|
- retList.add(getThreeLevelWardDoc(content, sourceTitles));
|
|
|
+ retList.add(getThreeLevelWardDoc(content));
|
|
|
});
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
- private ThreeLevelWardDoc getThreeLevelWardDoc(String content, List<String> sourceTitles) {
|
|
|
+ private ThreeLevelWardDoc getThreeLevelWardDoc(String content) {
|
|
|
+ Map<String, String> pageData = Preproc.extract_doc_pub(true, pageDataTitles, content);
|
|
|
+ pageData.put("病程记录内容",
|
|
|
+ pageData.get("病程记录内容")
|
|
|
+ .replace(pageData.get("病程记录时间"), "")
|
|
|
+ .replace(pageData.get("病程记录名称"), "")
|
|
|
+ );
|
|
|
+
|
|
|
List<String> targetTitles = Lists.newArrayList();
|
|
|
sourceTitles.forEach(sourceTitle -> {
|
|
|
String targetTitle = "";
|
|
@@ -45,20 +48,34 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
targetTitles.add(targetTitle);
|
|
|
});
|
|
|
|
|
|
- Map<String, String> sourceMap = Preproc.extract_doc_pub(false, targetTitles, content);
|
|
|
- Map<String, String> targetMap = MapUtil.copyMap((Map) sourceMap);
|
|
|
- targetMap.put("记录时间", targetMap.get("病程记录时间"));
|
|
|
- targetMap.remove("病程记录时间");
|
|
|
- targetMap.put("查房标题", targetMap.get("病程记录名称"));
|
|
|
- targetMap.remove("病程记录名称");
|
|
|
- targetMap.put("病情记录", targetMap.get("病程记录内容"));
|
|
|
- targetMap.remove("病程记录内容");
|
|
|
+ Map<String, String> sourceMap = Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
+ sourceMap.put("记录时间", sourceMap.get("病程记录时间"));
|
|
|
+ sourceMap.put("查房标题", sourceMap.get("病程记录名称"));
|
|
|
+ sourceMap.put("病情记录", sourceMap.get("病程记录内容"));
|
|
|
|
|
|
- ThreeLevelWardDoc threeLevelWardDoc = ModelDocGenerate.threeLevelWardDocGen(targetMap);
|
|
|
+ ThreeLevelWardDoc threeLevelWardDoc = ModelDocGenerate.threeLevelWardDocGen(sourceMap);
|
|
|
threeLevelWardDoc.setText(content);
|
|
|
- threeLevelWardDoc.setPageData((Map) sourceMap);
|
|
|
+ threeLevelWardDoc.setPageData((Map) pageData);
|
|
|
|
|
|
return threeLevelWardDoc;
|
|
|
}
|
|
|
|
|
|
+ private List<String> pageDataTitles = Lists.newArrayList(
|
|
|
+ "病程记录时间",
|
|
|
+ "病程记录名称",
|
|
|
+ "病程记录内容",
|
|
|
+ "记录医师"
|
|
|
+ );
|
|
|
+
|
|
|
+ private List<String> sourceTitles = Lists.newArrayList(
|
|
|
+ "病程记录时间",
|
|
|
+ "病程记录名称",
|
|
|
+ "病程记录内容",
|
|
|
+ "查房标题",
|
|
|
+ "病情记录",
|
|
|
+ "查房日期",
|
|
|
+ "记录时间",
|
|
|
+ "记录医师"
|
|
|
+ );
|
|
|
+
|
|
|
}
|