Pārlūkot izejas kodu

辅检结构调整

zhoutg 4 gadi atpakaļ
vecāks
revīzija
cde4495b04
1 mainītis faili ar 41 papildinājumiem un 5 dzēšanām
  1. 41 5
      src/main/java/com/diagbot/facade/CommonFacade.java

+ 41 - 5
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -6,6 +6,8 @@ import com.diagbot.client.CRFServiceClient;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.enums.StandConvertEnum;
 import com.diagbot.model.ai.AIAnalyze;
+import com.diagbot.model.entity.BodyPart;
+import com.diagbot.model.entity.Pacs;
 import com.diagbot.model.label.ChiefLabel;
 import com.diagbot.model.label.DiagLabel;
 import com.diagbot.model.label.PacsLabel;
@@ -381,7 +383,45 @@ public class CommonFacade {
         }
         wordCrfDTO.getLis().addAll(lisList);
 
-        //处理辅检 TODO 辅检
+        // 处理辅检信息,将现病史和结构化辅检统一放到pacsLable中
+        PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
+        List<Item> pacsResList = pacsLabel.getRes();
+        PacsLabel pacsPresentLabel = wordCrfDTO.getPresentLabel().getPacsLabel();
+        if (presentLabel != null) {
+            // 添加辅检项目名称
+            if (ListUtil.isNotEmpty(pacsPresentLabel.getItem())) {
+                pacsLabel.getItem().addAll(pacsPresentLabel.getItem());
+            }
+            // 添加辅检的诊断
+            if (ListUtil.isNotEmpty(pacsPresentLabel.getDisease())) {
+                pacsLabel.getDisease().addAll(pacsPresentLabel.getDisease());
+                for (Pacs pacs : pacsPresentLabel.getDisease()) {
+                    Item item = new Item();
+                    item.setName(pacs.getName());
+                    item.setUniqueName(pacs.getStandName());
+                    pacsResList.add(item);
+                }
+            }
+            // 添加辅检的描述
+            if (ListUtil.isNotEmpty(pacsPresentLabel.getPacsResults())) {
+                pacsLabel.getPacsResults().addAll(pacsPresentLabel.getPacsResults());
+                for (Pacs pacs : pacsPresentLabel.getPacsResults()) {
+                    Item item = new Item();
+                    item.setName(pacs.getName());
+                    item.setUniqueName(pacs.getStandName());
+                    pacsResList.add(item);
+                    // 部位 + 描述循环放入
+                    for (BodyPart bodyPart : pacs.getBodyPartList()) {
+                        Item itemPart = new Item();
+                        itemPart.setName(bodyPart.getName() + pacs.getName());
+                        itemPart.setUniqueName(bodyPart.getStandName() + pacs.getStandName());
+                        pacsResList.add(itemPart);
+                    }
+                }
+            }
+        }
+
+        //处理辅检
         // List<com.diagbot.biz.push.entity.Pacs> pacs = new ArrayList<>();
         // List<PacsNew> packagePacs = new ArrayList<>();
         // List<PacsNew> pacsNewList = wordCrfDTO.getPresentLabel().getPacsNewList();
@@ -433,10 +473,6 @@ public class CommonFacade {
         // if(ListUtil.isNotEmpty(pacs)){
         //     wordCrfDTO.getPacs().addAll(pacs);
         // }
-
-
-        PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
-        // TODO 辅检
         // pacsLabel.getPacsNewList().addAll(packagePacs);
     }