|
@@ -8,7 +8,6 @@ import com.diagbot.dto.QuestionDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.ModuleDetail;
|
|
|
import com.diagbot.entity.ModuleInfo;
|
|
|
-import com.diagbot.entity.QuestionInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.QuestionTypeEnum;
|
|
|
import com.diagbot.service.impl.ModuleInfoServiceImpl;
|
|
@@ -55,7 +54,6 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
//取到所有模板信息
|
|
|
List<ModuleInfo> list = new ArrayList<>();
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
- List<Long> lisConceptIds = new ArrayList<>();//化验名称列表
|
|
|
List<Long> pacsConceptIds = new ArrayList<>();//辅检名称列表
|
|
|
Boolean isDefault = false;
|
|
|
if (moduleVO.getMouduleType().intValue() == 1) {
|
|
@@ -108,9 +106,7 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
if (moduleDetailMap.get(bean.getId()) != null) {
|
|
|
moduleDetailDTOList = BeanUtil.listCopyTo(moduleDetailMap.get(bean.getId()), ModuleDetailDTO.class);
|
|
|
for (ModuleDetailDTO detailDTO : moduleDetailDTOList) {
|
|
|
- if(Integer.parseInt(bean.getType()) == 5){
|
|
|
- lisConceptIds.add(detailDTO.getQuestionId());
|
|
|
- }else if(Integer.parseInt(bean.getType()) == 6){
|
|
|
+ if(Integer.parseInt(bean.getType()) == 6){
|
|
|
pacsConceptIds.add(detailDTO.getQuestionId());
|
|
|
}else if (null != detailDTO.getQuestionId()) {
|
|
|
QuestionVO questionVO = new QuestionVO();
|
|
@@ -127,16 +123,7 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
bean.setModuleDetailDTOList(moduleDetailDTOList);
|
|
|
}
|
|
|
}
|
|
|
- RespDTO<Map<Long,String>> lisRespDTO = null;
|
|
|
RespDTO<Map<Long,String>> pacsRespDTO = null;
|
|
|
- List<String> lisNameList = new ArrayList<>();
|
|
|
- //化验
|
|
|
- if(ListUtil.isNotEmpty(lisConceptIds)){
|
|
|
- conceptSearchVO = new ConceptSearchVO();
|
|
|
- conceptSearchVO.setConceptIds(lisConceptIds);
|
|
|
- lisRespDTO = aiptServiceClient.getConceptMap(conceptSearchVO);
|
|
|
- RespDTOUtil.respNGDeal(lisRespDTO,"获取化验标签失败");
|
|
|
- }
|
|
|
//辅检
|
|
|
if(ListUtil.isNotEmpty(pacsConceptIds)){
|
|
|
conceptSearchVO = new ConceptSearchVO();
|
|
@@ -144,45 +131,17 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
pacsRespDTO = aiptServiceClient.getConceptMap(conceptSearchVO);
|
|
|
RespDTOUtil.respNGDeal(pacsRespDTO,"获取辅检标签失败");
|
|
|
}
|
|
|
- if(ListUtil.isNotEmpty(lisConceptIds) || ListUtil.isNotEmpty(pacsConceptIds)){//如果存在化验辅检相关信息添加数据返回
|
|
|
- //将化验辅检标签放入出参
|
|
|
+ if(ListUtil.isNotEmpty(pacsConceptIds)){//如果存在辅检相关信息添加数据返回
|
|
|
+ //将辅检标签放入出参
|
|
|
for (ModuleInfoDTO bean : data) {
|
|
|
if (moduleDetailMap.get(bean.getId()) != null) {
|
|
|
for (ModuleDetailDTO detailDTO : moduleDetailDTOList) {
|
|
|
- if (Integer.parseInt(bean.getType()) == QuestionTypeEnum.Lis.getKey() && lisRespDTO.data != null) {
|
|
|
- detailDTO.setName(lisRespDTO.data.get(detailDTO.getQuestionId()));
|
|
|
- lisNameList.add(lisRespDTO.data.get(detailDTO.getQuestionId()));
|
|
|
- }
|
|
|
if (Integer.parseInt(bean.getType()) == QuestionTypeEnum.Pacs.getKey() && pacsRespDTO.data != null) {
|
|
|
detailDTO.setName(pacsRespDTO.data.get(detailDTO.getQuestionId()));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //获取化验标签questionInfo
|
|
|
- QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
- questionInfoQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
- .eq("type",QuestionTypeEnum.Lis.getKey())
|
|
|
- .in("tag_name",lisNameList);
|
|
|
- Map<String,QuestionInfo> questionInfoMap = questionFacade.list(questionInfoQueryWrapper).stream().collect(Collectors.toMap(QuestionInfo::getTagName,questionInfo -> questionInfo));
|
|
|
- //将化验的填写单类型放入
|
|
|
- for (ModuleInfoDTO bean : data) {
|
|
|
- if (moduleDetailMap.get(bean.getId()) != null && bean.getType().equals("5")) {
|
|
|
- for (ModuleDetailDTO detailDTO : moduleDetailDTOList) {
|
|
|
- if (Integer.parseInt(bean.getType()) == QuestionTypeEnum.Lis.getKey() && lisRespDTO.data != null) {
|
|
|
- if (null != detailDTO.getQuestionId() && detailDTO.getName().equals(questionInfoMap.get(detailDTO.getName()).getTagName())) {
|
|
|
- QuestionVO questionVO = new QuestionVO();
|
|
|
- questionVO.setId(questionInfoMap.get(detailDTO.getName()).getId());
|
|
|
- questionVO.setSexType(moduleVO.getSexType());
|
|
|
- questionVO.setAge(moduleVO.getAge());
|
|
|
- QuestionDTO questionDTO = questionFacade.getById(questionVO);
|
|
|
- BeanUtil.copyProperties(questionDTO, detailDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- bean.setModuleDetailDTOList(moduleDetailDTOList);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
return data;
|
|
|
}
|