The FHIR R4 MedicationDispense resource represents the actual dispensing of medication to a patient. It includes information about the medication, dosage, performer, and when and where the dispensing occurred. This resource is typically populated from pharmacy data sources.
Health Gorilla exposes MedicationDispense as part of its FHIR R4 API to support patient-centric access to pharmacy dispensing history.
Use Cases
- Tracking which prescriptions have been dispensed and when
- Verifying whether a patient filled a medication order before a follow-up
- Viewing dispensing location and pharmacy instructions
Scope and Behavior
This documentation describes the FHIR R4 API interface for MedicationDispense. Health Gorilla’s platform may use additional internal services and data standards to acquire, normalize, and route pharmacy data. Only the FHIR R4–exposed behavior is documented here.
Health Gorilla supports a subset of the HL7 FHIR R4 MedicationDispense resource. Not all optional elements defined in the HL7 specification may be stored, indexed, or returned. Unsupported or unrecognized elements may be ignored or normalized during processing.
In Health Gorilla, MedicationDispense is most commonly accessed as part of patient record retrieval workflows, where pharmacy dispensing data may be aggregated from connected sources and normalized for longitudinal medication review.
Authentication
All requests to the FHIR R4 API require OAuth 2.0 authentication using a bearer token. Unauthorized requests return 401 Unauthorized responses.
Required Scopes
medicationdispense.readfor GETmedicationdispense.writefor POST, PUT, DELETE
For more information, go to: OAuth 2.0 Authentication.
Search Behavior
Searches are scoped to the authenticated tenant. The patient parameter is required for patient-scoped searches and is recommended for most search use cases.
Results are returned as a FHIR Bundle. Pagination may be applied. Use standard FHIR pagination links (Bundle.link) to retrieve additional result pages.
Note: The parameters listed below are not exhaustive and reflect commonly used fields in typical Health Gorilla workflows. Supported parameters and behavior may vary by configuration.
Frequently Used Search Parameters
| Parameter | Description | Example Values | FHIR Data Type |
|---|---|---|---|
patient | Filters by patient | Patient/{id} | Reference |
status | Filters by dispense status | completed, in-progress | token |
whenhandedover | Filters by when medication was handed over | ge2023-01-01 | date |
medication | Filters by medication code | RxNorm code | token |
performer | Filters by performer | Practitioner/{id} | Reference |
authorizing-prescription | Filters by associated prescription | MedicationRequest/{id} | Reference |
Commonly Returned Resource Attributes
| Attribute | Description | Example Values | FHIR Data Type |
|---|---|---|---|
id | Unique FHIR ID for the dispense record | dsp-123456 | id |
status | Dispense status | completed, cancelled | code |
medicationCodeableConcept | Medication dispensed | Atorvastatin 20 MG Oral Tablet | CodeableConcept |
subject | Patient who received the medication | Patient/{id} | Reference(Patient) |
whenHandedOver | Date/time medication was given to the patient | 2024-03-15T10:30:00-07:00 | dateTime |
quantity | Quantity dispensed | 30 tablets | Quantity |
daysSupply | Number of days supply should cover | 30 | Quantity |
performer | Performer details for the dispense | Structured performer entries | BackboneElement[] |
authorizingPrescription | Prescription authorizing the dispense | MedicationRequest/{id} | Reference[] |
dosageInstruction | Instructions for taking the medication | Structured dosage entries | Dosage[] |
Notifications
The FHIR R4 API does not provide direct resource-change subscriptions for MedicationDispense. Changes to dispensing information may surface through broader notification workflows, depending on enabled Health Gorilla products and configuration.
Error Handling
All MedicationDispense operations follow standard Health Gorilla error handling, including use of FHIR OperationOutcome for structured responses. For more information, go to: Error Handling.

