Order and Appointment Lifecycle
The At-Home Phlebotomy orders are composed of two different lifecycles, the Order lifecycle and the appointment lifecycle, detailed in the following sections.
Order Lifecycle
As discussed in Lab Test Lifecycle - Statuses
,
each lab testing modality has the following format
[HIGH-LEVEL STATUS].[TEST MODALITY].[LOW-LEVEL STATUS]
For each modality, there can be multiple low-level status, for At Home Phlebotomy the possible low-level status are:
ordered
: Vital received the order, stored it into our system, and started processing it asynchronously.requisition_created
: An order requisition form was validated and created with the partner laboratory, making the order available to be carried out.appointment_pending
: An appointment was placed in Vital’s system for the order, but doesn’t have a scheduled date.appointment_scheduled
: An appointment was scheduled or rescheduled for the order.draw_completed
: The phlebotomy appointment was completed and the blood was drawn successfuly.appointment_cancelled
: The appointment was cancelled, by either the patient, Vital or you.partial_results
: The laboratory has started making partial results available.completed
: The laboratory processed the blood sample and final results are available.cancelled
: The order was cancelled by either the patient, Vital or you.
The Finite State Machine that defines the possible transitions for the low-level statuses described above is illustrated in the following diagram.
Possible state transitions for the At-Home Phlebotomy Order low-level statuses.
ordered
state to the requisition_created
state, this must be manually triggered via the Vital Dashboard.Appointment Lifecycle
The appointment lifecycle is separate from the order lifecyle, and it corresponds to a single appointment. The possible status are defined as follows:
pending
: An appointment was placed in the system, and is pending updates from the phlebotomy service.scheduled
: An appointment was scheduled or rescheduled.in-progress
: The phlebotomist is in their way to the patient address.cancelled
: The appointment was cancelled by either the patient, Vital or you.completed
: The phlebotomy appointment was completed and the blood was drawn successfuly
The Finite State Machine that defines the possible transitions for the appointment statuses described above is illustrated in the following diagram.
Possible state transitions for the At-Home Phlebotomy Appointment statuses.
The events are related to a single appointment. An order can have multiple existing appointments in Vital system, although only one appointment will be considered active and returned when using the GET Appointment endpoint.