Prechádzať zdrojové kódy

高危药品、手术

zhoutg 5 rokov pred
rodič
commit
45de5060c5

+ 3 - 0
src/main/java/com/diagbot/dto/HighRiskNeoDTO.java

@@ -19,4 +19,7 @@ public class HighRiskNeoDTO {
     // 是否高危 - True:是,False:否
     private Boolean isHighrisk;
 
+    // 类型,“药品”,“手术”
+    private String type;
+
 }

+ 7 - 4
src/main/java/com/diagbot/facade/HighRiskFacade.java

@@ -3,7 +3,7 @@ package com.diagbot.facade;
 import com.diagbot.biz.push.entity.Item;
 import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.biz.push.entity.Pacs;
-import com.diagbot.dto.BillNeoDTO;
+import com.diagbot.dto.HighRiskNeoDTO;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.process.HighRiskProcess;
@@ -13,6 +13,7 @@ import com.diagbot.vo.IndicationPushVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -37,11 +38,13 @@ public class HighRiskFacade {
      */
     public void highRiskFac(IndicationPushVO indicationPushVO, WordCrfDTO wordCrfDTO, IndicationDTO res) {
         // 高风险图谱接口调用
-        BillNeoVO billNeoVO = fillBillNeo(wordCrfDTO);
-        List<BillNeoDTO> billNeoDTOList = neoFacade.getBillNeo(billNeoVO);
+        // BillNeoVO billNeoVO = fillBillNeo(wordCrfDTO);
+        // List<BillNeoDTO> billNeoDTOList = neoFacade.getBillNeo(billNeoVO);
+        // TODO
+        List<HighRiskNeoDTO> highRiskNeoDTOList = new ArrayList<>();
 
         // 规则处理
-        highRiskProcess.process(billNeoDTOList, wordCrfDTO, res);
+        highRiskProcess.process(highRiskNeoDTOList, res);
         System.out.println(res);
     }
 

+ 12 - 31
src/main/java/com/diagbot/process/HighRiskProcess.java

@@ -1,11 +1,8 @@
 package com.diagbot.process;
 
 import com.diagbot.dto.BillMsg;
-import com.diagbot.dto.BillNeoDTO;
+import com.diagbot.dto.HighRiskNeoDTO;
 import com.diagbot.dto.IndicationDTO;
-import com.diagbot.dto.WordCrfDTO;
-import com.diagbot.facade.NeoFacade;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -18,35 +15,19 @@ import java.util.List;
 @Component
 public class HighRiskProcess {
 
-    @Autowired
-    NeoFacade neoFacade;
-
-    public void process(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, IndicationDTO res) {
-        for (BillNeoDTO billNeoDTO : billNeoDTOList) {
-            if (billNeoDTO.getDrugBillNeoDTO() != null) {
-                // TODO
-                if (true) {
-                    getHighRiskMsg(billNeoDTO, "药品", res);
-                }
-            } else if (billNeoDTO.getLisBillNeoDTO() != null) {
-                // TODO
-                getHighRiskMsg(billNeoDTO, "手术", res);
-            }
-        }
-    }
-
     /**
-     *
-     * @param billNeoDTO
-     * @param type
+     * 处理业务
+     * @param highRiskNeoDTOList
      * @param res
      */
-    public void getHighRiskMsg(BillNeoDTO billNeoDTO, String type, IndicationDTO res) {
-        BillMsg billMsg = new BillMsg();
-        billMsg.setMsg(billNeoDTO.getName() + "为高风险要" + type + ",请留意");
-        billMsg.setOrderName(billNeoDTO.getName());
-        billMsg.setOrderStandName(billNeoDTO.getStandname());
-        billMsg.setType(type);
-        res.getHighRiskList().add(billMsg);
+    public void process(List<HighRiskNeoDTO> highRiskNeoDTOList, IndicationDTO res) {
+        for (HighRiskNeoDTO highRiskNeoDTO : highRiskNeoDTOList) {
+            BillMsg billMsg = new BillMsg();
+            billMsg.setMsg(highRiskNeoDTO.getName() + "为高风险" + highRiskNeoDTO.getType() + ",请留意");
+            billMsg.setOrderName(highRiskNeoDTO.getName());
+            billMsg.setOrderStandName(highRiskNeoDTO.getStandname());
+            billMsg.setType(highRiskNeoDTO.getType());
+            res.getHighRiskList().add(billMsg);
+        }
     }
 }