|
|
@@ -4,8 +4,12 @@ import cn.tr.core.exception.TRExcCode;
|
|
|
import cn.tr.module.smart.app.controller.dto.WxDoctorPatientInfoDTO;
|
|
|
import cn.tr.module.smart.app.controller.vo.WxDoctorPatientListVO;
|
|
|
import cn.tr.module.smart.app.controller.vo.WxDoctorPatientVO;
|
|
|
+import cn.tr.module.smart.common.dto.BizClinicRoomDTO;
|
|
|
+import cn.tr.module.smart.common.mapper.BizClinicRoomMapper;
|
|
|
import cn.tr.module.smart.common.po.BizClinicRoomPO;
|
|
|
import cn.tr.module.smart.common.repository.BizClinicRoomRepository;
|
|
|
+import cn.tr.module.smart.web.dto.BizPatientClinicListDTO;
|
|
|
+import cn.tr.module.smart.web.dto.BizPatientDetailDTO;
|
|
|
import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -79,9 +83,23 @@ public class BizPatientServiceImpl implements IBizPatientService {
|
|
|
* @date 2025/06/09 15:58
|
|
|
*/
|
|
|
@Override
|
|
|
- public BizPatientDTO selectBizPatientById(String id){
|
|
|
- return BizPatientMapper.INSTANCE.convertDto(baseRepository.selectById(id));
|
|
|
- };
|
|
|
+ public BizPatientDetailDTO selectBizPatientById(String id){
|
|
|
+ //查询最新手术的患者信息
|
|
|
+ BizPatientPO bizPatientPO = baseRepository.selectById(id);
|
|
|
+ BizClinicRoomPO bizClinicRoomPO = clinicRoomRepository.selectById(bizPatientPO.getCurrentClinicId());
|
|
|
+ if(Objects.isNull(bizClinicRoomPO)){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"未查询到手术信息");
|
|
|
+ }
|
|
|
+ //查询所有手术信息
|
|
|
+ List<BizPatientClinicListDTO> bizPatientClinicListDTOS = clinicRoomRepository.selectClinicAndDoctorByPatientIdList(id);
|
|
|
+ return BizPatientDetailDTO.builder()
|
|
|
+ .patientCode(bizClinicRoomPO.getPatientCode())
|
|
|
+ .patientName(bizClinicRoomPO.getPatientName())
|
|
|
+ .patientGender(bizClinicRoomPO.getPatientGender())
|
|
|
+ .patientAge(bizClinicRoomPO.getPatientAge())
|
|
|
+ .clinicList(bizPatientClinicListDTOS)
|
|
|
+ .build();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 编辑患者信息
|