瀏覽代碼

输血结构

zhoutg 4 年之前
父節點
當前提交
fbe35e64b1

+ 1 - 2
src/main/java/com/diagbot/dto/OtherTipTransfusionNeoDTO.java

@@ -2,7 +2,6 @@ package com.diagbot.dto;
 
 import com.diagbot.biz.push.entity.Item;
 import com.diagbot.biz.push.entity.Lis;
-import com.diagbot.model.label.PacsLabel;
 import lombok.Data;
 
 import java.util.ArrayList;
@@ -23,7 +22,7 @@ public class OtherTipTransfusionNeoDTO {
     private List<Lis> lisList = new ArrayList<>();
 
     // 辅检
-    private PacsLabel pacsLabel = new PacsLabel();
+    // private PacsLabel pacsLabel = new PacsLabel();
 
     // 手术及操作
     private List<Item> operation = new ArrayList<>();

+ 4 - 0
src/main/java/com/diagbot/facade/OtherTipFacade.java

@@ -2,12 +2,14 @@ package com.diagbot.facade;
 
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.OtherTipNeoDTO;
+import com.diagbot.dto.OtherTipTransfusionNeoDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.process.OtherTipProcess;
 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;
 
 /**
@@ -63,6 +65,8 @@ public class OtherTipFacade {
         otherTipProcess.processLis(otherTipNeoDTOList, wordCrfDTO, res);
 
         // 其他提示——输血
+        List<OtherTipTransfusionNeoDTO> otherTipTransfusionNeoDTOList = new ArrayList<>();
+        // otherTipProcess.processTransfusion(otherTipTransfusionNeoDTOList, res);
 
         // 其他提示——辅检
     }

+ 1 - 0
src/main/java/com/diagbot/model/entity/PacsNew.java

@@ -16,4 +16,5 @@ public class PacsNew  {
     private String result;
     private List<Pacs> pacsResults; // 辅检提取的描述信息
     private List<Pacs> disease; // 辅检提取的诊断
+    private List<Pacs> matchRes; // 辅检匹配的结果
 }

+ 38 - 5
src/main/java/com/diagbot/process/OtherTipProcess.java

@@ -1,17 +1,21 @@
 package com.diagbot.process;
 
+import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.dto.BillMsg;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.NodeNeoDTO;
 import com.diagbot.dto.OtherTipNeoDTO;
+import com.diagbot.dto.OtherTipTransfusionNeoDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.enums.TypeEnum;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 其他提示总入口
@@ -56,15 +60,44 @@ public class OtherTipProcess {
         }
     }
 
-
     /**
      * 处理业务——输入
      *
-     * @param otherTipNeoDTOList
-     * @param wordCrfDTO
+     * @param otherTipTransfusionNeoDTOList
      * @param res
      */
-    public void processTransfusion(List<OtherTipNeoDTO> otherTipNeoDTOList, WordCrfDTO wordCrfDTO, IndicationDTO res) {
-        // TODO
+    public void processTransfusion(List<OtherTipTransfusionNeoDTO> otherTipTransfusionNeoDTOList, IndicationDTO res) {
+        for (OtherTipTransfusionNeoDTO bean : otherTipTransfusionNeoDTOList) {
+            StringBuffer sb = new StringBuffer();
+            if (ListUtil.isNotEmpty(bean.getDiag())) {
+                sb.append("诊断");
+                List<String> diag = bean.getDiag().stream().map(r -> r.getName()).collect(Collectors.toList());
+                sb.append(StringUtils.join(diag));
+            }
+            if (ListUtil.isNotEmpty(bean.getOperation())) {
+                List<String> operation = bean.getOperation().stream().map(r -> r.getName()).collect(Collectors.toList());
+                if (sb.toString().length() > 0) {
+                    sb.append(",");
+                }
+                sb.append(StringUtils.join(operation));
+            }
+            // if (ListUtil.isNotEmpty(bean.getPacsLabel().getPacsNewList())) {
+            //     List<PacsNew> pacsNewList = bean.getPacsLabel().getPacsNewList();
+            //     for (PacsNew pacsNew : pacsNewList) {
+            //         if (sb.toString().length() > 0) {
+            //             sb.append(",");
+            //         }
+            //         sb.append(pacsNew.getName() + StringUtils.join(pacsNew.getMatchRes()));
+            //     }
+            // }
+            if (ListUtil.isNotEmpty(bean.getLisList())) {
+                for (Lis lis : bean.getLisList()) {
+                    if (sb.toString().length() > 0) {
+                        sb.append(",");
+                    }
+                    sb.append(lis.getName() + lis.getDetailName() + lis.getOtherValue() + CoreUtil.getLisValue(lis));
+                }
+            }
+        }
     }
 }

+ 13 - 0
src/main/java/com/diagbot/util/CoreUtil.java

@@ -697,6 +697,19 @@ public class CoreUtil {
         }
     }
 
+    /**
+     * 返回化验的结果
+     *
+     * @param lis
+     * @return
+     */
+    public static String getLisValue(Lis lis) {
+        if (lis == null) {
+            return "";
+        }
+        return StringUtil.isNotBlank(lis.getOtherValue()) ? lis.getOtherValue() : lis.getValue().toString();
+    }
+
     /**
      * 输出调试信息
      *