|
@@ -14,9 +14,11 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.client.TranServiceClient;
|
|
|
+import com.diagbot.dto.EMRIntroduceDetailDTO;
|
|
|
import com.diagbot.dto.GetInquiryDetailDTO;
|
|
|
import com.diagbot.dto.GetLastOtherDTO;
|
|
|
import com.diagbot.dto.HisInquiryDTO;
|
|
|
+import com.diagbot.dto.HisInquirysForDjDTO;
|
|
|
import com.diagbot.dto.HospitalInfoDTO;
|
|
|
import com.diagbot.dto.PatientInfoDTO;
|
|
|
import com.diagbot.dto.ReadInquiryDTO;
|
|
@@ -31,8 +33,11 @@ import com.diagbot.enums.SexTypeEnum;
|
|
|
import com.diagbot.service.impl.InquiryInfoServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.GetInquiryDetailVO;
|
|
|
import com.diagbot.vo.GetLastOtherVO;
|
|
|
+import com.diagbot.vo.HisInquirysForDjVO;
|
|
|
import com.diagbot.vo.HisInquirysVO;
|
|
|
import com.diagbot.vo.PatientInfoVO;
|
|
|
import com.diagbot.vo.ReadInquiryVO;
|
|
@@ -271,6 +276,61 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
|
|
|
return hisInquiryDTOList;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对接-历史病历列表
|
|
|
+ *
|
|
|
+ * @param hisInquirysForDjVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<HisInquirysForDjDTO> hisInquirysForDj(HisInquirysForDjVO hisInquirysForDjVO) {
|
|
|
+ QueryWrapper<InquiryInfo> queryWrapper = new QueryWrapper<InquiryInfo>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ queryWrapper.eq("hospital_id", hisInquirysForDjVO.getHospitalId());
|
|
|
+ if(hisInquirysForDjVO.getHospitalDeptId()!=null){
|
|
|
+ queryWrapper.eq("hospital_dept_id", hisInquirysForDjVO.getHospitalDeptId());
|
|
|
+ }
|
|
|
+ if(hisInquirysForDjVO.getDoctorId()!=null){
|
|
|
+ queryWrapper.eq("doctor_id", hisInquirysForDjVO.getDoctorId());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getPatientId() != null) {
|
|
|
+ queryWrapper.eq("patient_id", hisInquirysForDjVO.getPatientId());
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotBlank(hisInquirysForDjVO.getInquiryCode())){
|
|
|
+ queryWrapper.eq("inquiry_code", hisInquirysForDjVO.getInquiryCode());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getType() != null) {
|
|
|
+ queryWrapper.eq("type", hisInquirysForDjVO.getType());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getSign() != null) {
|
|
|
+ queryWrapper.eq("sign", hisInquirysForDjVO.getSign());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getStartDate() != null) {
|
|
|
+ queryWrapper.ge("gmt_create", hisInquirysForDjVO.getStartDate());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getEndDate() != null) {
|
|
|
+ queryWrapper.le("gmt_create", hisInquirysForDjVO.getEndDate());
|
|
|
+ }
|
|
|
+ if (hisInquirysForDjVO.getOrderType() == 1) {
|
|
|
+ queryWrapper.orderByDesc("gmt_modified");
|
|
|
+ } else if (hisInquirysForDjVO.getOrderType() == 2) {
|
|
|
+ queryWrapper.orderByAsc("gmt_modified");
|
|
|
+ }
|
|
|
+ List<InquiryInfo> inquiryInfoList = this.list(queryWrapper);
|
|
|
+ if (ListUtil.isEmpty(inquiryInfoList)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<Long, List<InquiryDetail>> inquiryDetailMap = inquiryDetailFacade.getDetailsByInquryIds(inquiryInfoList.stream().map(i -> i.getId()).collect(Collectors.toList()));
|
|
|
+ List<HisInquirysForDjDTO> hisInquirysForDjDTOList = BeanUtil.listCopyTo(inquiryInfoList, HisInquirysForDjDTO.class);
|
|
|
+
|
|
|
+ hisInquirysForDjDTOList.forEach(i->{
|
|
|
+ i.setContentList(inquiryDetailMap.get(i.getId()).stream().map(k->k.getContentValue()).collect(Collectors.toList()));
|
|
|
+ });
|
|
|
+
|
|
|
+ return hisInquirysForDjDTOList;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 病历详情
|