Search MedicationRequest

Search MedicationRequest using FHIR R4 4.0.1.

Resource category: MedicationRequest.

Endpoint

MethodEndpoint
GET/api/fhir/r4/MedicationRequest
POST/api/fhir/r4/MedicationRequest/_search

Use the R4 base URL from your DDFS instance. Send Authorization: Bearer <access-token> and accept application/fhir+json.

GET uses query parameters. POST search uses the same supported parameters in an application/x-www-form-urlencoded body and requires the same search permission. Follow the server-provided Bundle.link URL with relation next unchanged. See shared search controls.

Parameters

ParameterLocationRequiredTypeDescription
identifierQuery or form bodyNotokenTop-level identifiers, using one unmodified token: value, system|value, |value, or system|. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/clinical-identifier.
_countQuery or form bodyNonumberLimit the number of matches returned per page. See shared search controls for supported values and count-only behavior.
_totalQuery or form bodyNotokenRequest supported total handling; the control name does not imply support for every FHIR total mode.
_idQuery or form bodyNotokenLogical resource ID, using the current service ID contract. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/Resource-id.
intentQuery or form bodyNotokenOne unmodified R4 intent token. The implicit system is http://hl7.org/fhir/CodeSystem/medicationrequest-intent; use a code, system|code, or system|. An explicit no-system token such as |order does not match. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/MedicationRequest-intent.
_lastUpdatedQuery or form bodyNodateLast modification time; up to two repeated date bounds. Definition: ddfs-r4-last-updated-date.json.
_profileQuery or form bodyNouriFilter by profile URI. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/Resource-profile.
_tagQuery or form bodyNotokenFilter by a resource metadata tag. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/Resource-tag.
codeQuery or form bodyNotokenOne unmodified token in the inline medicationCodeableConcept. This does not look up a referenced Medication's code. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/clinical-code.
patientQuery or form bodyNoreferencePatient subject reference, including the :identifier modifier; Group subjects are not patient matches. Definition: ddfs-r4-patient-reference-identifier-modifier.json.
statusQuery or form bodyNotokenOne unmodified R4 status token. The implicit system is http://hl7.org/fhir/CodeSystem/medicationrequest-status; use a code, system|code, or system|. An explicit no-system token such as |active does not match. Canonical parameter URI: http://hl7.org/fhir/SearchParameter/MedicationRequest-status.
medicationQuery or form bodyNoreferenceMedication reference, including the :identifier modifier. Definition: ddfs-r4-medication-reference-identifier-modifier.json.
authoredonQuery or form bodyNodateMedicationRequest.authoredOn dateTime using eq, ne, gt, lt, ge, le, sa, eb, or ap. Up to two repeated AND values; comma alternatives are unsupported. Definition: ddfs-r4-authoredon-date.json.
_revincludeQuery or form bodyNospecialAllowed values: Provenance:target. Matching Provenance read permission is also required.

Authorization

ContextResource scope
Resource-server definition / issued tokensystem/MedicationRequest.s
Client grant / token requestddfssystem/MedicationRequest.s

Resource constraints still apply. Use the least privilege needed for this operation; see authentication and scope configuration.

Behavior

Return matching MedicationRequest resources in a searchset Bundle. Filters and caller constraints determine which matches can be returned. Do not infer unsupported modifiers, chains, repeated values or result-control modes from the base FHIR specification.

Example Request

Replace the example logical IDs, version IDs and connection values with values for your workflow.

GET /api/fhir/r4/MedicationRequest?patient=Patient/{patient-id}&status=active&code=860975&authoredon=ge2026-01-01&authoredon=lt2027-01-01

Responses

Successful statusMeaning
200A searchset Bundle.

For common error statuses and FHIR-formatted error bodies, see OperationOutcome errors. Authentication/authorization responses follow the shared policy; a protected resource can be concealed as 404. See also interaction responses.