MedicationDispense

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.read for GET
  • medicationdispense.write for 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

ParameterDescriptionExample ValuesFHIR Data Type
patientFilters by patientPatient/{id}Reference
statusFilters by dispense statuscompleted, in-progresstoken
whenhandedoverFilters by when medication was handed overge2023-01-01date
medicationFilters by medication codeRxNorm codetoken
performerFilters by performerPractitioner/{id}Reference
authorizing-prescriptionFilters by associated prescriptionMedicationRequest/{id}Reference

Commonly Returned Resource Attributes

AttributeDescriptionExample ValuesFHIR Data Type
idUnique FHIR ID for the dispense recorddsp-123456id
statusDispense statuscompleted, cancelledcode
medicationCodeableConceptMedication dispensedAtorvastatin 20 MG Oral TabletCodeableConcept
subjectPatient who received the medicationPatient/{id}Reference(Patient)
whenHandedOverDate/time medication was given to the patient2024-03-15T10:30:00-07:00dateTime
quantityQuantity dispensed30 tabletsQuantity
daysSupplyNumber of days supply should cover30Quantity
performerPerformer details for the dispenseStructured performer entriesBackboneElement[]
authorizingPrescriptionPrescription authorizing the dispenseMedicationRequest/{id}Reference[]
dosageInstructionInstructions for taking the medicationStructured dosage entriesDosage[]

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.

Additional Resources

HL7 FHIR MedicationDispense