---
title: Retrieve Medication Statement
slug: retrieve-medication-statement
docTags: 
createdAt: 2023-10-03T13:39:34.312Z
---

Retrieve a patient's medication history, including current and past medications. Access details on medication names, dosage, frequency, and adherence. Ideal for tracking a patient's medication adherence and ensuring safe prescribing practices.

To access this clinical data you'll need the patient identifier, obtainable through the [Retrieve Patient](docId:8OPknnbMTaZ47Rk5HkDD3) interaction.

### Interaction

Retrieving the list of medication statements can be done by sending a **GET** request. The request is sent to the MedicationStatement endpoint:

`https://api.<region>.founda.com/1/organizations/<org-x>/fhir/4/MedicationStatement?<parameters>`

Where `<region>` should be defined according to the different Founda [regions](docId\:ncFf15xNu1WGlST2wNm-P) and `<org-x>` should be replaced with the Healthcare Provider's organization ID that you are integrated with.&#x20;

The response contains a Bundle with 0, 1 or N matching MedicationStatements. The full MedicationStatement resource can be retrieved with the identifier of the selected MedicationStatement from the result set.&#x20;

### Profile

Founda adheres to recognized standards (IHE, HL7 FHIR) to ensure compatibility and harmonization among diverse systems. If there is a profile available for an interaction, it is recommended and preferred to follow the prescribed transactions.

