Ordering lab tests for patients

At-home Lab Test kits can be ordered on behalf of Capable Health Patients by using partners such as Ash Wellness. Lab Test providers fulfill the at-home tests and send order updates to Capable Health once a Patient has sent in the necessary sample. Order details and updates are available in the Capable portal, and relevant webhook events are emitted, both to any webhook endpoints you’ve set up in Capable and to a customer data platform (CDP), if you have connected one to Capable. Check out our high-level diagram for the latest integrations we support.

Below, we walk through the steps necessary to set up the Ash Wellness integration.

🚧

Testing Lab Test integrations

Ash Wellness and other partners provide sandbox credentials for testing. We highly recommend testing the functionality of these integrations in your sandbox environment before using them in production.

Set up an account and integration with Ash Wellness

First, you’ll need to create an account directly with Ash Wellness.

Once you receive your sandbox and production API credentials from Ash Wellness, go to the Capable portal in both environments, navigate to the Integrations page, and enter the Partner ID and Access Token you received.

Once the integration has been activated, Capable will automatically create a webhook endpoint that will receive events from Ash Wellness based on Lab Test Order activity. A list of the Lab Test Order events can be found on our Events page.

📘

Please note: As of December 2022, Ash Wellness does not support the shipped_to_lab and delivered_to_patient order statuses. As a result, events with those statuses will not be sent if you're using the Ash Wellness integration.

Create Products in the Capable portal

Next, you’ll need to create the Products in Capable Health that you want to make available for your Patients to order. To add the Lab Test Product(s), you’ll need to enter details such as name, external product type, and external ID through the Capable Portal.

Each Product must have a “Retail Price” when using Capable’s Stripe integration for payments. A link or ID of a relevant content asset can be stored in the “CMS Entry” field. Products support tagging.

❗️

When creating Lab Test Products for the Ash Wellness integration, make sure the “External Product Type” is “Ash Wellness Lab Test” and the “External ID” contains the exact SKU of the lab test product provided by Ash Wellness.

Creating a Lab Test Order

To create and place a Lab Test Order with the Capable API, you’ll need the patient_id and the product_id. You can use our Patients and Products API endpoints to retrieve these IDs.

Once you have the patient_id and the product_id, use the POST Lab Test Order endpoint to create a new order.

To place the order immediately, set the boolean parameter place_order to true. If you want to create the order in draft form — in order to collect payment by the user first, for instance — you can set place_order to false. To confirm a draft Lab Test Order, use the POST /lab_test_orders/{id}/confirm endpoint.

🚧

Please note: The product_ids parameter must be an array, but the API currently accepts only one Product ID per Lab Test Order.

Creating replacement Lab Test Orders

If you ever need to create a replacement Lab Test Order for a Patient, you can use the designated endpoint with the original_order_id as a path variable.

If you’d like to save the original_order_id, you can add it in the metadata along with the request.