|
@@ -16,11 +16,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.GetInquiryDetailDTO;
|
|
|
import com.diagbot.dto.GetLastOtherDTO;
|
|
|
import com.diagbot.dto.HisInquiryDTO;
|
|
|
+import com.diagbot.dto.HospitalInfoDTO;
|
|
|
+import com.diagbot.dto.PatientInfoDTO;
|
|
|
import com.diagbot.dto.ReadInquiryDTO;
|
|
|
import com.diagbot.dto.SaveInquiryDTO;
|
|
|
import com.diagbot.entity.DoctorInfo;
|
|
|
import com.diagbot.entity.HospitalDept;
|
|
|
-import com.diagbot.entity.HospitalInfo;
|
|
|
import com.diagbot.entity.InquiryDetail;
|
|
|
import com.diagbot.entity.InquiryInfo;
|
|
|
import com.diagbot.entity.PatientInfo;
|
|
@@ -32,6 +33,7 @@ import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.vo.GetInquiryDetailVO;
|
|
|
import com.diagbot.vo.GetLastOtherVO;
|
|
|
import com.diagbot.vo.HisInquirysVO;
|
|
|
+import com.diagbot.vo.PatientInfoVO;
|
|
|
import com.diagbot.vo.ReadInquiryVO;
|
|
|
import com.diagbot.vo.SaveInquiryDetailVO;
|
|
|
import com.diagbot.vo.SaveInquiryVO;
|
|
@@ -55,7 +57,6 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
@Autowired
|
|
|
private HospitalDeptFacade hospitalDeptFacade;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 问诊记录保存
|
|
|
*
|
|
@@ -157,12 +158,16 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
public GetLastOtherDTO getLastOther(GetLastOtherVO getLastOtherVO) {
|
|
|
GetLastOtherDTO getLastOtherDTO = new GetLastOtherDTO();
|
|
|
|
|
|
- HospitalInfo hospitalInfo = hospitalInfoFacade.getHospitalByCode(getLastOtherVO.getHospitalCode());
|
|
|
- PatientInfo patientInfo = patientInfoFacade.getPatientByCode(getLastOtherVO.getHospitalCode(), getLastOtherVO.getPatientCode());
|
|
|
+ HospitalInfoDTO hospitalInfoDTO = hospitalInfoFacade.getHospitalByCode(getLastOtherVO.getHospitalCode());
|
|
|
+
|
|
|
+ PatientInfoVO patientInfoVO = new PatientInfoVO();
|
|
|
+ patientInfoVO.setHospitalCode(getLastOtherVO.getHospitalCode());
|
|
|
+ patientInfoVO.setPatientCode(getLastOtherVO.getPatientCode());
|
|
|
+ PatientInfoDTO patientInfoDTO = patientInfoFacade.getPatientInfo(patientInfoVO);
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("hospitalId", hospitalInfo.getId());
|
|
|
- map.put("patientId", patientInfo.getId());
|
|
|
+ map.put("hospitalId", hospitalInfoDTO.getId());
|
|
|
+ map.put("patientId", patientInfoDTO.getId());
|
|
|
map.put("sign", getLastOtherVO.getSign());
|
|
|
InquiryInfo inquiryInfo = baseMapper.getPatientLast(map);
|
|
|
|
|
@@ -226,9 +231,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
List<Long> patientIdList = inquiryInfoList.stream().map(i -> i.getPatientId()).collect(Collectors.toList());
|
|
|
List<Long> inquiryIdList = inquiryInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
|
|
|
- Map<Long, HospitalDept> hospitalDeptMap = hospitalDeptFacade.listByIds(hospitalDeptIdList).stream().filter(i -> i.getIsDeleted().equals("N") && i.getStatus() == 1).collect(Collectors.toMap(HospitalDept::getId, i -> i));
|
|
|
- Map<Long, DoctorInfo> doctorInfoMap = doctorInfoFacade.listByIds(doctorIdList).stream().filter(i -> i.getIsDeleted().equals("N")).collect(Collectors.toMap(DoctorInfo::getId, i -> i));
|
|
|
- Map<Long, PatientInfo> patientInfoMap = patientInfoFacade.listByIds(patientIdList).stream().filter(i -> i.getIsDeleted().equals("N")).collect(Collectors.toMap(PatientInfo::getId, i -> i));
|
|
|
+ Map<Long, HospitalDept> hospitalDeptMap = hospitalDeptFacade.hospitalDeptInfoMapByIds(hospitalDeptIdList);
|
|
|
+ Map<Long, DoctorInfo> doctorInfoMap = doctorInfoFacade.doctorInfoMapByIds(doctorIdList);
|
|
|
+ Map<Long, PatientInfo> patientInfoMap = patientInfoFacade.patientInfoMapByIds(patientIdList);
|
|
|
Map<Long, List<InquiryDetail>> inquiryDetailMap = inquiryDetailFacade.getDetailsByInquryIds(inquiryIdList);
|
|
|
|
|
|
List<HisInquiryDTO> hisInquiryDTOList = new ArrayList<>();
|