Page Status: updated 2026-01-23

NLLGetLatesteDispense

Introduction

[base]/MedicationRequest?_query=latest-dispense

This operation does NOT change content

This operation is a named Query

Parameters (In)

NameCardinalityTypeBindingDocumentation
patient0..1Reference

The patient whose prescriptions are to be retrieved. Use of this parameter precludes the use of the _id parameter within the same request.

_id0..*string

A comma‑separated list of one or more prescription identifiers (MedicationRequest IDs).

status0..*ValueSetmedication-request-status (required)

A comma‑separated list of prescription status values that may be used in combination with a patient reference.

authoredon0..1Range

Specifies the authoredOn date used for date‑based filtering of prescriptions. When provided, it defines the earliest date from which prescriptions shall be included. The parameter may be supplied on its own to indicate a start date, or together with an upper bound to express a date interval.

Example: ?authoredon=ge2023-01-01&authoredon=le2024-01-01

Return Values (Out)

NameCardinalityTypeDocumentation
return1..1Bundle

A Bundle containing prescriptions (MedicationRequest), the most recent dispense (MedicationDispense) for each prescription, and, when requested, Provenance resources associated specifically with the prescriptions.

The query always returns the prescription (MedicationRequest) together with its most recent dispense (MedicationDispense).

Clients may optionally request the inclusion of Provenance related to both the prescription and the dispense. The server may obtain these related resources using FHIR Search reverse‑include expressions, such as _revinclude=Provenance:target:MedicationRequest to include prescribing Provenance, and _revinclude:iterate=Provenance:target:MedicationDispense to include dispense‑related Provenance. These expressions illustrate one possible retrieval approach and are not formal operation parameters.

Example:

_revinclude=MedicationDispense:prescription
&_revinclude=Provenance:target:MedicationRequest
&_revinclude:iterate=Provenance:target:MedicationDispense

This named query is invoked as: GET [base]/MedicationRequest?_query=latest-dispense