|
@@ -1,38 +1,28 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.client.CdssCoreClient;
|
|
|
-import com.diagbot.dto.KlConceptStaticDTO;
|
|
|
-import com.diagbot.dto.RespDTO;
|
|
|
-import com.diagbot.dto.StaticKnowledgeDTO;
|
|
|
-import com.diagbot.dto.StaticKnowledgeHISDTO;
|
|
|
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
|
-import com.diagbot.dto.StaticKnowledgeIndexPageDTO;
|
|
|
+import com.diagbot.dto.*;
|
|
|
+import com.diagbot.entity.MappingConfig;
|
|
|
import com.diagbot.entity.SysUser;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
+import com.diagbot.service.MappingConfigService;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
-import com.diagbot.vo.ChangeStatusVO;
|
|
|
-import com.diagbot.vo.IdVO;
|
|
|
-import com.diagbot.vo.KlConceptStaticPageVO;
|
|
|
-import com.diagbot.vo.KlConceptStaticVO;
|
|
|
-import com.diagbot.vo.PushJoinVO;
|
|
|
-import com.diagbot.vo.ScaleStaticAllVO;
|
|
|
-import com.diagbot.vo.SearchData;
|
|
|
-import com.diagbot.vo.StaticKnowledgeHISVO;
|
|
|
-import com.diagbot.vo.StaticKnowledgeIndexPageVO;
|
|
|
-import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
|
-import com.diagbot.vo.StaticKnowledgeVO;
|
|
|
+import com.diagbot.vo.*;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import lombok.val;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -55,6 +45,9 @@ public class KlConceptStaticFacade {
|
|
|
MrFacade mrFacade;
|
|
|
@Autowired
|
|
|
private AssembleFacade assembleFacade;
|
|
|
+ @Autowired
|
|
|
+ private MappingConfigFacade mappingConfigFacade;
|
|
|
+ private MappingConfigService mappingConfigService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -65,10 +58,32 @@ public class KlConceptStaticFacade {
|
|
|
*/
|
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
|
+ List<ClassicCaseIndexDTO> cases = Lists.newLinkedList();
|
|
|
|
|
|
+ RespDTO<List<ClassicCaseIndexDTO>> caseDTO = cdssCoreClient.classicCaseIndex(staticKnowledgeIndexVO);
|
|
|
+ if(staticKnowledgeIndexVO.getTypes().contains(11))
|
|
|
+ staticKnowledgeIndexVO.getTypes().remove(staticKnowledgeIndexVO.getTypes().indexOf(11));
|
|
|
RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
+
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
retList = respDTO.data;
|
|
|
+ if (RespDTOUtil.respIsOK(caseDTO)) {
|
|
|
+ cases = caseDTO.data;
|
|
|
+ for (ClassicCaseIndexDTO classicCase : cases){
|
|
|
+ StaticKnowledgeIndexDTO dto = new StaticKnowledgeIndexDTO();
|
|
|
+ dto.setId(classicCase.getId());
|
|
|
+ dto.setName(classicCase.getName());
|
|
|
+ dto.setType(classicCase.getType());
|
|
|
+ dto.setTypeName(classicCase.getTypeName());
|
|
|
+ dto.setRetrievalName(classicCase.getRetrievalName());
|
|
|
+ dto.setHasInfo(classicCase.getHasInfo());
|
|
|
+ dto.setStatus(classicCase.getStatus());
|
|
|
+ dto.setCode(null);
|
|
|
+ dto.setGuocode(null);
|
|
|
+ dto.setGuoname(null);
|
|
|
+ retList.add(dto);
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
@@ -79,7 +94,6 @@ public class KlConceptStaticFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取静态知识
|
|
|
*
|
|
@@ -112,6 +126,38 @@ public class KlConceptStaticFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取经典病例
|
|
|
+ *
|
|
|
+ * @param staticKnowledgeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ClassicCaseDTO getClassicCaseInfo(StaticKnowledgeVO staticKnowledgeVO) {
|
|
|
+ ScaleStaticAllVO scaleStaticAllVO = new ScaleStaticAllVO();
|
|
|
+ if (staticKnowledgeVO.getType() == 8) {
|
|
|
+ PushJoinVO mr = mrFacade.getMr(staticKnowledgeVO.getMrId());
|
|
|
+ if (null != mr) {
|
|
|
+ SearchData searchData = new SearchData();
|
|
|
+ BeanUtil.copyProperties(mr, searchData);
|
|
|
+ //入参映射
|
|
|
+ searchData = assembleFacade.assembleData(searchData);
|
|
|
+ BeanUtil.copyProperties(searchData, scaleStaticAllVO);
|
|
|
+ } else {
|
|
|
+ scaleStaticAllVO.setHospitalId(-1L);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ scaleStaticAllVO.setHospitalId(-1L);
|
|
|
+ }
|
|
|
+ BeanUtil.copyProperties(staticKnowledgeVO, scaleStaticAllVO);
|
|
|
+ RespDTO<ClassicCaseDTO> respDTO = cdssCoreClient.getClassicCaseInfo(scaleStaticAllVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ ClassicCaseDTO classicCaseDTO = respDTO.data;
|
|
|
+ return classicCaseDTO;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 医院端获取静态知识(对接)
|
|
|
*
|
|
@@ -240,7 +286,6 @@ public class KlConceptStaticFacade {
|
|
|
}
|
|
|
return success;
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 启用禁用
|
|
|
*
|