|
@@ -1,11 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
-import com.diagbot.dto.IndexDTO;
|
|
|
-import com.diagbot.dto.LisDetailDTO;
|
|
|
-import com.diagbot.dto.RetrievalConceptDTO;
|
|
|
-import com.diagbot.dto.RetrievalDTO;
|
|
|
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
|
+import com.diagbot.dto.*;
|
|
|
import com.diagbot.enums.LexiconEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -37,6 +32,8 @@ public class MedRetrievalFacade {
|
|
|
private KlConceptFacade klConceptFacade;
|
|
|
@Autowired
|
|
|
private DictionaryFacade dictionaryFacade;
|
|
|
+ @Autowired
|
|
|
+ private KlDictionaryInfoFacade klDictionaryInfoFacade;
|
|
|
|
|
|
/**
|
|
|
* 检索
|
|
@@ -59,7 +56,7 @@ public class MedRetrievalFacade {
|
|
|
List<IndexDTO> indexList = Lists.newLinkedList();
|
|
|
|
|
|
/**
|
|
|
- * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径
|
|
|
+ * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径、17-物理治疗
|
|
|
*/
|
|
|
|
|
|
switch (retrievalVO.getType()) {
|
|
@@ -214,6 +211,14 @@ public class MedRetrievalFacade {
|
|
|
retrievalDTO.setNameList(BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class));
|
|
|
}
|
|
|
break;
|
|
|
+ case 17:
|
|
|
+ medRetrievalVO.setTypeId(LexiconEnum.Physicotherapy.getKey());
|
|
|
+ medRetrievalVO.getTypeIds().add(LexiconEnum.Physicotherapy.getKey());
|
|
|
+ indexList = klConceptFacade.index(medRetrievalVO);
|
|
|
+ if (ListUtil.isNotEmpty(indexList)) {
|
|
|
+ retrievalDTO.setNameList(BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class));
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
return retrievalDTO;
|
|
|
}
|
|
@@ -231,10 +236,13 @@ public class MedRetrievalFacade {
|
|
|
}
|
|
|
|
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
|
-
|
|
|
- List<DictionaryInfoDTO> dicType = dictionaryFacade.getListByGroupType(10);
|
|
|
+ List<DictionaryInfoDTO> dicType = klDictionaryInfoFacade.getListByGroupType(10);
|
|
|
Map<String, String> dicTypeMap = EntityUtil.makeMapWithKeyValue(dicType, "name", "val");
|
|
|
- List<DictionaryInfoDTO> dicTypeName = dictionaryFacade.getListByGroupType(13);
|
|
|
+ List<DictionaryInfoDTO> dicTypeName = klDictionaryInfoFacade.getListByGroupType(13);
|
|
|
+
|
|
|
+ List<DictionaryInfoDTO> dicType_back = dictionaryFacade.getListByGroupType(10);
|
|
|
+ Map<String, String> dicTypeMap_back = EntityUtil.makeMapWithKeyValue(dicType_back, "name", "val");
|
|
|
+ List<DictionaryInfoDTO> dicTypeName_back = dictionaryFacade.getListByGroupType(13);
|
|
|
|
|
|
//检索类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理
|
|
|
if (ListUtil.isEmpty(types)
|
|
@@ -281,9 +289,61 @@ public class MedRetrievalFacade {
|
|
|
List<StaticKnowledgeIndexDTO> retList = klConceptFacade.staticIndex(staticKnowledgeIndexVO);
|
|
|
|
|
|
retList.forEach(i -> {
|
|
|
- i.setTypeName(convertTypeName(i.getTypeName(), 2, dicTypeName));
|
|
|
- if (dicTypeMap.containsKey(i.getTypeName())) {
|
|
|
- i.setType(Integer.valueOf(dicTypeMap.get(i.getTypeName())));
|
|
|
+ //前端展示
|
|
|
+ if (staticKnowledgeIndexVO.getHasInfo().equals(1)) {
|
|
|
+ i.setTypeName(convertTypeName(i.getTypeName(), 2, dicTypeName));
|
|
|
+ if (dicTypeMap.containsKey(i.getTypeName())) {
|
|
|
+ i.setType(Integer.valueOf(dicTypeMap.get(i.getTypeName())));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ i.setTypeName(convertTypeName(i.getTypeName(), 2, dicTypeName_back));
|
|
|
+ if (dicTypeMap_back.containsKey(i.getTypeName())) {
|
|
|
+ i.setType(Integer.valueOf(dicTypeMap_back.get(i.getTypeName())));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 经典病例检索
|
|
|
+ *
|
|
|
+ * @param staticKnowledgeIndexVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<ClassicCaseIndexDTO> classicCaseIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
+ staticKnowledgeIndexVO.setTypeIds(new ArrayList<>());
|
|
|
+ if (staticKnowledgeIndexVO.getSize() == null) {
|
|
|
+ staticKnowledgeIndexVO.setSize(100);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
|
+
|
|
|
+ List<DictionaryInfoDTO> dicType = klDictionaryInfoFacade.getListByGroupType(10);
|
|
|
+ Map<String, String> dicTypeMap = EntityUtil.makeMapWithKeyValue(dicType, "name", "val");
|
|
|
+ List<DictionaryInfoDTO> dicTypeName = klDictionaryInfoFacade.getListByGroupType(13);
|
|
|
+
|
|
|
+ List<DictionaryInfoDTO> dicType_back = dictionaryFacade.getListByGroupType(10);
|
|
|
+ Map<String, String> dicTypeMap_back = EntityUtil.makeMapWithKeyValue(dicType_back, "name", "val");
|
|
|
+ List<DictionaryInfoDTO> dicTypeName_back = dictionaryFacade.getListByGroupType(13);
|
|
|
+
|
|
|
+ //类型检索
|
|
|
+ staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.ClassicCase.getKey());
|
|
|
+
|
|
|
+ List<ClassicCaseIndexDTO> retList = klConceptFacade.caseIndex(staticKnowledgeIndexVO);
|
|
|
+
|
|
|
+ retList.forEach(i -> {
|
|
|
+ //前端展示
|
|
|
+ if (staticKnowledgeIndexVO.getHasInfo().equals(1)) {
|
|
|
+ i.setTypeName(convertTypeName(i.getTypeName(), 2, dicTypeName));
|
|
|
+ if (dicTypeMap.containsKey(i.getTypeName())) {
|
|
|
+ i.setType(Integer.valueOf(dicTypeMap.get(i.getTypeName())));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ i.setTypeName(convertTypeName(i.getTypeName(), 2, dicTypeName_back));
|
|
|
+ if (dicTypeMap_back.containsKey(i.getTypeName())) {
|
|
|
+ i.setType(Integer.valueOf(dicTypeMap_back.get(i.getTypeName())));
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
return retList;
|