Browse Source

一般治疗取选中诊断

kongwz 4 years ago
parent
commit
88d29f9ed9

+ 5 - 0
src/main/java/com/diagbot/dto/WordCrfDTO.java

@@ -57,6 +57,10 @@ public class WordCrfDTO {
     private DiagLabel diagLabel = new DiagLabel();
 
     /*******************************************入参数据拷贝开始******************************/
+    /**
+     * 选中诊断
+     */
+    private Item diseaseName;
      // 诊断
     private List<Item> diag = new ArrayList<>();
     // 当前化验开单项
@@ -76,4 +80,5 @@ public class WordCrfDTO {
     // private LisLabel lisLabel;
     // 辅检
     private PacsLabel pacsLabel = new PacsLabel();
+
 }

+ 8 - 0
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -46,6 +46,7 @@ public class CommonFacade {
         wordCrfDTO.setHospitalId(searchData.getHospitalId());
         wordCrfDTO.setAge(searchData.getAge());
         wordCrfDTO.setSex(searchData.getSex());
+        wordCrfDTO.setDiseaseName(searchData.getDiseaseName());
         if (ListUtil.isNotEmpty(searchData.getLis())) {
             wordCrfDTO.setLis(searchData.getLis());
         }
@@ -106,6 +107,10 @@ public class CommonFacade {
         //传的诊断
         diagList.addAll(wordCrfDTO.getDiag().stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
                 .map(x -> x.getName()).collect(Collectors.toList()));
+        //选中的诊断
+        if(wordCrfDTO.getDiseaseName() != null && StringUtils.isBlank(wordCrfDTO.getDiseaseName().getUniqueName())){
+            diagList.add(wordCrfDTO.getDiseaseName().getName());
+        }
         standConvert.setDiaglList(diagList);
 
         //所有化验(结构化数据)
@@ -193,6 +198,7 @@ public class CommonFacade {
         CoreUtil.setPropertyList(diagLabel.getDiags(), map.get(StandConvertEnum.disease.getName()));
         CoreUtil.setPropertyList(wordCrfDTO.getDiagOrder(),"name", "uniqueName", map.get(StandConvertEnum.disease.getName()));
         CoreUtil.setPropertyList(wordCrfDTO.getDiag(),"name", "uniqueName", map.get(StandConvertEnum.disease.getName()));
+        CoreUtil.setPropertyList(wordCrfDTO.getDiseaseName(),"name", "uniqueName", map.get(StandConvertEnum.disease.getName()));
         //药品回填
         CoreUtil.setPropertyList(presentLabel.getMedicines(), map.get(StandConvertEnum.drug.getName()));
         CoreUtil.setPropertyList(presentLabel.getTakeMedicine(), map.get(StandConvertEnum.drug.getName()));
@@ -223,12 +229,14 @@ public class CommonFacade {
         ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
         PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
         List<Item> diags = wordCrfDTO.getDiag();
+        Item diseaseName = wordCrfDTO.getDiseaseName();
         PastLabel pastLabel = wordCrfDTO.getPastLabel();
         List<Lis> lis = wordCrfDTO.getLis();
 //        List<Pacs> pacs = wordCrfDTO.getPacs();
         List<PacsNew> pacsNewList = wordCrfDTO.getPacsLabel().getPacsNewList();
         pushVO.setAge(wordCrfDTO.getAge());
         pushVO.setSex(wordCrfDTO.getSex());
+        pushVO.setDiaeaseName(diseaseName);
         if (chiefLabel != null) {
             List<Symptom> cjiefClinicals = chiefLabel.getClinicals().stream().filter(x -> x.getNegative() == null).map(z ->
             {

+ 7 - 7
src/main/java/com/diagbot/process/PushProcess.java

@@ -186,13 +186,13 @@ public class PushProcess {
                     pushDTO.setDis(dis);
                 }
             }
-            if (ruleTypeList.contains("10") && ListUtil.isNotEmpty(diags)) {
-                List<TreatDTO> collect = diags.stream().map(x -> {
-                    TreatDTO treatDTO = new TreatDTO();
-                    treatDTO.setName(x.getName());
-                    treatDTO.setUniqueName(x.getUniqueName());
-                    return treatDTO;
-                }).collect(Collectors.toList());
+            if (ruleTypeList.contains("10") && pushVO.getDiaeaseName() != null) {
+                List<TreatDTO> collect = new ArrayList<>();
+                Item diaeaseName = pushVO.getDiaeaseName();
+                TreatDTO treatDTO = new TreatDTO();
+                treatDTO.setName(diaeaseName.getName());
+                treatDTO.setUniqueName(diaeaseName.getUniqueName());
+                collect.add(treatDTO);
                 pushDTO.setTreat(collect);
             }
         }

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

@@ -95,6 +95,18 @@ public class CoreUtil {
         return res;
     }
 
+    public static <T> void  setPropertyList(T list, String propertyName, String standName, Map<String, String> map) {
+        if(list == null){
+            return;
+        }
+        try {
+            setFieldValue(list, propertyName, standName, map);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
     /**
      * 将列表中属性对应的值从map中获取,如果有值,将standName替换
      *

+ 3 - 0
src/main/java/com/diagbot/vo/NeoPushVO.java

@@ -1,5 +1,6 @@
 package com.diagbot.vo;
 
+import com.diagbot.biz.push.entity.Item;
 import com.diagbot.vo.neoPushEntity.*;
 import lombok.Data;
 
@@ -14,6 +15,8 @@ public class NeoPushVO {
     private Integer age;
     // 性别(1:男,2:女)
     private Integer sex;
+    //选中的诊断
+    private Item diaeaseName;
     private DiagVo diagVo;//下的诊断
     private ChiefPushVo chiefPushVo;//主诉
     private PresentPushVo presentPushVo;//现病史