| | |
| | | ErrorCode ECG_CONFIG_ERROR = new ErrorCode(1_010_000_001, "心电检查类型的最大准备人数配置不一致"); |
| | | |
| | | ErrorCode APPOINTMENT_NOT_EXISTS = new ErrorCode(1_010_001_000, "预约不存在"); |
| | | ErrorCode APPOINTMENT_NOT_TODAY = new ErrorCode(1_010_001_001, "不是当天预约"); |
| | | ErrorCode APPOINTMENT_HAVE_QUEUED = new ErrorCode(1_010_001_002, "您已经在排队中了"); |
| | | ErrorCode APPOINTMENT_NOT_TODAY = new ErrorCode(1_010_001_010, "不是当天预约"); |
| | | ErrorCode APPOINTMENT_EXIST_TODAY = new ErrorCode(1_010_001_020, "当天预约已存在"); |
| | | ErrorCode APPOINTMENT_HAVE_QUEUED = new ErrorCode(1_010_001_030, "您已经在排队中了"); |
| | | ErrorCode APPOINTMENT_NOT_BILLING = new ErrorCode(1_010_001_040, "查询不到开单信息"); |
| | | |
| | | ErrorCode ROOM_NOT_EXISTS = new ErrorCode(1_010_002_000, "诊室和诊疗床不存在"); |
| | | ErrorCode ROOM_NOT_SIT = new ErrorCode(1_010_002_001, "请重新就座"); |
| | |
| | | return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/query-his-by-patient") |
| | | @Operation(summary = "从HIS.查询患者预约/开单信息") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") |
| | | public CommonResult<AppointmentRespVO> queryHisByPatient(@RequestParam("patId") String patId) { |
| | | AppointmentDO appointment = appointmentService.getAppointmentExtermal( patId ); |
| | | if ( null == appointment) |
| | | return error(APPOINTMENT_NOT_BILLING); |
| | | return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得预约分页") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") |
| | |
| | | */ |
| | | PageResult<AppointmentDO> getAppointmentPage(AppointmentPageReqVO pageReqVO); |
| | | |
| | | AppointmentDO getAppointmentExtermal(String mzzyh); |
| | | AppointmentDO getAppointmentExtermal(String patId); |
| | | |
| | | String appoitmentConfirm(AppointmentConfirmReqVO appointmentConfirmReqVO); |
| | | } |
| | |
| | | appointment.setBookTime( LocalDateTime.now() ); |
| | | appointment.setBookSrc( 1 ); |
| | | |
| | | appointmentMapper.insert(appointment); |
| | | try { |
| | | appointmentMapper.insert(appointment); |
| | | } catch (DuplicateKeyException e) { |
| | | throw exception(APPOINTMENT_EXIST_TODAY); |
| | | } |
| | | |
| | | // 返回 |
| | | return appointment.getId(); |
| | | } |
| | |
| | | // 先从医院平台查询 |
| | | AppointmentDO appointmentExtermal = getAppointmentExtermal( patId ); |
| | | if (null != appointmentExtermal && null != appointmentExtermal.getBookDate() && appointmentExtermal.getBookDate().isEqual(LocalDate.now()) ) { |
| | | // 查询DB中 是否已经存在 |
| | | // 查到当天的预约后,查询DB中 是否已经存在 |
| | | AppointmentDO appointmentDO = appointmentMapper.getCurrentPatId( patId ); |
| | | if (null == appointmentDO ) { |
| | | appointmentExtermal.setBookSrc(0); |
| | |
| | | |
| | | // QueryRisReportList queryEcgRequest |
| | | RestApiResult<AppointmentExternal> result = remoteDataService.httpApi("queryEcgRequest", "ECG", "ECG", reqBodyVo); |
| | | result.getCode(); |
| | | if (0 == result.getRow().size()) { |
| | | return null; |
| | | } |
| | | |
| | | AppointmentExternal appointmentExternal = result.getRow().get(0); |
| | | AppointmentDO appointmentDO = BeanUtils.toBean( appointmentExternal, AppointmentDO.class ); |