Page Status: updated 2026-01-23
NLLGetLatesteDispense
Introduction
Links to profile documentation pages
[base]/MedicationRequest?_query=latest-dispense
This operation does NOT change content
This operation is a named Query
Parameters (In)
| Name | Cardinality | Type | Binding | Documentation |
|---|---|---|---|---|
| patient | 0..1 | Reference | The patient whose prescriptions are to be retrieved. Use of this parameter precludes the use of the _id parameter within the same request. | |
| _id | 0..* | string | A comma‑separated list of one or more prescription identifiers (MedicationRequest IDs). | |
| status | 0..* | ValueSet | medication-request-status (required) | A comma‑separated list of prescription status values that may be used in combination with a patient reference. |
| authoredon | 0..1 | Range | 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)
| Name | Cardinality | Type | Documentation |
|---|---|---|---|
| return | 1..1 | Bundle | 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