瀏覽代碼

新疆沙雅中医知识库查询需求新增

wangsy 5 月之前
父節點
當前提交
07c48a5e1d

+ 9 - 1
src/main/java/com/diagbot/enums/LexiconEnum.java

@@ -84,7 +84,15 @@ public enum LexiconEnum implements KeyedNamed {
     LisClassNode(408,"实验室检查类别根节点"),
     PacsClassNode(409,"辅助检查类别根节点"),
     Age(410,"年龄"),
-    ClassicCase(411,"经典病例");
+    ClassicCase(411,"经典病例"),
+    KnowledgeCNTcmDisease(413,"中医知识中医疾病"),
+    KnowledgeCNPrescription(414,"中医知识方剂"),
+    KnowledgeCNRestoratives(415,"中医知识中药"),
+    KnowledgeCNPatent(416,"中医知识中成药"),
+    KnowledgeCNAncientBooks(417,"中医知识中医古籍"),
+    KnowledgeCNLiterature(418,"中医知识中医文献"),
+    KnowledgeCNControls(419,"中医知识中医操作"),
+    KnowledgeCNClinicalPathway(420,"中医知识中医临床路径");
 
 
     @Setter

+ 92 - 2
src/main/java/com/diagbot/facade/KlConceptStaticFacade.java

@@ -382,7 +382,15 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                     LexiconEnum.Scale.getKey(),
                     LexiconEnum.Nurse.getKey(),
                     LexiconEnum.Law.getKey(),
-                    LexiconEnum.ClassicCase.getKey()));
+                    LexiconEnum.ClassicCase.getKey(),
+                    LexiconEnum.KnowledgeCNTcmDisease.getKey(),
+                    LexiconEnum.KnowledgeCNPrescription.getKey(),
+                    LexiconEnum.KnowledgeCNRestoratives.getKey(),
+                    LexiconEnum.KnowledgeCNPatent.getKey(),
+                    LexiconEnum.KnowledgeCNAncientBooks.getKey(),
+                    LexiconEnum.KnowledgeCNLiterature.getKey(),
+                    LexiconEnum.KnowledgeCNControls.getKey(),
+                    LexiconEnum.KnowledgeCNClinicalPathway.getKey()));
         } else {
             if (types.contains(1)) {
                 staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.Disease.getKey());
@@ -413,14 +421,56 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
             if (types.contains(11)) {
                 staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.ClassicCase.getKey());
             }
+            if (types.contains(14)) {
+                staticKnowledgeIndexPageVO.getTypeIds().addAll(Arrays.asList(
+                        LexiconEnum.KnowledgeCNTcmDisease.getKey(),
+                        LexiconEnum.KnowledgeCNPrescription.getKey(),
+                        LexiconEnum.KnowledgeCNRestoratives.getKey(),
+                        LexiconEnum.KnowledgeCNPatent.getKey(),
+                        LexiconEnum.KnowledgeCNAncientBooks.getKey(),
+                        LexiconEnum.KnowledgeCNLiterature.getKey(),
+                        LexiconEnum.KnowledgeCNControls.getKey(),
+                        LexiconEnum.KnowledgeCNClinicalPathway.getKey()));
+            }
+            if (types.contains(15)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNTcmDisease.getKey());
+            }
+            if (types.contains(16)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNPrescription.getKey());
+            }
+            if (types.contains(17)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNRestoratives.getKey());
+            }
+            if (types.contains(18)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNPatent.getKey());
+            }
+            if (types.contains(19)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNAncientBooks.getKey());
+            }
+            if (types.contains(20)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNLiterature.getKey());
+            }
+            if (types.contains(21)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNControls.getKey());
+            }
+            if (types.contains(22)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.KnowledgeCNClinicalPathway.getKey());
+            }
         }
         if (ListUtil.isEmpty(staticKnowledgeIndexPageVO.getTypeIds())) {
-            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确的检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、7-手术和操作、8-量表、9-护理、10-政策法规");
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确的检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、7-手术和操作、8-量表、9-护理、10-政策法规、11-经典病例、15-中医疾病、16-方剂、17-中药、18-中成药、19-中医古籍、20-中医文献、21-中医操作、22-中医临床路径");
         }
         IPage<StaticKnowledgeIndexPageDTO> page = super.staticIndexPage(staticKnowledgeIndexPageVO);
 
         List<StaticKnowledgeIndexPageDTO> records = page.getRecords();
 
+        if (types.contains(17) && ListUtil.isEmpty(records)){
+            staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.Medicine.getKey());
+            staticKnowledgeIndexPageVO.setInputStr(staticKnowledgeIndexPageVO.getInputStr()+"(");
+            page = super.staticIndexPage(staticKnowledgeIndexPageVO);
+            records = page.getRecords();
+        }
+
         if (ListUtil.isEmpty(records)) {
             return page;
         }
@@ -740,6 +790,30 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                 case 12:
                     retType = LexiconEnum.Symptom.getKey();
                     break;
