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 aQueueItem
reaches the head of theQueue
, the associated encounter in it will be automaticallyfinished
telemed-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
QueueItem
s represents a subject (patient/customer/user) that is being queued in a Queue
. There a mainly 3 states of a queue item:
Active
. whenQueueItem.finishedAt
is not set (not yet finished), andQueueItem.order
is set (w/c is its order in the queue, the lower it is, the nearer it is to theHEAD
)Inactive
. whenQueueItem.finishedAt
is not set (not yet finished), andQueueItem.order
is not set (this means that theQueueItem
is part of trail)Finished
. whenQueueItem.finishedAt
is set, meaning the item has already been accommodated
Queue Trail
A QueueTrail
is a series of QueueItem
s 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 QueueItem
s have the same weight, they will be autobalanced
(the Queue
target with the lesser number of QueueItem
s 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
);