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:

  1. cashier-pool. This is where patients/customers are sent in order for them to pay their availed services first
  2. end-of-encounter. When a QueueItem reaches the head of the Queue, the associated encounter in it will be automatically finished
  3. 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


QueueItems represents a subject (patient/customer/user) that is being queued in a Queue. There a mainly 3 states of a queue item:

  1. Active. when QueueItem.finishedAt is not set (not yet finished), and QueueItem.order is set (w/c is its order in the queue, the lower it is, the nearer it is to the HEAD)
  2. Inactive. when QueueItem.finishedAt is not set (not yet finished), and QueueItem.order is not set (this means that the QueueItem is part of trail)
  3. Finished. when QueueItem.finishedAt is 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);

results matching ""

    No results matching ""