AnpherosAnpheros PlatformDevelopers

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no cardYour first API call in 2 minutes →

FHIR R4 MedicationStatement example

MedicationStatement says a person is taking, or took, a medicine. The medicine itself goes in medicationCodeableConcept (or a reference to a Medication resource); the schedule goes in dosage.

The MedicationStatement in JSON

{
  "resourceType": "MedicationStatement",
  "id": "metformin",
  "status": "active",
  "medicationCodeableConcept": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "6809",
        "display": "metformin"
      },
      {
        "system": "http://www.whocc.no/atc",
        "code": "A10BA02",
        "display": "metformin"
      }
    ],
    "text": "Metformin 500 mg tablet"
  },
  "subject": {
    "reference": "Patient/example",
    "display": "Jane Doe"
  },
  "effectivePeriod": {
    "start": "2021-03-20"
  },
  "dateAsserted": "2026-10-01",
  "dosage": [
    {
      "text": "500 mg twice a day with meals",
      "timing": {
        "repeat": {
          "frequency": 2,
          "period": 1,
          "periodUnit": "d"
        }
      },
      "route": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "26643006",
            "display": "Oral route"
          }
        ]
      },
      "doseAndRate": [
        {
          "doseQuantity": {
            "value": 500,
            "unit": "mg",
            "system": "http://unitsofmeasure.org",
            "code": "mg"
          }
        }
      ]
    }
  ]
}

Validator result: raw JSON · open the validator

The elements that matter

ElementCardinalityNotes
status1..1active, completed, stopped and others.
medication[x]1..1medicationCodeableConcept or medicationReference; the name medication alone does not exist.
subject1..1The patient.
effective[x]0..1When the medicine is or was taken.
dosage0..*Text for people, timing and dose for software.

RxNorm 6809 is the ingredient; product-level RxNorm codes name strength and form. ATC A10BA02 is the WHO classification used across Europe.

The full definition is in the FHIR R4 MedicationStatement specification.

Common mistakes and the errors they cause

Medication without the type suffix

Choice elements carry their type in the name: medicationCodeableConcept.

No medication at all

medication[x] is 1..1.

Missing status

MedicationStatement.status is 1..1.

Store it in a real FHIR R4 serverA free sandbox key gives you 30 synthetic patients and the full API, including POST /fhir/R4/MedicationStatement and $validate.
Get a free API key

More examples

Related guides

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no cardYour first API call in 2 minutes →

Product updates by email

New features, guides and the end of the beta. One email a month at most.

Send me occasional Anpheros Platform updates by email (new features, API changes, guides). I'll confirm by email and can unsubscribe in one click from any email. Privacy