Queueing
A Queue represents a sequence of subjects that can be accomodate/acted upon. In most client apps, it is used to queue a number of patients for a doctor to accommodate.
Special Queues
There are special types of queues that are usually system-generated:
cashier-pool. This is where patients/customers are sent in order for them to pay their availed services firstend-of-encounter. When aQueueItemreaches the head of theQueue, the associated encounter in it will be automaticallyfinishedtelemed-patient-pool. Used in telemed flow
Creating, Updating, Removing A Queue
A Queue can be created, updated, and removed using the queues API's create, update, and remove methods respectively using an account with the correct privileges (queue or queueCreate, queueUpdate, and queueRemove);
Queue Items
QueueItems represents a subject (patient/customer/user) that is being queued in a Queue. There a mainly 3 states of a queue item:
Active. whenQueueItem.finishedAtis not set (not yet finished), andQueueItem.orderis set (w/c is its order in the queue, the lower it is, the nearer it is to theHEAD)Inactive. whenQueueItem.finishedAtis not set (not yet finished), andQueueItem.orderis not set (this means that theQueueItemis part of trail)Finished. whenQueueItem.finishedAtis set, meaning the item has already been accommodated
Queue Trail
A QueueTrail is a series of QueueItems in different queues (they have the same QueueItem.trail) where only one is Active at a time. When the Active QueueItem is finished, it will automatically Activate the next QueueItem in the trail (can be in sequence or auto-balanced)
QueueItem Weight
QueueItem.weight determines the activation sequence in a trail. The lower the weight, the nearer it is on the activation sequence. When 2 or more QueueItems have the same weight, they will be autobalanced (the Queue target with the lesser number of QueueItems will be chosen)
Creating, Updating, Removing A QueueItem
A QueueItem can be created, updated, and removed using the queues API's create, update, and remove methods respectively using an account with the correct privileges (queue or queueCreate, queueUpdate, and queueRemove);