---
title: "MedicationStatement"
canonical: "https://wiki.patientsknowbest.com/space/api/3363832025/MedicationStatement"
format: markdown
---
[https://www.hl7.org/fhir/STU3/medicationstatement.html](https://www.hl7.org/fhir/STU3/medicationstatement.html)

## Status

In development. API spec subject to change.

## Overview

Each [[Medication]] in PKB will map to a single FHIR MedicationStatement.

## Relevant PKB entities

- [[[Medication]]](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3363700789/Data+Model#Medication)

## Endpoints

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Interaction | HTTP | URL | Supported Parameters | Permitted User Types | Description | Examples ( [more](http://dev.patientsknowbest.com/home/fhir-api/fhir-api-roadmap/fhir-api-roadmap-medicationstatement/examples) ) |
| [search](https://www.hl7.org/fhir/STU3/http.html#search) | GET | /MedicationStatement | - **patient.**  Required. Multi-value support: none. Modifier support: [<type>].
- **_revinclude** =Provenance:target | - Patient
- Professional | Search for a specific patient's medications. | /MedicationStatement?patient=Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a |

## Mappings

|  |  |  |
| --- | --- | --- |
| FHIR | PKB | Notes |
| Resource id | [[Medication.Data Point ID]] |  |
| Resource meta | - meta: Meta
  - lastUpdated = [[Data Pint.Persisted Timestamp]]
  - security: Coding
    - system =  "[http://fhir.patientsknowbest.com/codesystem/privacy-label](http://fhir.patientsknowbest.com/codesystem/privacy-label)"
    - code = [[Data Point.Privacy Label]]<br>[[Data Point.Privacy Label]] code mappings (PKB → FHIR):<br>- GENERAL_HEALTH → GENERAL_HEALTH
- MENTAL_HEALTH → MENTAL_HEALTH
- SEXUAL_HEALTH → SEXUAL_HEALTH
- SOCIAL_CARE → SOCIAL_CARE |  |
| MedicationStatement.status | - extension[x]: Extension
  - url =  "[http://hl7.org/fhir/StructureDefinition/data-absent-reason](http://hl7.org/fhir/StructureDefinition/data-absent-reason)"
  - valueCode =  "unknown" |  |
| MedicationStatement.medicationReference | Add a contained Medication resource to the response...<br>- Medication.code = [[Medication.Substance]]<br>...and reference from the medicationReference element.<br>- medicationReference: Reference
  - reference = a reference to the contained Medication resource |  |
| MedicationStatement.effectivePeriod | - effectivePeriod: Period
  - start = [[Medication.Start Timestamp]]
  - end = [[Medication.End Timestamp]] |  |
| MedicationStatement.subject | - subject: Reference
  - reference = the relative URL of the Patient resource
  - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]] |  |
| MedicationStatement.taken | "y" | PKB currently only tracks medications that the patient is taking / has taken; we do not track negative assertions that a medication is not being / was not taken. |
| MedicationStatement.dosage | - dosage[0]: Dosage
  - text = [[Medication.Frequency Text]]
  - patientInstruction = [[Medication.Instructions]]
  - timing: Timing
    - <conditional>
    - If [[Medication.Frequency Priority]] != AS_DIRECTED AND != AS_NEEDED:
      - repeat: Element
        - frequency =  1
        - period = [[Medication.Frequency Value]]
        - periodUnit = [[Medication.Frequency Units]]
    - Else If [[Medication.Frequency Priority]] == AS_DIRECTED:
      - code: CodeableConcept
        - text =  "As directed"
    - Else:
      - Omit the "code" element
  - <conditional>
  - If [[Medication.frequencyPriorityCode]] == AS_NEEDED:
    - asNeededBoolean = true
  - Else:
    - Omit the "asNeededBoolean" element
  - doseQuantity: SimpleQuantity
    - value = [[Medication.Dose Value]]
    - unit = [[Medication.Dose Units]] {coding[0] - display}
    - system = [[Medication.Dose Units]] {coding[0] - system}
    - code = [[Medication.Dose Units]] {coding[0] - code}<br>[[Medication.Frequency Unit]] code mappings (PKB → FHIR):<br>- HOUR → h |  |