Browse Source

静态知识增加治疗方案类型

zhaops 4 years ago
parent
commit
c86938b2bb

+ 9 - 1
cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java

@@ -34,7 +34,11 @@ public class StaticKnowledgeIndexDTO {
     /**
      * 是否有静态知识
      */
-    private Integer hasInfomation = 0;
+    private Integer hasInfo = 0;
+    /**
+     * 是否有基本静态知识
+     */
+    private Integer hasStaticKnowledge = 0;
     /**
      * 是否有临床路径
      */
@@ -43,4 +47,8 @@ public class StaticKnowledgeIndexDTO {
      * 是否有注意事项
      */
     private Integer hasNotice = 0;
+    /**
+     * 是否有治疗方案静态知识
+     */
+    private Integer hasTreatInfo = 0;
 }

+ 9 - 5
cdssman-service/src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -68,9 +68,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
         //过滤没有静态知识的检索结果
         staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
                 .stream()
-                .filter(i -> i.getHasInfomation().equals(0)
-                        && i.getHasNotice().equals(0)
-                        && i.getHasClinicalPathway().equals(0))
+                .filter(i -> i.getHasInfo().equals(0))
                 .collect(Collectors.toList());
         return staticKnowledgeIndexDTOList;
     }
@@ -131,15 +129,18 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                     for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
                         if (item.getId() == null
                                 || !detailMap.containsKey(item.getId())) {
-                            item.setHasInfomation(0);
+                            item.setHasInfo(0);
+                            item.setHasStaticKnowledge(0);
                             item.setHasClinicalPathway(0);
                             item.setHasNotice((0));
+                            item.setHasTreatInfo(0);
                             continue;
                         }
                         for (ConceptDetail detail : detailMap.get(item.getId())) {
+                            item.setHasInfo(1);
                             List<String> contentTypeList = Arrays.asList(detail.getContentType().split(","));
                             if (contentTypeList.contains("1")) {
-                                item.setHasInfomation(1);
+                                item.setHasStaticKnowledge(1);
                             }
                             if (contentTypeList.contains("2")) {
                                 item.setHasNotice(1);
@@ -147,6 +148,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                             if (contentTypeList.contains("3")) {
                                 item.setHasClinicalPathway(1);
                             }
+                            if (conceptDetailList.contains("4")) {
+                                item.setHasTreatInfo(1);
+                            }
                         }
                     }
                 }