|
@@ -23,6 +23,7 @@ import com.diagbot.entity.ModuleInfo;
|
|
|
import com.diagbot.entity.QuestionInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.ModuleInfoTypeEnum;
|
|
|
+import com.diagbot.enums.QuestionTypeEnum;
|
|
|
import com.diagbot.enums.TagTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -136,7 +137,7 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
moduleInfo.setType(addModulInfoVO.getType());
|
|
|
moduleInfo.setModuleType(addModulInfoVO.getModuleType());
|
|
|
//当添加为科室专用模板或者慢病模板时添加关联id
|
|
|
- if(addModulInfoVO.getModuleType().intValue() ==1 || addModulInfoVO.getModuleType().intValue() == 2){
|
|
|
+ if(addModulInfoVO.getModuleType().intValue() == 1 || addModulInfoVO.getModuleType().intValue() == 2){
|
|
|
moduleInfo.setRelationId(addModulInfoVO.getRelationId());
|
|
|
}
|
|
|
this.save(moduleInfo);
|
|
@@ -176,7 +177,35 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<GetQuestionInfoDTO> getQuestionInfos(ModuleGetQuestionInfoVO moduleGetQuestionInfoVO) {
|
|
|
- List<GetQuestionInfoDTO> getQuestionInfoDTOS = questionFacade.moduleGetQuestiongInfoByName(moduleGetQuestionInfoVO);
|
|
|
+ List<GetQuestionInfoDTO> getQuestionInfoDTOS = new ArrayList<>();
|
|
|
+ GetQuestionInfoDTO getQuestionInfoDTO = new GetQuestionInfoDTO();
|
|
|
+ //如果是慢病或者辅检,调用aipt-获取概念信息
|
|
|
+ if(moduleGetQuestionInfoVO.getType().intValue() == QuestionTypeEnum.Lis.getKey() || moduleGetQuestionInfoVO.getType().intValue() == QuestionTypeEnum.Pacs.getKey()){
|
|
|
+ getQuestionInfoDTOS = new ArrayList<>();
|
|
|
+ ConceptTypeVO conceptTypeVO = new ConceptTypeVO();
|
|
|
+ conceptTypeVO.setType(3);
|
|
|
+ RespDTO<List<ConceptBaseDTO>> conceptBaseDTOS = knowledgemanServiceClient.getConceptListByType(conceptTypeVO);
|
|
|
+ if(ListUtil.isNotEmpty(moduleGetQuestionInfoVO.getNoIds())){
|
|
|
+ Iterator<ConceptBaseDTO> conceptBaseDTOIterator = conceptBaseDTOS.data.iterator();
|
|
|
+ while (conceptBaseDTOIterator.hasNext()){
|
|
|
+ for (Long notId : moduleGetQuestionInfoVO.getNoIds()) {
|
|
|
+ if(conceptBaseDTOIterator.next().getConceptId().intValue() == notId.intValue()){
|
|
|
+ conceptBaseDTOIterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (ConceptBaseDTO conceptBaseDTO : conceptBaseDTOS.data) {
|
|
|
+ getQuestionInfoDTO = new GetQuestionInfoDTO();
|
|
|
+ getQuestionInfoDTO.setId(conceptBaseDTO.getConceptId());
|
|
|
+ getQuestionInfoDTO.setTagName(conceptBaseDTO.getName());
|
|
|
+ getQuestionInfoDTOS.add(getQuestionInfoDTO);
|
|
|
+ }
|
|
|
+ }else {//如果是普通病,返回questionInfo信息
|
|
|
+ getQuestionInfoDTOS = new ArrayList<>();
|
|
|
+ getQuestionInfoDTOS = questionFacade.moduleGetQuestiongInfoByName(moduleGetQuestionInfoVO);
|
|
|
+ }
|
|
|
+
|
|
|
return getQuestionInfoDTOS;
|
|
|
}
|
|
|
|