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:
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.
Labs are added to treatment plans under the lab_recommendations array.
Once a draft treatment plan is created, you must activate it:
PATCH /api/clinic/treatment_plans/{treatment_plan_id}/activate
This will make the plan visible to the patient and enable lab purchase.
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"
    }
  }
}
Note: all_results_received maps to the results_ready state and results_received maps to the partial_results state on lab orders.
You must poll the API to track state changes like purchased, processing, and appointment statuses.