|
@@ -1,13 +1,13 @@
|
|
package com.lantone.qc.trans.beilun;
|
|
package com.lantone.qc.trans.beilun;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
|
|
|
|
import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
|
|
import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
|
+import com.lantone.qc.trans.beilun.util.BeiLunDeathCaseDiscussHtmlAnalysis;
|
|
|
|
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
-import com.lantone.qc.trans.comsis.Preproc;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -23,48 +23,18 @@ public class BeiLunDeathCaseDiscussDocTrans extends ModelDocTrans {
|
|
public DeathCaseDiscussDoc extract(MedrecVo medrecVo) {
|
|
public DeathCaseDiscussDoc extract(MedrecVo medrecVo) {
|
|
Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
|
|
Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
|
|
String content = contentMap.get("xmlText").toString();
|
|
String content = contentMap.get("xmlText").toString();
|
|
- Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
|
- xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
|
- xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
|
|
|
|
-
|
|
|
|
- String text = CxXmlUtil.getXmlText(content);
|
|
|
|
- Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
|
|
|
|
- cutWordMap.putAll(structureMap);
|
|
|
|
-
|
|
|
|
- DeathCaseDiscussDoc deathCaseDiscussDoc = ModelDocGenerate.deathCaseDiscussDocGen(cutWordMap);
|
|
|
|
- deathCaseDiscussDoc.setText(text);
|
|
|
|
- deathCaseDiscussDoc.setPageData((Map) cutWordMap);
|
|
|
|
|
|
+ String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
+ BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunDeathCaseDiscussHtmlAnalysis();
|
|
|
|
+ Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle);
|
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
|
|
|
|
|
+ DeathCaseDiscussDoc deathCaseDiscussDoc = ModelDocGenerate.deathCaseDiscussDocGen(structureMap);
|
|
|
|
+ deathCaseDiscussDoc.setPageData((Map) structureMap);
|
|
return deathCaseDiscussDoc;
|
|
return deathCaseDiscussDoc;
|
|
}
|
|
}
|
|
|
|
|
|
- private List<String> sourceTitles = Lists.newArrayList(
|
|
|
|
- "记录时间",
|
|
|
|
- "记录医师",
|
|
|
|
- "入院时间",
|
|
|
|
- "死亡时间",
|
|
|
|
- "出院时间",
|
|
|
|
- "入院诊断",
|
|
|
|
- "死亡诊断",
|
|
|
|
- "讨论时间",
|
|
|
|
- "讨论地点",
|
|
|
|
- "参加讨论人员",
|
|
|
|
- "讨论主持人",
|
|
|
|
- "讨论内容",
|
|
|
|
- "死亡原因",
|
|
|
|
- "结论"
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
private List<String> keyContrasts = Lists.newArrayList(
|
|
private List<String> keyContrasts = Lists.newArrayList(
|
|
- "记录日期=记录时间",
|
|
|
|
- "讨论时间=",
|
|
|
|
- "主持人=讨论主持人",
|
|
|
|
- "参加人员姓名=参加讨论人员",
|
|
|
|
- "讨论内容=",
|
|
|
|
- "主持人小结++++主持人小结意见=结论",
|
|
|
|
- "签名++++=记录医师",
|
|
|
|
- "签名时间="
|
|
|
|
|
|
+
|
|
);
|
|
);
|
|
|
|
|
|
}
|
|
}
|