| | |
| | | return; |
| | | } |
| | | |
| | | // 抢到排队患者后,处理 检查项目.亲和性 逻辑 |
| | | QueueDO queueDO = queueMapper.getQueueItemBySeqNum(curSeqNum.get() + 1); |
| | | CheckTypeDO checkTypeDO = getCheckTypeItem( queueDO.getBookCheckType() ); |
| | | if ( checkTypeDO.getAffinityCheckTypes().length > 0) { |
| | | List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckItems(queueDO.getPatId(), checkTypeDO.getAffinityCheckTypes()); |
| | | for (int i = 0; i < affinityItems.size(); i++) { |
| | | QueueDO queueItem = affinityItems.get(i); |
| | | queueItem.setStatus(QueueStatusEnum.AFFINITY_ALREADY.getStatus()); //改变 排队状态 |
| | | queueItem.setRoomId(queueItem.getRoomId()); |
| | | queueItem.setRoomName(queueItem.getRoomName()); |
| | | queueItem.setBedNo(queueItem.getBedNo()); |
| | | } |
| | | } |
| | | |
| | | curSeqNum.getAndIncrement(); |
| | | |
| | | // 可能已经【并发的】在 nextPatient 中改变了值 |
| | |
| | | mapCheckTypeVsReadyMax = checkTypeDOList.stream().collect(Collectors.toMap(CheckTypeDO::getValue, checkType -> checkType)); |
| | | } |
| | | |
| | | public CheckTypeDO getCheckTypeItem(Integer checkType) { |
| | | return mapCheckTypeVsReadyMax.get( checkType ); |
| | | } |
| | | |
| | | public BedQueueBO getBedQueueBO(Long roomId, String bedNo) { |
| | | return mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | } |
| | |
| | | MonitorInfoVO monitorInfoVO = new MonitorInfoVO(); |
| | | roomBedStatistic(monitorInfoVO); |
| | | log.info(" opening " + openingFlag.get() + " " + monitorInfoVO.getQueueNum() + " " + monitorInfoVO.getActiveQueueNum() + " " + monitorInfoVO.getCheckTypeBedInfo().toString() ); |
| | | } |
| | | |
| | | public void resetQueueSequenceTable() { |
| | | String strBookTimeslotLength = configApi.getConfigValueByKey(BOOK_TIMESLOT_LENGTH); |
| | | String strBookTimeslotList = configApi.getConfigValueByKey(BOOK_TIMESLOT_LIST); |
| | | |
| | | |
| | | } |
| | | |
| | | private Integer getBedReadyMax(Long roomId, String bedNo) { |