|
@@ -1,8 +1,13 @@
|
|
|
package com.lantone.qc.trans;
|
|
|
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.model.vo.QueryVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -21,6 +26,9 @@ public class TransDispatch {
|
|
|
+ queryVo.getCid().substring(1)
|
|
|
+ "DocTrans";
|
|
|
DocTrans docTrans = (DocTrans) Class.forName(classPath).newInstance();
|
|
|
+ queryDeal(queryVo, "会诊", "会诊申请单", "会诊结果单", "会诊记录");
|
|
|
+ queryDeal(queryVo, "手术", "术前讨论、术前小结", "手术记录", "术后首次病程及谈话记录");
|
|
|
+ queryDeal(queryVo, "转科", "转入记录", "转出记录", "转科记录");
|
|
|
return docTrans.extract(queryVo);
|
|
|
} catch (Exception e) {
|
|
|
log.info(e.getMessage(), e);
|
|
@@ -28,4 +36,24 @@ public class TransDispatch {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private static void queryDeal(QueryVo queryVo, String bigTitle, String... smallTitles) {
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
+ medrecVo.setTitle(bigTitle);
|
|
|
+ Map<String, Object> content = Maps.newHashMap();
|
|
|
+ Map<String, Object> contentDetail = Maps.newHashMap();
|
|
|
+ for (MedrecVo i : queryVo.getMedrec()) {
|
|
|
+ for (String smallTitle : smallTitles) {
|
|
|
+ if (i.getTitle().equals(smallTitle)) {
|
|
|
+ contentDetail.put(smallTitle, i.getContent().get("content"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (MapUtils.isEmpty(contentDetail)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ content.put("content", contentDetail);
|
|
|
+ medrecVo.setContent(content);
|
|
|
+ queryVo.getMedrec().add(medrecVo);
|
|
|
+ }
|
|
|
+
|
|
|
}
|