|
@@ -76,7 +76,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
|
|
if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
|
|
//typeName转换
|
|
//typeName转换
|
|
staticKnowledgeIndexDTOList.forEach(item -> {
|
|
staticKnowledgeIndexDTOList.forEach(item -> {
|
|
- item.setTypeName(convertTypeName(item.getTypeName()));
|
|
|
|
|
|
+ item.setTypeName(convertTypeName(item.getTypeName(), 2));
|
|
});
|
|
});
|
|
//是否有静态知识
|
|
//是否有静态知识
|
|
List<String> conNameList = staticKnowledgeIndexDTOList
|
|
List<String> conNameList = staticKnowledgeIndexDTOList
|
|
@@ -113,7 +113,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
for (ConceptDetail detail : detailMap.get(item.getId())) {
|
|
for (ConceptDetail detail : detailMap.get(item.getId())) {
|
|
- List<String> contentTypeList = Arrays.asList(detail.getConcentType().split(","));
|
|
|
|
|
|
+ List<String> contentTypeList = Arrays.asList(detail.getContentType().split(","));
|
|
if (contentTypeList.contains(1)) {
|
|
if (contentTypeList.contains(1)) {
|
|
item.setHasInfomation(1);
|
|
item.setHasInfomation(1);
|
|
}
|
|
}
|
|
@@ -131,7 +131,14 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
Map<String, List<StaticKnowledgeIndexDTO>> map
|
|
Map<String, List<StaticKnowledgeIndexDTO>> map
|
|
= EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
|
|
= EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
|
|
for (DictionaryInfoDTO dic : dicStaticIndexList) {
|
|
for (DictionaryInfoDTO dic : dicStaticIndexList) {
|
|
- if (map.containsKey(dic.getName())) {
|
|
|
|
|
|
+ if (dic.getName().equals("检验")) {
|
|
|
|
+ if (map.containsKey("检验套餐")) {
|
|
|
|
+ retList.addAll(map.get("检验套餐"));
|
|
|
|
+ }
|
|
|
|
+ if (map.containsKey("检验明细")) {
|
|
|
|
+ retList.addAll(map.get("检验明细"));
|
|
|
|
+ }
|
|
|
|
+ } else if (map.containsKey(dic.getName())) {
|
|
retList.addAll(map.get(dic.getName()));
|
|
retList.addAll(map.get(dic.getName()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -141,7 +148,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取静态知识
|
|
|
|
|
|
+ * 页面获取静态知识
|
|
*
|
|
*
|
|
* @param staticKnowledgeVO
|
|
* @param staticKnowledgeVO
|
|
* @return
|
|
* @return
|
|
@@ -149,7 +156,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
public StaticKnowledgeDTO getStaticKnowledge(StaticKnowledgeVO staticKnowledgeVO) {
|
|
public StaticKnowledgeDTO getStaticKnowledge(StaticKnowledgeVO staticKnowledgeVO) {
|
|
StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
String typeName = ConceptTypeEnum.getName(staticKnowledgeVO.getType());
|
|
String typeName = ConceptTypeEnum.getName(staticKnowledgeVO.getType());
|
|
- typeName = convertTypeName(typeName);
|
|
|
|
|
|
+ typeName = convertTypeName(typeName, 1);
|
|
|
|
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -172,34 +179,35 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
if (StringUtil.isNotBlank(sql)) {
|
|
if (StringUtil.isNotBlank(sql)) {
|
|
sql += " or ";
|
|
sql += " or ";
|
|
}
|
|
}
|
|
- sql = "find_in_set(" + contentType + ",position)";
|
|
|
|
|
|
+ sql += "find_in_set(" + contentType + ",content_type)";
|
|
}
|
|
}
|
|
sql = "(" + sql + ")";
|
|
sql = "(" + sql + ")";
|
|
conceptDetailQueryWrapper.apply(sql);
|
|
conceptDetailQueryWrapper.apply(sql);
|
|
}
|
|
}
|
|
|
|
+ conceptDetailQueryWrapper.orderByAsc("order_no");
|
|
List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
List<StaticKnowledgeDetailDTO> detailList
|
|
List<StaticKnowledgeDetailDTO> detailList
|
|
= BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
|
|
= BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
|
|
List<StaticKnowledgeDetailDTO> introduceList = detailList
|
|
List<StaticKnowledgeDetailDTO> introduceList = detailList
|
|
.stream()
|
|
.stream()
|
|
- .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(1))
|
|
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("1"))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
List<StaticKnowledgeDetailDTO> noticeList = detailList
|
|
List<StaticKnowledgeDetailDTO> noticeList = detailList
|
|
.stream()
|
|
.stream()
|
|
- .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(2))
|
|
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("2"))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
List<StaticKnowledgeDetailDTO> clinicalPathwayList = detailList
|
|
List<StaticKnowledgeDetailDTO> clinicalPathwayList = detailList
|
|
.stream()
|
|
.stream()
|
|
- .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(3))
|
|
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("3"))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
Map<String, List<StaticKnowledgeDetailDTO>> detailMap = new HashMap<>();
|
|
Map<String, List<StaticKnowledgeDetailDTO>> detailMap = new HashMap<>();
|
|
- if (ListUtil.isNotEmpty(introduceList)) {
|
|
|
|
|
|
+ if (ListUtil.isNotEmpty(introduceList) && staticKnowledgeVO.getContentTypes().contains(1)) {
|
|
detailMap.put("静态知识", introduceList);
|
|
detailMap.put("静态知识", introduceList);
|
|
}
|
|
}
|
|
- if (ListUtil.isNotEmpty(noticeList)) {
|
|
|
|
|
|
+ if (ListUtil.isNotEmpty(noticeList) && staticKnowledgeVO.getContentTypes().contains(2)) {
|
|
detailMap.put("注意事项", noticeList);
|
|
detailMap.put("注意事项", noticeList);
|
|
}
|
|
}
|
|
- if (ListUtil.isNotEmpty(clinicalPathwayList)) {
|
|
|
|
|
|
+ if (ListUtil.isNotEmpty(clinicalPathwayList) && staticKnowledgeVO.getContentTypes().contains(3)) {
|
|
detailMap.put("临床路径", clinicalPathwayList);
|
|
detailMap.put("临床路径", clinicalPathwayList);
|
|
}
|
|
}
|
|
staticKnowledgeDTO.setDetails(detailMap);
|
|
staticKnowledgeDTO.setDetails(detailMap);
|
|
@@ -215,28 +223,95 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
public List<StaticKnowledgeDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
|
|
public List<StaticKnowledgeDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
|
|
|
|
|
|
List<StaticKnowledgeDTO> retList = Lists.newArrayList();
|
|
List<StaticKnowledgeDTO> retList = Lists.newArrayList();
|
|
- StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
|
|
|
|
+ //StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
String typeName = ConceptTypeEnum.getName(staticKnowledgeHISVO.getType());
|
|
String typeName = ConceptTypeEnum.getName(staticKnowledgeHISVO.getType());
|
|
- typeName = convertTypeName(typeName);
|
|
|
|
|
|
+ typeName = convertTypeName(typeName, 1);
|
|
|
|
|
|
//术语映射
|
|
//术语映射
|
|
List<String> uniqueNameList = getUniqueNames(staticKnowledgeHISVO);
|
|
List<String> uniqueNameList = getUniqueNames(staticKnowledgeHISVO);
|
|
|
|
+ if (ListUtil.isEmpty(uniqueNameList)) {
|
|
|
|
+ return retList;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .in("name", uniqueNameList)
|
|
|
|
+ .eq("type", typeName);
|
|
|
|
+ List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
|
|
|
- return null;
|
|
|
|
|
|
+ if (ListUtil.isEmpty(conceptInfoList)) {
|
|
|
|
+ return retList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ retList = BeanUtil.listCopyTo(conceptInfoList, StaticKnowledgeDTO.class);
|
|
|
|
+ List<Long> conceptIdList = conceptInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
|
+ QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .in("concept_id", conceptIdList);
|
|
|
|
+ if (ListUtil.isNotEmpty(staticKnowledgeHISVO.getContentTypes())) {
|
|
|
|
+ String sql = "";
|
|
|
|
+ for (Integer contentType : staticKnowledgeHISVO.getContentTypes()) {
|
|
|
|
+ if (StringUtil.isNotBlank(sql)) {
|
|
|
|
+ sql += " or ";
|
|
|
|
+ }
|
|
|
|
+ sql += "find_in_set(" + contentType + ",content_type)";
|
|
|
|
+ }
|
|
|
|
+ sql = "(" + sql + ")";
|
|
|
|
+ conceptDetailQueryWrapper.apply(sql);
|
|
|
|
+ }
|
|
|
|
+ conceptDetailQueryWrapper.orderByAsc("concept_id", "order_no");
|
|
|
|
+ List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
|
|
+ List<StaticKnowledgeDetailDTO> detailList
|
|
|
|
+ = BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
|
|
|
|
+ Map<Long, List<StaticKnowledgeDetailDTO>> conceptMap
|
|
|
|
+ = EntityUtil.makeEntityListMap(detailList, "conceptId");
|
|
|
|
+ for (StaticKnowledgeDTO staticKnowledgeDTO : retList) {
|
|
|
|
+ List<StaticKnowledgeDetailDTO> subDetailList = conceptMap.get(staticKnowledgeDTO.getId());
|
|
|
|
+ if (ListUtil.isNotEmpty(subDetailList)) {
|
|
|
|
+ List<StaticKnowledgeDetailDTO> introduceList = subDetailList
|
|
|
|
+ .stream()
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("1"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<StaticKnowledgeDetailDTO> noticeList = subDetailList
|
|
|
|
+ .stream()
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("2"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<StaticKnowledgeDetailDTO> clinicalPathwayList = subDetailList
|
|
|
|
+ .stream()
|
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("3"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ Map<String, List<StaticKnowledgeDetailDTO>> subDetailMap = new HashMap<>();
|
|
|
|
+ if (ListUtil.isNotEmpty(introduceList) && staticKnowledgeHISVO.getContentTypes().contains(1)) {
|
|
|
|
+ subDetailMap.put("静态知识", introduceList);
|
|
|
|
+ }
|
|
|
|
+ if (ListUtil.isNotEmpty(noticeList) && staticKnowledgeHISVO.getContentTypes().contains(2)) {
|
|
|
|
+ subDetailMap.put("注意事项", noticeList);
|
|
|
|
+ }
|
|
|
|
+ if (ListUtil.isNotEmpty(clinicalPathwayList) && staticKnowledgeHISVO.getContentTypes().contains(3)) {
|
|
|
|
+ subDetailMap.put("临床路径", clinicalPathwayList);
|
|
|
|
+ }
|
|
|
|
+ staticKnowledgeDTO.setDetails(subDetailMap);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return retList;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 页面术语类型转图谱标签名称
|
|
|
|
|
|
+ * 页面术语类型和图谱标签名称相互转换
|
|
*
|
|
*
|
|
* @param typeName
|
|
* @param typeName
|
|
|
|
+ * @param flag 1-页面术语类型转图谱标签名称,2- 图谱标签名称转页面术语类型
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public String convertTypeName(String typeName) {
|
|
|
|
|
|
+ public String convertTypeName(String typeName, Integer flag) {
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
if (ListUtil.isNotEmpty(dicList)) {
|
|
if (ListUtil.isNotEmpty(dicList)) {
|
|
- Map<String, String> nameValMap
|
|
|
|
- = EntityUtil.makeMapWithKeyValue(dicList, "name", "val");
|
|
|
|
|
|
+ Map<String, String> nameValMap = new HashMap<>();
|
|
|
|
+ if (flag.equals(1)) {
|
|
|
|
+ nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "name", "val");
|
|
|
|
+ } else if (flag.equals(2)) {
|
|
|
|
+ nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "val", "name");
|
|
|
|
+ }
|
|
if (nameValMap.containsKey(typeName)) {
|
|
if (nameValMap.containsKey(typeName)) {
|
|
return nameValMap.get(typeName);
|
|
return nameValMap.get(typeName);
|
|
}
|
|
}
|
|
@@ -276,7 +351,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
if (lisConfigMap != null) {
|
|
if (lisConfigMap != null) {
|
|
if (StringUtil.isBlank(staticKnowledgeHISVO.getHisDetailName())) {
|
|
if (StringUtil.isBlank(staticKnowledgeHISVO.getHisDetailName())) {
|
|
staticKnowledgeHISVO.setHisDetailName("");
|
|
staticKnowledgeHISVO.setHisDetailName("");
|
|
- if (lisConfigMap.containsKey(staticKnowledgeHISVO.getHospitalId())) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (lisConfigMap.containsKey(staticKnowledgeHISVO.getHisName())) {
|
|
|
|
+ if (lisConfigMap.get(staticKnowledgeHISVO.getHisName()).containsKey(staticKnowledgeHISVO.getHisDetailName())) {
|
|
nameList = new ArrayList<>(lisConfigMap.get(staticKnowledgeHISVO.getHisName())
|
|
nameList = new ArrayList<>(lisConfigMap.get(staticKnowledgeHISVO.getHisName())
|
|
.get(staticKnowledgeHISVO.getHisDetailName()).keySet());
|
|
.get(staticKnowledgeHISVO.getHisDetailName()).keySet());
|
|
}
|
|
}
|