| | |
| | | */ |
| | | public interface QueueService { |
| | | |
| | | void setQueueReadyMax(Integer max); |
| | | void initCheckType(); |
| | | void startBiz(); |
| | | void closeBiz(); |
| | | |
| | |
| | | void updatequeue(@Valid QueueSaveReqVO updateReqVO); |
| | | |
| | | /** |
| | | * 更新停诊 |
| | | * |
| | | * @param |
| | | */ |
| | | void updateStop(long roomId,String bedNo); |
| | | |
| | | /** |
| | | * 删除排队 |
| | | * |
| | | * @param id 编号 |
| | |
| | | void deletequeue(Integer id); |
| | | |
| | | /** |
| | | * |
| | | * 一个工位 可能支持多个检查类型, |
| | | */ |
| | | void startHurryUp(); |
| | | void startHurryUpOneBed(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 立即补人(现场自救 + 自助诊断):手动触发一次该工位的自动分流, |
| | | * 并返回「系统开诊状态 / 是否停止候诊 / 候诊上限 / 补人前后人数 / 结论」。 |
| | | * |
| | | * <p>调用方必须保证"当前登录人是该工位主人"(Controller 上用 {@code @RequireBedOwner})。 |
| | | */ |
| | | java.util.Map<String, Object> hurryUpNow(Long roomId, String bedNo); |
| | | void startHurryUpOneCheckType(Integer checkType); |
| | | |
| | | /** |
| | | * 兜底:对**所有**开诊工位触发一次自动补人(等价于逐个 {@link #startHurryUpOneBed})。 |
| | | * |
| | | * <p>由 {@code QueueAutoRefillJob} 周期性调用:分流本身是"事件驱动"的 |
| | | * (签到 / 入座 / 开诊 / 叫号 / 完成各触发一次),任何一次触发没跑到或跑早了 |
| | | * (例如签到事务还没提交、执行器异常),患者就会一直停在「排队中」, |
| | | * 只能由医生手工「拉入」。周期兜底保证这种漏网最多 1 分钟就被补上。 |
| | | * |
| | | * <p>门闸不变:未开诊 / 停止候诊 / 候诊区已满 时照样不会补人。 |
| | | */ |
| | | void startHurryUpAll(); |
| | | |
| | | void startBedReload(); |
| | | void startResetRoom(Boolean needCloseBed); |
| | | MonitorInfoVO getMonitorInfo(); |
| | | |
| | | ErrorCode startBedOpen(Long roomId, String roomName, String bedNo); |
| | | ErrorCode startBedClose(Long roomId, String bedNo); |
| | | ErrorCode startBedDoctorPause(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode startBedDoctorResume(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode startBedDoctorOn(Long roomId, String bedNo, Long docId, String docName); |
| | | /** |
| | | * 医生入座(把工位主人设为该医生)。 |
| | | * |
| | | * @param bedId 工位主键(可选):传入时**优先按它定位**,避免 bed_no 与请求值存在 |
| | | * 肉眼难辨差异(结尾空格/大小写/全角)导致"明明空闲却入座失败" |
| | | */ |
| | | ErrorCode startBedDoctorOn(Long roomId, String bedNo, Long docId, String docName, Integer bedId); |
| | | |
| | | /** |
| | | * 「本诊室排队中(未分配工位)」的患者列表(工作台"本诊室排队中(未分配)"分区用)。 |
| | | * |
| | | * <p>候诊列表按 {@code room_id + bed_no} 查,只含**已分流到本工位**的患者; |
| | | * 排队中(10) 的患者 {@code bed_no} 为空(大屏会显示、工作台看不到),这里按本工位 |
| | | * 开展的检查项目单独查出来,供医生手工拉入。 |
| | | */ |
| | | List<cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO> getUnassignedWaitingPatient(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 手工把某位「排队中」患者拉入本工位(→ 准备中)。 |
| | | * |
| | | * <p>调用方必须保证"当前登录人是该工位主人"(Controller 上用 {@code @RequireBedOwner})。 |
| | | */ |
| | | ErrorCode pullWaitingPatient(Long roomId, String bedNo, Integer queueId); |
| | | ErrorCode startBedDoctorOff(Long roomId, String bedNo, Long docId, String docName); |
| | | |
| | | /** |
| | | * 【本次需求】管理员强制清空工位(不要求是本人)—— 医生下班忘离座 / 换人使用同一工位时用。 |
| | | */ |
| | | ErrorCode startBedDoctorOffByAdmin(Long roomId, String bedNo); |
| | | ErrorCode startNextPatient(Long roomId, String bedNo); |
| | | ErrorCode startNextInstallPatient(Long roomId, String bedNo); |
| | | |
| | | ErrorCode bedOpen(Long roomId, String roomName, String bedNo); |
| | | ErrorCode bedClose(Long roomId, String bedNo); |
| | | ErrorCode bedDoctorPause(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode bedDoctorResume(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode bedDoctorOn(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode bedDoctorOff(Long roomId, String bedNo, Long docId, String docName); |
| | | ErrorCode nextPatient(Long roomId, String bedNo); |
| | | |
| | | ErrorCode bedReload(); |
| | | CommonResult<RoomRespVO> getRoom(Long roomId, String bedNo, Long docId); |
| | | |
| | | /** |
| | |
| | | */ |
| | | void queue(QueueSaveReqVO queueSaveReqVO); |
| | | |
| | | |
| | | /** |
| | | * 把医生候诊的队列塞满 |
| | | * 按预约单 id 批量取 queue 行(预约签到前回填「已排队 + 排队号 seq_num」用)。 |
| | | * <p>原方法名为 {@code selectBookSeqNumByAppointIdList},号统一到 seq_num 后改名。 |
| | | */ |
| | | void hurryup(); |
| | | List<QueueDO> selectQueueByAppointIdList(List<Long> appointIdList); |
| | | |
| | | /** |
| | | * 医生叫下一位患者 |
| | | * 常规检查 医生叫下一位患者 |
| | | */ |
| | | void finishNextPatient(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 医生看完患者 |
| | | * 领用 医生叫下一位患者 |
| | | */ |
| | | void finishReceiveNextPatient(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 装机 医生叫下一位患者 |
| | | */ |
| | | void finishInstallNextPatient(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 过号排队中患者 |
| | | */ |
| | | void passWaitingPatient( String patId, Integer bookCheckType ); |
| | | |
| | | /** |
| | | * 常规过号、领用过号 |
| | | */ |
| | | void passNextPatient(Long roomId, String bedNo); |
| | | |
| | | List<QueueDO> getDoctorQueueByStatus(Long roomId, String bedNo, List<Byte> statusList); |
| | | /** |
| | | * 装机过号 |
| | | */ |
| | | void passInstallNextPatient(Long roomId, String bedNo); |
| | | |
| | | List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Integer> statusList); |
| | | |
| | | List<QueueDO> getRoomQueueByStatus(Long roomId, List<Integer> statusList); |
| | | |
| | | PatientStatisticVO getPatientStatistic(Long roomId, String bedNo); |
| | | |
| | | Integer recallPatient(Long roomId, String bedNo, String patId); |
| | | PatientStatisticVO getBedDevReadyStatistic(Long roomId, String bedNo); |
| | | |
| | | Integer patientJump(String patId, Byte jumped ); |
| | | PatientStatisticVO getBedDevInstallStatistic(Long roomId, String bedNo); |
| | | |
| | | void monitorInfo(); |
| | | Integer recallPassWaitingPatient(String patId, Integer checkType); |
| | | |
| | | RoomDO getDocRoomInfo(Long docId); |
| | | Integer recallPatient(Long roomId, String bedNo, String patId, Integer checkType); |
| | | |
| | | Integer recallInstallPatient(Long roomId, String bedNo, String patId, Integer checkType, Long roomId_operator, String bedNo_operator); |
| | | |
| | | // ==================== 需求2:撤销「叫号 / 检查完成」 ==================== |
| | | |
| | | /** |
| | | * 撤销「检查完成」:把本工位今日的指定患者从 已就诊(40) 退回 候诊中(20)。 |
| | | * <p> |
| | | * 必须提供 patId + checkType 做精确定位,避免误改其他患者。 |
| | | * |
| | | * @return 受影响行数;0 表示未找到该患者今日的已完成记录 |
| | | */ |
| | | Integer undoFinishPatient(Long roomId, String bedNo, String patId, Integer checkType); |
| | | |
| | | /** |
| | | * 撤销「误点叫号」:把本工位当前 就诊中(30) 的患者退回 候诊中(20)。 |
| | | * |
| | | * @return 受影响行数;0 表示当前无就诊中患者 |
| | | */ |
| | | Integer undoCallPatient(Long roomId, String bedNo); |
| | | |
| | | /** |
| | | * 取本工位今日**最近一位已完成**的患者(供界面提示可撤销对象)。 |
| | | */ |
| | | QueueDO getBedLastFinishedQueueItem(Long roomId, String bedNo); |
| | | |
| | | // ==================== 需求3:停止候诊开关 ==================== |
| | | |
| | | /** |
| | | * 设置「停止候诊」开关(持久化到 {@code clinic_room.stop_ready})。 |
| | | * <p> |
| | | * 开启后:**已有候诊病人继续叫号,但不再新增候诊病人**; |
| | | * 关闭后恢复正常接收。 |
| | | * |
| | | * @param stop true=停止候诊;false=恢复 |
| | | * @return 成功返回 SUCCESS |
| | | */ |
| | | ErrorCode setStopReady(Long roomId, String bedNo, boolean stop); |
| | | |
| | | /** 查询「停止候诊」状态;工位不存在返回 null */ |
| | | Boolean getStopReady(Long roomId, String bedNo); |
| | | |
| | | Integer patientJump(String patId, Integer bookCheckType, Byte jumped ); |
| | | |
| | | List<RoomDO> getDocRoomInfo(Long docId); |
| | | |
| | | List<QueueDO> getCheckRelatedPatient(Long roomId, String bedNo); |
| | | |
| | | List<QueueDO> getInstallRelatedPatient(Long roomId, String bedNo); |
| | | |
| | | // ==================== 需求1:患者信息回填 ==================== |
| | | |
| | | /** |
| | | * 按 {@code applyNo} 从预约单(appointment)回填队列对象的患者信息。 |
| | | * <p> |
| | | * queue 表只存了患者编号/姓名,其余(性别、出生日期、病区、床号、电话、来源、 |
| | | * 就诊卡号、登记时间、开单医师、开单日期、多耐药)都在 appointment 表。 |
| | | * <p> |
| | | * 之所以对外暴露:大屏/诊间屏({@code CallingScreenServiceImpl})直接查 |
| | | * {@code queueMapper},不经过本 Service 的查询方法,需要显式调用本方法补齐。 |
| | | * 不补齐则大屏/诊间屏的患者信息只有姓名(性别/病区/床号等全为空)。 |
| | | * |
| | | * @param queueDOList 队列对象列表(空/null 安全) |
| | | */ |
| | | void fillAppointmentInfo(List<QueueDO> queueDOList); |
| | | } |