+                case 15:
+                    retType = LexiconEnum.KnowledgeCNTcmDisease.getKey();
+                    break;
+                case 16:
+                    retType = LexiconEnum.KnowledgeCNPrescription.getKey();
+                    break;
+                case 17:
+                    retType = LexiconEnum.KnowledgeCNRestoratives.getKey();
+                    break;
+                case 18:
+                    retType = LexiconEnum.KnowledgeCNPatent.getKey();
+                    break;
+                case 19:
+                    retType = LexiconEnum.KnowledgeCNAncientBooks.getKey();
+                    break;
+                case 20:
+                    retType = LexiconEnum.KnowledgeCNLiterature.getKey();
+                    break;
+                case 21:
+                    retType = LexiconEnum.KnowledgeCNControls.getKey();
+                    break;
+                case 22:
+                    retType = LexiconEnum.KnowledgeCNClinicalPathway.getKey();
+                    break;
                 default:
                     break;
             }
@@ -768,6 +842,22 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                 retType = 11;
             } else if (type.equals(LexiconEnum.Symptom.getKey())) {
                 retType = 12;
+            } else if (type.equals(LexiconEnum.KnowledgeCNTcmDisease.getKey())) {
+                retType = 15;
+            } else if (type.equals(LexiconEnum.KnowledgeCNPrescription.getKey())) {
+                retType = 16;
+            } else if (type.equals(LexiconEnum.KnowledgeCNRestoratives.getKey())) {
+                retType = 17;
+            } else if (type.equals(LexiconEnum.KnowledgeCNPatent.getKey())) {
+                retType = 18;
+            } else if (type.equals(LexiconEnum.KnowledgeCNAncientBooks.getKey())) {
+                retType = 19;
+            } else if (type.equals(LexiconEnum.KnowledgeCNLiterature.getKey())) {
+                retType = 20;
+            } else if (type.equals(LexiconEnum.KnowledgeCNControls.getKey())) {
+                retType = 21;
+            } else if (type.equals(LexiconEnum.KnowledgeCNClinicalPathway.getKey())) {
+                retType = 22;
             }
         }
         return retType;

+ 50 - 1
src/main/java/com/diagbot/facade/MedRetrievalFacade.java

@@ -257,7 +257,15 @@ public class MedRetrievalFacade {
                     LexiconEnum.Scale.getKey(),
                     LexiconEnum.Nurse.getKey(),
                     LexiconEnum.Law.getKey(),
-                    LexiconEnum.Symptom.getKey()));
+                    LexiconEnum.Symptom.getKey(),
+                    LexiconEnum.KnowledgeCNTcmDisease.getKey(),
+                    LexiconEnum.KnowledgeCNPrescription.getKey(),
+                    LexiconEnum.KnowledgeCNRestoratives.getKey(),
+                    LexiconEnum.KnowledgeCNPatent.getKey(),
+                    LexiconEnum.KnowledgeCNAncientBooks.getKey(),
+                    LexiconEnum.KnowledgeCNLiterature.getKey(),
+                    LexiconEnum.KnowledgeCNControls.getKey(),
+                    LexiconEnum.KnowledgeCNClinicalPathway.getKey()));
         } else {
             if (types.contains(1)) {
                 staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Disease.getKey());
@@ -288,10 +296,51 @@ public class MedRetrievalFacade {
             if (types.contains(12)) {
                 staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Symptom.getKey());
             }
+            if (types.contains(14)) {
+                staticKnowledgeIndexVO.getTypeIds().addAll(Arrays.asList(
+                        LexiconEnum.KnowledgeCNTcmDisease.getKey(),
+                        LexiconEnum.KnowledgeCNPrescription.getKey(),
+                        LexiconEnum.KnowledgeCNRestoratives.getKey(),
+                        LexiconEnum.KnowledgeCNPatent.getKey(),
+                        LexiconEnum.KnowledgeCNAncientBooks.getKey(),
+                        LexiconEnum.KnowledgeCNLiterature.getKey(),
+                        LexiconEnum.KnowledgeCNControls.getKey(),
+                        LexiconEnum.KnowledgeCNClinicalPathway.getKey()));
+            }
+            if (types.contains(15)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNTcmDisease.getKey());
+            }
+            if (types.contains(16)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNPrescription.getKey());
+            }
+            if (types.contains(17)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNRestoratives.getKey());
+            }
+            if (types.contains(18)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNPatent.getKey());
+            }
+            if (types.contains(19)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNAncientBooks.getKey());
+            }
+            if (types.contains(20)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNLiterature.getKey());
+            }
+            if (types.contains(21)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNControls.getKey());
+            }
+            if (types.contains(22)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.KnowledgeCNClinicalPathway.getKey());
+            }
         }
 
         List<StaticKnowledgeIndexDTO> retList = klConceptFacade.staticIndex(staticKnowledgeIndexVO);
 
+        if (types.contains(17) && ListUtil.isEmpty(retList)){
+            staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Medicine.getKey());
+            staticKnowledgeIndexVO.setInputStr(staticKnowledgeIndexVO.getInputStr()+"(");
+            retList = klConceptFacade.staticIndex(staticKnowledgeIndexVO);
+        }
+
         retList.forEach(i -> {
             //前端展示
             if (staticKnowledgeIndexVO.getHasInfo().equals(1)) {