Lab recommendations originate within a treatment plan and, when purchased by a patient, become lab orders. These orders contain one or more lab tests, each of which can produce individual results.
Integrators must:
The lab order progresses through several statuses:
| Status | Description | Triggers lab_order.updated? |
|---|---|---|
| not_purchased | Lab recommended, but not purchased yet | ❌ |
| purchased | Patient has purchased the lab | ❌ (*see order.placed) |
| schedule_appointment | The lab purchased requires an appointment to be scheduled | ❌ |
| upcoming_appointment | Appointment scheduled | ❌ |
| processing | Sample received and is being processed | ❌ |
| partial_results (results_received) | Some but not all results available | ✅ |
| results_ready (all_results_received) | All results available | ✅ |
| results_amended | Previously published results have been updated | ✅ |
| interpretation_ready | The results are ready to be interpreted in Fullscript | ❌ |
| interpretation_shared | Practitioner shared interpretation with patient | ❌ |
Not all labs require appointments. schedule_appointment and upcoming_appointment only apply to labs that do.
The lab_order object contains two key arrays:
tests[]: Lists all tests ordered.results[]: Lists results received, which may or may not directly align one-to-one with the tests.Important Notes:
Current Workaround:
Browse available lab tests before creating a treatment plan. The catalog requires the catalog:read OAuth scope (or API keys) and is only available when labs ordering is enabled for the clinic.
id from each entry as lab_test_id when creating treatment plans.See the Lab test catalog entry object reference for response fields, sample payloads, and error responses.
GET /api/clinic/labs/orders
Returns a list of lab orders for the clinic.
GET /api/clinic/labs/orders/{id}
Returns detailed info on a lab order, including:
statetests[]results[]GET /api/clinic/labs/tests/{id}
Returns metadata about an individual lab test.
Create lab recommendations via Create a patient treatment plan.
Required OAuth scopes: clinic:write and labs:treatment_plans:create
Include a labs array with one or more tests from the labs catalog. Either recommendations or labs must be provided. Set lab_test_id to the variant UUID returned by the catalog API.
Activation options:
send_to_patient: true to activate the plan and send it to the patient in one stepstate: "draft" to create a draft plan, then activate it laterWhen the request includes labs, the response includes checkout_url, lab_checkout_status, and patient_lab_fields_needed so the patient can complete lab checkout. See the treatment plan object and create endpoint reference for request and response samples, checkout field details, and error responses.
Triggered when the patient purchases the lab.
{
"type": "order.placed",
"data": {
"line_items": [
{
"variant_id": "...",
"type": "labs" // Identify lab orders
}
]
}
}
Use this to detect lab purchases.
Triggered only when results become available or are amended. Does not trigger on purchase or appointment scheduling.
{
"type": "lab_order.updated",
"data": {
"lab_order": {
"id": "...",
"status": "all_results_received" | "results_received" | "results_amended"
}
}
}
You must poll the API to track state changes like purchased, processing, and appointment statuses.
ON THIS PAGE
RELATED TOPICS