|
@@ -1,6 +1,8 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.diagbot.dto.*;
|
|
|
+import com.diagbot.entity.KlConcept;
|
|
|
+import com.diagbot.entity.KlDisease;
|
|
|
import com.diagbot.enums.LexiconEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -20,6 +22,7 @@ import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -34,6 +37,8 @@ public class MedRetrievalFacade {
|
|
|
private DictionaryFacade dictionaryFacade;
|
|
|
@Autowired
|
|
|
private KlDictionaryInfoFacade klDictionaryInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ private KlDiseaseFacade klDiseaseFacade;
|
|
|
|
|
|
/**
|
|
|
* 检索
|
|
@@ -309,6 +314,65 @@ public class MedRetrievalFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 收藏医学知识(静态信息)检索
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<StaticKnowledgeIndexDTO> CollectionStaticKnowledgeIndex() {
|
|
|
+
|
|
|
+ List<StaticKnowledgeIndexDTO> retList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<KlConcept> list = klConceptFacade.lambdaQuery()
|
|
|
+ .eq(KlConcept::getCollectionStatus, 1)//查询已收藏的医学知识(静态信息)
|
|
|
+ .ne(KlConcept::getLibType, 411)//排除掉经典病例
|
|
|
+ .list();
|
|
|
+ for (KlConcept klConcept : list) {
|
|
|
+ StaticKnowledgeIndexDTO dto = new StaticKnowledgeIndexDTO();
|
|
|
+ KlDisease klDisease = klDiseaseFacade.lambdaQuery()
|
|
|
+ .eq(KlDisease::getConceptId, klConcept.getId())
|
|
|
+ .one();
|
|
|
+ dto.setId(klConcept.getId());
|
|
|
+ dto.setName(klConcept.getLibName());
|
|
|
+ dto.setCode(klDisease.getIcd10Code());
|
|
|
+ dto.setStatus(1);//已收藏,必然启用
|
|
|
+ dto.setCollectionStatus(1);//已收藏
|
|
|
+ switch(klConcept.getLibType()){
|
|
|
+ case 100:
|
|
|
+ dto.setType(1);
|
|
|
+ dto.setTypeName("诊断");
|
|
|
+ case 101:
|
|
|
+ dto.setType(2);
|
|
|
+ dto.setTypeName("药品");
|
|
|
+ case 107:
|
|
|
+ dto.setType(3);
|
|
|
+ dto.setTypeName("检验套餐");
|
|
|
+ case 108:
|
|
|
+ dto.setType(4);
|
|
|
+ dto.setTypeName("检验细项");
|
|
|
+ case 109:
|
|
|
+ dto.setType(5);
|
|
|
+ dto.setTypeName("检查");
|
|
|
+ case 106:
|
|
|
+ dto.setType(7);
|
|
|
+ dto.setTypeName("手术和操作");
|
|
|
+ case 124:
|
|
|
+ dto.setType(8);
|
|
|
+ dto.setTypeName("量表/医学计算公式");
|
|
|
+ case 123:
|
|
|
+ dto.setType(9);
|
|
|
+ dto.setTypeName("护理");
|
|
|
+ case 130:
|
|
|
+ dto.setType(1);
|
|
|
+ dto.setTypeName("政策法规");
|
|
|
+ }
|
|
|
+ retList.add(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 经典病历检索
|
|
|
*
|
|
@@ -353,6 +417,35 @@ public class MedRetrievalFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 收藏经典病历检索
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<ClassicCaseIndexDTO> collectionClassicCaseIndex() {
|
|
|
+
|
|
|
+ List<ClassicCaseIndexDTO> retList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<KlConcept> list = klConceptFacade.lambdaQuery()
|
|
|
+ .eq(KlConcept::getCollectionStatus, 1)//查询已收藏
|
|
|
+ .eq(KlConcept::getLibType, 411)//经典病例
|
|
|
+ .list();
|
|
|
+ for (KlConcept klConcept : list) {
|
|
|
+ ClassicCaseIndexDTO dto = new ClassicCaseIndexDTO();
|
|
|
+ dto.setId(klConcept.getId());
|
|
|
+ dto.setName(klConcept.getLibName());
|
|
|
+ dto.setStatus(1);//已收藏,必然启用
|
|
|
+ dto.setCollectionStatus(1);//已收藏
|
|
|
+ dto.setType(11);
|
|
|
+ dto.setTypeName("经典病例");
|
|
|
+
|
|
|
+ retList.add(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 页面显示词性和标准词性转换
|
|
|
*
|