Prescribing medications

Prescription medications can be requested on behalf of Capable Health Patients by using our partner telehealth platform MD Integrations (MDI). You can optionally fulfill these prescriptions using mail-order pharmacy Curexa, or using pharmacies located near your Patients. Below, we walk through the steps necessary to set up these integrations with Capable.

Please note that both MDI and Curexa provide sandbox credentials for testing. It is highly recommended to test the functionality of these integrations in your sandbox before using them in production.

Set up an account with MDI

First, you will need to create an account directly with MD Integrations.

Next, you’ll need to add the medications and compounds you want to make available for MDI to prescribe to your Patients in the MDI admin portal. To add the medications, you’ll need to provide information such as the medication strength, dispense unit, quantity, and directions for use.

When using MDI, there are two ways to prescribe medications: 1) Via doctors already present in MDI’s clinical network; or 2) via clinicians employed by your company, who can use the MDI practitioner portal to review Patient Cases. In either scenario, you will coordinate this part of the process directly with MDI.

Set up the integration with Capable

To create the integration between MDI and Capable Health, you first need to generate API credentials from your MDI admin portal. On the Partners page of your MDI portal, navigate to your company’s page and select the “Generate API Credentials” action.

Then, go to the Capable admin portal, to the Integrations page, and enter the MDI client ID and client secret you just generated. If you want to receive events based on activity in your MDI account, follow the instructions on the Capable admin portal to set up your MDI webhook.

Arrange for prescription fulfillment

When you create Patient Cases through Capable Health to prescribe medications, you’ll need to specify a pharmacy to fulfill the prescriptions. One option is to allow your users to search for a pharmacy convenient to them using our /mdi/pharmacies endpoint.

Another option is to use mail-order pharmacy Curexa, with whom Capable offers an integration. To use the integration, you need to create an account directly with Curexa. To set up a Capable Health-Curexa integration, enter your Curexa client ID and client secret in the Capable Health admin portal. In addition, use the Curexa pharmacy code when creating Patient Cases (see details below).

Create Products in the Capable portal

After you’ve created your medications in the MDI admin portal, you should add them as Products in Capable Health. A Product in Capable can be a prescription, an over-the-counter medication, or a physical good. In the case of prescriptions passed to MDI, specify the mdi_medication_id or mdi_compound_id when creating the Capable Product. You can find more details on the Products endpoint page. Please note that you can create Products in the Capable admin portal as well as via the API.

The main reason to add the medications as Products in Capable is that you can recommend Products to Patients using Capable Health Workflows.

Create Questionnaires in the Capable portal

The clinicians who will be prescribing medications on your behalf will likely need to review responses to surveys posed to your Patients. To gather and pass survey responses when creating a Patient Case, you’ll need to create Questionnaires in Capable Health. Please see the Questionnaires page in our docs for details.

There are a few features you can use when creating a Questionnaire in Capable that are specific to the integration with MDI:

  • Tagging a question as important: You may want to mark particular questions in a Questionnaire as critical for a clinician to review, such as those related to Patient allergies. In the MDI practitioner portal, a question can be made to appear in red font, indicating to the doctor reviewing the responses that this particular question is important to review. To cause a question to be marked in red in the MDI portal, add the following key-value pair to the metadata object of the relevant question in the Capable Questionnaire:
"important": true
How to mark a question as "important" on the Capable admin portalHow to mark a question as "important" on the Capable admin portal

How to mark a question as "important" on the Capable admin portal

  • Passing Attachments to MDI: Files possessed by the Patient, such as medical records, may be relevant when prescribing your medications. You can ask the Patient to upload such files in your Questionnaire using the steps below. By following these instructions, the Attachments will appear in the MDI practitioner portal in the patient view, for review by a doctor.

Creating Patient Cases

You are now almost ready to create a Patient Case! The remaining step is to ensure that you have all the necessary information on the Patient object. Below is the data that must be present on the Patient object to create a Patient Case:

  • First name
  • Last name
  • Birth date
  • A phone number marked as primary
  • A full street address marked as primary
  • Administrative gender (administrative_gender)

The Patient must also upload a photo of the front of their driver’s license. You can attach the photo to the Patient using the /attachments endpoint. After you upload the driver’s license Attachment in Capable, it will automatically be sent to MDI when you create the Patient Case.

Once the data above has been entered on the Patient object and the Patient has optionally completed a medical-intake Questionnaire, you can create the Patient Case using the /mdi/patient_cases endpoint.

Confirming medication orders

When using the Curexa integration to send medications via mail, you can optionally trigger new orders immediately after an MDI Patient Case has been completed. You can enable or disable automatic_order_creation in the Capable admin portal on the Curexa integration page, or via our API.

If you disable automatic_order_creation, you will need to manually confirm all Curexa orders. You may want to do this if you’d like to verify payment from each user after an MDI case has been completed.

If automatic_order_creation is disabled, Capable Health will instead create a Medication Order with an order_status of draft when an MDI Patient Case has been completed. To confirm the order, call the /medication_orders/{id}/confirm endpoint with the order ID. The order will then be sent to Curexa for fulfillment.

Handling medication refills

If a Patient is prescribed a medication that has refills, you’ll need to manually create a new order when it’s time for the Patient to receive one of the refills, regardless of whether automatic_order_creation is enabled. If you’re using our Curexa integration, use the /medication_orders POST endpoint to create a new order.

To create an order, at minimum you’ll need to pass the relevant patient_id and the patient_medication_ids, which can be retrieved via the /patient_medications endpoint (which is filterable by patient_id). The id attribute of each object received from the /patient_medications endpoint is the medication ID you’ll need to pass in the patient_medication_ids array.

❗️

Please note that you can only create a new Medication Order if the refills_left value on the Patient Medication object is greater than one.

When creating an order, you can optionally specify an order_status of draft. You may want to do this in order to trigger a Medication Order Create event from Capable, which could in turn prompt your system to charge the Patient. After verifying payment, you could confirm the order by calling the /medication_orders/{id}/confirm endpoint with the order ID.

🚧

If you don’t specify an order_status when calling the /medication_orders POST endpoint, an order will be placed with Curexa immediately.

After a new order has been placed, the refills_left attribute on the patient medication object (retrievable via the /patient_medications endpoint) will go down by one. Please note that this will only happen after an order has been confirmed — if an order has order_status of draft, the refills_left value will not go down by one.

Tracking the progress of Patient Cases

You can track the progress of Patient Cases throughout the MDI prescription approval process by subscribing to Capable Health webhook events.

If you use the Curexa integration, Capable Health will in turn send webhook events related to medication orders created and received by Curexa. Please note that for detailed information on order shipment and delivery, you can set up webhooks for your shipping partner (e.g., Shippo) in the Curexa portal. Once Curexa starts receiving information from a shipping partner, Capable Health will in turn pass tracking updates and information to you via medication orders webhook events.


Did this page help you?