Browse Source

Merge remote-tracking branch 'origin/master'

zhoutg 4 years ago
parent
commit
c026e5e9ef

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

@@ -36,6 +36,8 @@ public class WordCrfDTO {
     private Double ageNum;
     // 性别(1:男,2:女)
     private Integer sex;
+    //科室
+    private List<Item> dept = new ArrayList<>();
     // 化验项目和结果
     private List<Lis> lis = new ArrayList<>();
     // 辅检项目和结果

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

@@ -17,4 +17,5 @@ public class DiseaseProperty {
     private String sex;
     private String age;
     private String fbl;
+    private String dept;
 }

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

@@ -61,6 +61,7 @@ public class CommonFacade {
         }
         wordCrfDTO.setAge(searchData.getAge());
         wordCrfDTO.setSex(searchData.getSex());
+        wordCrfDTO.setDept(searchData.getDept());
         if (searchData.getDiseaseName() != null && StringUtils.isNotBlank(searchData.getDiseaseName().getName())) {
             wordCrfDTO.setDiseaseName(searchData.getDiseaseName());
         }
@@ -296,6 +297,11 @@ public class CommonFacade {
         pushVO.setSex(wordCrfDTO.getSex());
         pushVO.setAgeNum(wordCrfDTO.getAgeNum());
         pushVO.setDiaeaseName(diseaseName);
+        List<Item> depts = wordCrfDTO.getDept();
+        if(ListUtil.isNotEmpty(depts)){
+            List<String> collect = depts.stream().map(x -> x.getUniqueName()).collect(Collectors.toList());
+            pushVO.setDept(collect);
+        }
         if (chiefLabel != null) {
             ChiefPushVo chiefPushVo = new ChiefPushVo();
             if (ListUtil.isNotEmpty(chiefLabel.getClinicals())) {

+ 2 - 0
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -177,6 +177,7 @@ public class NeoFacade {
                         desc.put("sex", v.getSex());
                         desc.put("age", v.getAge());
                         desc.put("fbl", v.getFbl());
+                        desc.put("dept", v.getDept());
                         return desc;
                     },
                     (v1, v2) -> (v2)
@@ -279,6 +280,7 @@ public class NeoFacade {
     public List<String> getPush(NeoPushVO pushVO) {
         Double age = pushVO.getAgeNum();
         Integer sex = pushVO.getSex();
+        List<String> depts = pushVO.getDept();
         List<String> presentDiags = Lists.newArrayList();
         PresentPushVo presentPushVo = pushVO.getPresentPushVo();
         ChiefPushVo chiefPushVo = pushVO.getChiefPushVo();

+ 6 - 1
src/main/java/com/diagbot/repository/BaseNodeRepository.java

@@ -96,7 +96,12 @@ public interface BaseNodeRepository extends Neo4jRepository<BaseNode, Long> {
             "case\n" +
             "when d.fbl is not null then d.fbl\n" +
             "else '0'\n" +
-            "end as fbl")
+            "end as fbl,\n"+
+            "case\n" +
+            "when d.dept is not null then d.dept\n" +
+            "else '医学全科'\n" +
+            "end as dept"
+    )
     List<DiseaseProperty> getDiseaseProperty();
 
     @Query("match(d:医保疾病名称{name:{dis}})-[r]->(j) return type(r) as tp,collect(distinct j.name) as col")

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

@@ -4,6 +4,8 @@ import com.diagbot.biz.push.entity.Item;
 import com.diagbot.vo.neoPushEntity.*;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @Description: 图谱推理入参
  * @Author:zhoutg
@@ -18,6 +20,7 @@ public class NeoPushVO {
     private Double ageNum;
     // 性别(1:男,2:女)
     private Integer sex;
+    private List<String> dept;
     //选中的诊断
     private Item diaeaseName;
     private DiagVo diagVo;//下的诊断