Medication

Work with FHIR R4 4.0.1 Medication resources.

Choose an operation for this resource:

The diagram summarizes Medication requests and responses. See Supported FHIR REST Interactions for the shared interaction model.


A FHIR client sends requests to the DDFS R4 Medication API. Search returns a Bundle; create, read and update return a resource; vread returns one historical version; delete returns HTTP 204 without a body. Custom operations and FHIR-formatted errors can return OperationOutcome.

FHIR R4 definition: https://hl7.org/fhir/R4/medication.html. See interaction response codes and common error responses.

Interactions and responses

Medication capabilitySupport or requirement
Conditional createNot supported.
Conditional updateNot supported.
Transaction bundlesNot supported.

Example resource

For shared validation-error responses, see OperationOutcome errors.

Medication detailRequirement or behavior
StatusStatus, when present, is active, inactive, or entered-in-error.
Choice elementsEach ingredient requires exactly one itemCodeableConcept or itemReference.
ReferencesManufacturer references target Organization; ingredient references target Substance or Medication.
Contained resourcesContained references resolve in the entire container, including siblings and # back-references to an allowed container type.
ReferencesA declared reference type must agree with the resolved target.
Contained resourcesNarrative, extensions, modifier extensions, backbone IDs, primitive extensions, and supported contained resources are retained.
LimitationsContained Substance ingredients are preserved; this does not add a standalone Substance endpoint.
Contained resourcesEach contained member must be referenced or refer back to its container.
Contained resourcesA contained Medication or Substance that refers back to its container may omit its ID; that absence is preserved in current and historical responses.
Resource ruleEmpty batch elements are invalid; an extension-only batch is allowed.
Resource rulePrimitive metadata requires a lexical value or an extension; an ID alone does not supply a missing value.
{"resourceType":"Medication","identifier":[{"system":"https://example.test/medications","value":"med-001"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"860975"}]},"status":"active","ingredient":[{"itemCodeableConcept":{"text":"Metformin hydrochloride"},"isActive":true}],"batch":{"lotNumber":"synthetic-lot","expirationDate":"2027-01-01"}}

Permissions and limits

ItemRequirement or behavior
LimitationsConditional create, conditional update, and transaction bundles are not supported.
LimitationsR6 Medication is not supported.