|
@@ -0,0 +1,62 @@
|
|
|
+package com.diagbot.facade;
|
|
|
+
|
|
|
+import com.diagbot.biz.push.entity.Item;
|
|
|
+import com.diagbot.dto.HighRiskNeoDTO;
|
|
|
+import com.diagbot.dto.IndicationDTO;
|
|
|
+import com.diagbot.dto.WordCrfDTO;
|
|
|
+import com.diagbot.process.HighRiskProcess;
|
|
|
+import com.diagbot.vo.HighRiskNeoVO;
|
|
|
+import com.diagbot.vo.IndicationPushVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: 危急值facade
|
|
|
+ * @author: zhoutg
|
|
|
+ * @time: 2018/8/6 9:11
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class CriticalFacade {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ NeoFacade neoFacade;
|
|
|
+ @Autowired
|
|
|
+ HighRiskProcess highRiskProcess;
|
|
|
+ @Autowired
|
|
|
+ CommonFacade commonFacade;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 高风险提示
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public void criticalFac(IndicationPushVO indicationPushVO, WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
+ // 高风险图谱接口调用
|
|
|
+ HighRiskNeoVO highRiskNeoVO = fillHighRiskNeo(wordCrfDTO);
|
|
|
+ List<HighRiskNeoDTO> highRiskNeoDTOList = neoFacade.getHighRiskNeo(highRiskNeoVO);
|
|
|
+ // 规则处理
|
|
|
+ highRiskProcess.process(highRiskNeoDTOList, res);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public HighRiskNeoVO fillHighRiskNeo(WordCrfDTO wordCrfDTO) {
|
|
|
+ HighRiskNeoVO highRiskNeoVO = new HighRiskNeoVO();
|
|
|
+
|
|
|
+ List<Item> items = wordCrfDTO.getDrugOrder();
|
|
|
+
|
|
|
+ for (Item item : items) {
|
|
|
+ highRiskNeoVO.getDrugList().put(item.getName(), item.getUniqueName());
|
|
|
+ }
|
|
|
+
|
|
|
+ items = wordCrfDTO.getOperationOrder();
|
|
|
+
|
|
|
+ for (Item item : items) {
|
|
|
+ highRiskNeoVO.getOperationList().put(item.getName(), item.getUniqueName());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return highRiskNeoVO;
|
|
|
+ }
|
|
|
+}
|