> For the complete documentation index, see [llms.txt](https://docs.mdintegrations.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mdintegrations.com/partner/key-concepts/pharmacy-fulfillment.md).

# Pharmacy Fulfillment

After a physician approves a prescription, the pharmacy fulfillment model determines what happens next. Your pharmacy chooses which model it operates under, and that choice determines whether your team needs to build an order workflow at all. For standard Offerings, MDI transmits the electronic prescription through DoseSpot; Service Offerings instead follow a separate, partner-owned transmission path.

{% hint style="success" %}
When using Direct to Pharmacy (DTP), we will take care of both Rx and Order transmission for you.
{% endhint %}

The three fulfillment models below apply to DoseSpot and Service Offerings only — DTP, covered in the hint above, is handled separately.

### Choosing a fulfillment model

| Model                          | Pharmacy behavior                                        | Your responsibility                                       |
| ------------------------------ | -------------------------------------------------------- | --------------------------------------------------------- |
| **Prescription-driven**        | Fills automatically when it receives the e-prescription. | No order submission. Optionally sync tracking.            |
| **Order-driven**               | Waits for a separate order request.                      | Submit each initial and refill order.                     |
| **Partner-owned transmission** | MDI does not transmit Rx to the pharmacy.                | Retrieve clinical assets and route them to your pharmacy. |

#### Prescription-driven fulfillment

The pharmacy fills the prescription as soon as it receives the e-prescription, then bills your organization under whatever commercial agreement you already have in place with them.

Because there's no separate order step, you don't submit anything or manage an order status on your end. Some pharmacies do offer webhooks in this model, though, so you can still keep tabs on fulfillment and shipping updates even without owning the order itself.

#### Order-driven fulfillment

Here the pharmacy receives the prescription but holds off filling it until it also receives a separate commercial order from you — and that applies to both initial fills and refills, not just the first one.

{% stepper %}
{% step %}
**Receive the approval signal**

Listen for the `offering_submitted` webhook — it fires once the Encounter is approved and the prescription data is ready for you to act on.
{% endstep %}

{% step %}
**Validate pharmacy requirements**

Confirm you have every patient, prescriber, and order field your pharmacy requires before you try to submit anything.
{% endstep %}

{% step %}
**Map the prescription data**

Map the MDI data you received onto the pharmacy's order schema, using `dosespot_prescription_id` to link the commercial order back to the clinical prescription it fulfills.
{% endstep %}

{% step %}
**Submit the order**

Call the pharmacy's order endpoint, or submit through whatever operational workflow it supports — once that lands, the pharmacy can release the medication into its shipping queue.
{% endstep %}
{% endstepper %}

Not every pharmacy accepts orders the same way — some take API requests, others expect email manifests, portal entries, or CSV uploads. If your pharmacy relies on a manual process instead, your operations team submits the order by hand, but the `offering_submitted` webhook still tells you exactly when that order is ready to go.

See [Example: Mapping to LifeFile](/partner/key-concepts/pharmacy-fulfillment/partner-owned-transmission/example-mapping-to-lifefile.md) for a concrete order mapping.

{% hint style="info" %}
[Direct to Pharmacy (DTP)](/partner/key-concepts/pharmacy-fulfillment/direct-to-pharmacy-dtp.md) manages order-driven fulfillment for select pharmacies. Use it when you do not want to build integrations with different pharmacies on your own.
{% endhint %}

#### Partner-owned transmission

Some pharmacies simply don't support the Surescripts network, which means they need a custom transmission method instead. When that's the case, you'll configure a Service Offering and take on the transmission manually rather than relying on MDI's standard e-prescribing path.

In practice, that means your team retrieves the clinical assets from MDI and routes them into your own pharmacy workflow. See [Partner-Owned Transmission](/partner/key-concepts/pharmacy-fulfillment/partner-owned-transmission.md) for the full setup and retrieval steps.

### Confirming the right model

Ask your pharmacy:

1. Do you fill automatically after receiving an e-prescription?
2. If not, do you require an API, EDI, portal, or email order?
3. Is [Direct to Pharmacy (DTP)](/partner/key-concepts/pharmacy-fulfillment/direct-to-pharmacy-dtp.md) available for this pharmacy?
4. If no native integration exists, can your team own prescription transmission?

Your MDI account team can confirm whether Direct to Pharmacy is available for your specific pharmacy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mdintegrations.com/partner/key-concepts/pharmacy-fulfillment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