The Retrieve MedicationStatement interaction with the Founda Platform is based on the [IHE QEDm profile](https://www.ihe.net/uploadedFiles/Documents/PCC/IHE_PCC_Suppl_QEDm.pdf). To indicate that the request and response should comply with PCC-44, the `_profile` parameter should be included to the search set: `.../MedicationStatement?_profile=https://profiles.ihe.net/ITI/QEDm`.

### Parameters

In order to comply with the PCC-44 transaction, the interaction should at least support the parameter in the table below. Additional search parameters, as defined in the [FHIR MedicationStatement](http://hl7.org/fhir/medicationstatement.html) resource, can be used as well.&#x20;

| **Parameters combination**                             | **Type**              | **Required** | **Description**                                                                                                         |
| ------------------------------------------------------ | --------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `patient`                                              | `reference`           | Yes          | The patient to search data for                                                                                          |
| `patient` + `_include=MedicationStatement::medication` | `reference` + `token` |              | The patient to search data for + the parameter for specifying if medication resource should be included in the response |

### Example API call

::::CodeDrawer{title="Retrieve MedicationStatement for Patient" isResponseExpanded="true" autoGeneratedAnchorSlug="retrieve-medicationstatement-for-patient" legacyHash="IpQ_YBC8O4CrUDYcWXrj4"}
:::CodeblockTabsExamples
```curl
curl --location 'https://api.eu.founda.com/1/health/organizations/org-4c5739ba994d4ce9b5255d3f84a2d367/fhir/4/MedicationStatement?patient=2078&_profile=https%3A%2F%2Fprofiles.ihe.net%2FITI%2FQEDm%2F' \
--header 'Authorization: Bearer ory_at_T_sx5CEqgi37wTaptEkGAV9Ggsg4UCzrzOc4Xe29Sto.jfqRUlKTeevVwUmPD6djKD2lAWDh5vRMfIf0PKpNQsU' \
--data ''
```
:::

:::CodeblockTabsResponses
```javascript
{
    "resourceType": "Bundle",
    "id": "0b51337e-9720-4b19-9e8b-2c8445b5dd1f",
    "meta": {
        "lastUpdated": "2023-10-17T09:21:21.791+00:00"
    },
    "type": "searchset",
    "total": 1,
    "link": [
        {
            "relation": "self",
            "url": "https://api.eu.founda.com/1/health/organizations/org-4c5739ba994d4ce9b5255d3f84a2d367/fhir/4/MedicationStatement?patient=2078&_profile=https://profiles.ihe.net/ITI/QEDm/"
        }
    ],
    "entry": [
        {
            "fullUrl": "https://api.eu.founda.com/1/health/organizations/org-4c5739ba994d4ce9b5255d3f84a2d367/fhir/4/MedicationStatement/2170",
            "resource": {
                "resourceType": "MedicationStatement",
                "id": "2170",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2023-10-05T14:29:20.398+00:00",
                    "source": "#X5KK1IIWvYYIB9fS",
                    "tag": [
                        {
                            "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
                            "code": "HTEST",
                            "display": "test health data"
                        }
                    ]
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example001</p><p><b>contained</b>: </p><p><b>identifier</b>: 12345689 (OFFICIAL)</p><p><b>status</b>: active</p><p><b>category</b>: Inpatient <span>(Details : {http://terminology.hl7.org/CodeSystem/medication-statement-category code 'inpatient' = 'Inpatient', given as 'Inpatient'})</span></p><p><b>medication</b>: id: med0309; Tylenol PM <span>(Details : {http://hl7.org/fhir/sid/ndc code '50580-506-02' = 'n/a', given as 'Tylenol PM'})</span>; Film-coated tablet (qualifier value) <span>(Details : {SNOMED CT code '385057009' = 'Film-coated tablet', given as 'Film-coated tablet (qualifier value)'})</span></p><p><b>subject</b>: <a>Donald Duck</a></p><p><b>effective</b>: 23/01/2015</p><p><b>dateAsserted</b>: 22/02/2015</p><p><b>informationSource</b>: <a>Donald Duck</a></p><p><b>derivedFrom</b>: <a>MedicationRequest/medrx002</a></p><p><b>reasonCode</b>: Restless Legs <span>(Details : {SNOMED CT code '32914008' = 'Restless legs', given as 'Restless Legs'})</span></p><p><b>note</b>: Patient indicates they miss the occasional dose</p><p><b>dosage</b>: </p></div>"
                },
                "contained": [
                    {
                        "resourceType": "Medication",
                        "id": "med0309",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://hl7.org/fhir/sid/ndc",
                                    "code": "50580-506-02",
                                    "display": "Tylenol PM"
                                }
                            ]
                        },
                        "form": {
                            "coding": [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "385057009",
                                    "display": "Film-coated tablet (qualifier value)"
                                }
                            ]
                        },
                        "ingredient": [
                            {
                                "itemCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                                            "code": "315266",
                                            "display": "Acetaminophen 500 MG"
                                        }
                                    ]
                                },
                                "strength": {
                                    "numerator": {
                                        "value": 500,
                                        "system": "http://unitsofmeasure.org",
                                        "code": "mg"
                                    },
                                    "denominator": {
                                        "value": 1,
                                        "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                                        "code": "Tab"
                                    }
                                }
                            },
                            {
                                "itemCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                                            "code": "901813",
                                            "display": "Diphenhydramine Hydrochloride 25 mg"
                                        }
                                    ]
                                },
                                "strength": {
                                    "numerator": {
                                        "value": 25,
                                        "system": "http://unitsofmeasure.org",
                                        "code": "mg"
                                    },
                                    "denominator": {
                                        "value": 1,
                                        "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                                        "code": "Tab"
                                    }
                                }
                            }
                        ],
                        "batch": {
                            "lotNumber": "9494788",
                            "expirationDate": "2017-05-22"
                        }
                    }
                ],
                "identifier": [
                    {
                        "use": "official",
                        "system": "http://www.bmc.nl/portal/medstatements",
                        "value": "12345689"
                    }
                ],
                "status": "active",
                "category": {
                    "coding": [
                        {
                            "system": "http://terminology.hl7.org/CodeSystem/medication-statement-category",
                            "code": "inpatient",
                            "display": "Inpatient"
                        }
                    ]
                },
                "medicationReference": {
                    "reference": "#med0309"
                },
                "subject": {
                    "reference": "Patient/2078",
                    "display": "Donald Duck"
                },
                "effectiveDateTime": "2015-01-23",
                "dateAsserted": "2015-02-22",
                "informationSource": {
                    "reference": "Patient/2078",
                    "display": "Donald Duck"
                },
                "derivedFrom": [
                    {
                        "reference": "MedicationRequest/2148"
                    }
                ],
                "reasonCode": [
                    {
                        "coding": [
                            {
                                "system": "http://snomed.info/sct",
                                "code": "32914008",
                                "display": "Restless Legs"
                            }
                        ]
                    }
                ],
                "note": [
                    {
                        "text": "Patient indicates they miss the occasional dose"
                    }
                ],
                "dosage": [
                    {
                        "sequence": 1,
                        "text": "1-2 tablets once daily at bedtime as needed for restless legs",
                        "additionalInstruction": [
                            {
                                "text": "Taking at bedtime"
                            }
                        ],
                        "timing": {
                            "repeat": {
                                "frequency": 1,
                                "period": 1,
                                "periodUnit": "d"
                            }
                        },
                        "asNeededCodeableConcept": {
                            "coding": [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "32914008",
                                    "display": "Restless Legs"
                                }
                            ]
                        },
                        "route": {
                            "coding": [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "26643006",
                                    "display": "Oral Route"
                                }
                            ]
                        },
                        "doseAndRate": [
                            {
                                "type": {
                                    "coding": [
                                        {
                                            "system": "http://terminology.hl7.org/CodeSystem/dose-rate-type",
                                            "code": "ordered",
                                            "display": "Ordered"
                                        }
                                    ]
                                },
                                "doseRange": {
                                    "low": {
                                        "value": 1,
                                        "unit": "TAB",
                                        "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                                        "code": "TAB"
                                    },
                                    "high": {
                                        "value": 2,
                                        "unit": "TAB",
                                        "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                                        "code": "TAB"
                                    }
                                }
                            }
                        ]
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        }
    ]
}
```
:::
::::

