| | |
| | | } |
| | | |
| | | @GetMapping("/finish-next-patient") |
| | | @Operation(summary = "完成、下一位患者") |
| | | @Operation(summary = "常规叫号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | |
| | | { |
| | | queueService.finishNextPatient(roomId, bedNo); |
| | | |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo); |
| | | |
| | | // 过滤出 就诊中的,准备叫号 |
| | | QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null); |
| | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/finish-receive-next-patient") |
| | | @Operation(summary = "领用叫号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<List<QueueRespVO>> finishReceiveNextPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | queueService.finishReceiveNextPatient(roomId, bedNo); |
| | | |
| | | List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo); |
| | | |
| | | // 过滤出 就诊中的,准备叫号 |
| | | QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null); |
| | | if (null != onStageItem) { |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/finish-install-next-patient") |
| | | @Operation(summary = "装机叫号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<List<QueueRespVO>> finishInstallNextPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | queueService.finishInstallNextPatient(roomId, bedNo); |
| | | |
| | | List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); |
| | | |
| | | List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO -> queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus()).toList(); |
| | | // 过滤出 [安装中] 的,准备叫号 该工位应该 最多只有一个 [安装中] |
| | | if (installingQueueDOList.size() > 0) { |
| | | QueueDO onStageItem = installingQueueDOList.getFirst(); |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | // 常规检查过号、领用过号 |
| | | @GetMapping("/pass-next-patient") |
| | | @Operation(summary = "过号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | |
| | | { |
| | | queueService.passNextPatient(roomId, bedNo); |
| | | |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo); |
| | | |
| | | // 过滤出 就诊中的,准备叫号 |
| | | QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null); |
| | |
| | | callSaveReqVO.setId(null); |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/pass-install-next-patient") |
| | | @Operation(summary = "安装过号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<List<QueueRespVO>> passInstallNextPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | queueService.passInstallNextPatient(roomId, bedNo); |
| | | |
| | | List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); |
| | | |
| | | /* |
| | | // 过滤出 就诊中的,准备叫号 |
| | | QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null); |
| | | if (null != onStageItem) { |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | */ |
| | | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | |
| | | { |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList); |
| | | |
| | | if (queueDOList.isEmpty()) |
| | | return success("无就诊中患者"); |
| | |
| | | return success("操作成功"); |
| | | } |
| | | |
| | | @GetMapping("/get-patient-list") |
| | | @Operation(summary = "取患者列表") |
| | | @GetMapping("/get-to-be-checked-list") |
| | | @Operation(summary = "取 [常规检查] 或 [待领用] 患者列表") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<List<QueueRespVO>> getPatientList( |
| | | public CommonResult<List<QueueRespVO>> getToBeCheckedPatientList( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo); |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/get-to-be-installed-list") |
| | | @Operation(summary = "取 [待安装] 患者列表") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<List<QueueRespVO>> getToBeInstalledPatientList( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | PatientStatisticVO patientStatisticVO = queueService.getPatientStatistic(roomId, bedNo); |
| | | return success(patientStatisticVO); |
| | | } |
| | | |
| | | @GetMapping("/get-dev-ready-statistic") |
| | | @Operation(summary = "设备领用统计") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<PatientStatisticVO> getDevReadyStatistic( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | PatientStatisticVO patientStatisticVO = queueService.getBedDevReadyStatistic(roomId, bedNo); |
| | | return success(patientStatisticVO); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/get-dev-install-statistic") |
| | | @Operation(summary = "设备装机统计") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<PatientStatisticVO> getDevInstallStatistic( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | PatientStatisticVO patientStatisticVO = queueService.getBedDevInstallStatistic(roomId, bedNo); |
| | | return success(patientStatisticVO); |
| | | } |
| | | |
| | |
| | | if (null == result || 0 == result) |
| | | return error(PATIENT_NOT_EXISTS); |
| | | |
| | | return success("success"); |
| | | return success("操作成功"); |
| | | } |
| | | |
| | | @GetMapping("/recall-install-patient") |
| | | @Operation(summary = "过号安装病人召回") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @Parameter(name = "patId", description = "患者编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<String> recallInstallPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo, |
| | | @RequestParam("patId") String patId ) |
| | | { |
| | | Integer result = queueService.recallInstallPatient(roomId, bedNo, patId); |
| | | if (null == result || 0 == result) |
| | | return error(PATIENT_NOT_EXISTS); |
| | | |
| | | return success("操作成功"); |
| | | } |
| | | |
| | | } |