|
@@ -1,6 +1,7 @@
|
|
package com.diagbot.facade;
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.diagbot.dto.EMRIntroduceDTO;
|
|
import com.diagbot.dto.IntroduceDTO;
|
|
import com.diagbot.dto.IntroduceDTO;
|
|
import com.diagbot.entity.IntroduceDetail;
|
|
import com.diagbot.entity.IntroduceDetail;
|
|
import com.diagbot.entity.IntroduceInfo;
|
|
import com.diagbot.entity.IntroduceInfo;
|
|
@@ -13,7 +14,9 @@ import com.diagbot.exception.CommonException;
|
|
import com.diagbot.service.impl.IntroduceInfoServiceImpl;
|
|
import com.diagbot.service.impl.IntroduceInfoServiceImpl;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
|
|
+import com.diagbot.vo.EMRIntroduceVO;
|
|
import com.diagbot.vo.IntroduceByQuestionVO;
|
|
import com.diagbot.vo.IntroduceByQuestionVO;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -135,4 +138,41 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
public IntroduceDTO getRecordById(Long id) {
|
|
public IntroduceDTO getRecordById(Long id) {
|
|
return getRecordByIdAndPosition(id, null);
|
|
return getRecordByIdAndPosition(id, null);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取电子病历评级提示信息
|
|
|
|
+ *
|
|
|
|
+ * @param emrIntroduceVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<EMRIntroduceDTO> getIntroduceByEMR(EMRIntroduceVO emrIntroduceVO) {
|
|
|
|
+ QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("tag_name", emrIntroduceVO.getName())
|
|
|
|
+ .eq("type", emrIntroduceVO.getType());
|
|
|
|
+ QuestionInfo questionInfo = questionFacade.getOne(questionInfoQueryWrapper);
|
|
|
|
+ if (questionInfo == null) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "标签不存在");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
|
+ eq("question_id", questionInfo.getId()).
|
|
|
|
+ eq("type", emrIntroduceVO.getType());
|
|
|
|
+ IntroduceMap introduceMap = introduceMapFacade.getOne(introduceMapQueryWrapper);
|
|
|
|
+ if (introduceMap == null) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
|
+ eq("introduce_id", introduceMap.getIntroduceId()).orderByAsc("order_no");
|
|
|
|
+ //如果标题不为空,按标题返回,否则,全部返回
|
|
|
|
+ if (emrIntroduceVO.getTitles().length > 0) {
|
|
|
|
+ introduceDetailQueryWrapper.in("title", emrIntroduceVO.getTitles());
|
|
|
|
+ }
|
|
|
|
+ List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
|
|
|
|
+ List<EMRIntroduceDTO> emrIntroduceDTOList = BeanUtil.listCopyTo(introduceDetailList, EMRIntroduceDTO.class);
|
|
|
|
+ return emrIntroduceDTOList;
|
|
|
|
+ }
|
|
}
|
|
}
|