Medications Data Use Cases
This guidance has been designed to aid in the development of systems which wish to harness the UK Core (based on the R4 version) of the HL7 FHIR standard.
It currently aims to cover the following use-cases:
See Interactions for guidance on API interactions to implement each use case described in this guide.
See Examples for each use case described in this guide.
Query for 'Current' Medication
Most medicines use cases require the clinician to obtain a picture of the patient's current medication. Today, the patient's GP record is the most complete record of current medication. This data is made available in four ways;
- Directly by the clinical staff within the patient's GP practice
- In summary form uploaded [in England] to the NHS Summary Care Record
- Via the IM1 pairing integration
- Via the GPConnect API.
The strategic direction for medicines interoperability is the implementation of regional Integrated Care Systems (ICS) and/or Shared Medication Records. It is expected that every ICS or Shared Medication Record integrates with GPConnect to obtain the GP record of current medication, combining that data with other medicines data coming from other provider systems.
Where a region does not yet have an ICS or Shared Medication Record that integrates with GPConnect data, consuming systems can query GPConnect directly to retreive the GP's view of 'current' medication.
The consuming system wanting a view of 'current' medication should query the regional Integrated Care System (ICS) or Shared Medication Record to pull back the patient's current medication. This could be returned as a FHIR List or FHIR Bundle of MedicationStatement
resources. It would also be valid to return the transactional FHIR resources of MedicationRequest
and MedicationDispense
. See implementation options below.
Applicable FHIR resources: MedicationStatement
, and optionally MedicationRequest
and MedicationDispense
Definition of 'Current' Medication
Suggested Criteria:
- Medication where
MedicationStatement.effectiveDateTime
orMedicationStatement.effectivePeriod.start
is in the past 12 months. - Medication prescribed where
MedicationRequest.authoredOn
is in the past 12 months and theintent
isorder
. - Medication supplied/dispensed where
MedicationDispense.whenPrepared
orMedicationDispense.whenHandedOver
is in the past 12 months. - Resources where
status
isactive
orcomplete
.
Implementation Options
Option: Where is 'current' determined?
There are three architectural options for where 'current' medication is determined:
- By the ICS / shared record via an end-point to return only current medication
- By the consuming system, first by querying for a subset of medication records from the ICS / shared record, then applying further logic to determine what is 'current'
- By the consuming system, querying for all medication records, then applying further logic to determine what is 'current'.
For option 1, a query to an end-point to return only current medication for a given patient may look like this;
GET [base]/currentmedication?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|{NHS_Number}
For example;
GET https://myfhirserver.net/currentmedication?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|123543254
For Options 2 and 3, the FHIR standard includes various ways to search for resources. The following search parameters for these resources defined within the FHIR standard could be useful when querying for current medication.
MedicationStatement
- subject[patient].identifier
- status (where
active
orcomplete
) - effective (will pick up either effectiveDateTime or effectivePeriod)
For example;
GET [base]/MedicationStatement?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|123543254&status=active,complete&effective=ge2020-05-11
MedicationRequest
- subject[patient].identifier
- status (where
active
orcomplete
) - intent (where
order
) - authoredOn
For example;
GET [base]/MedicationRequest?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|123543254&status=active,complete&intent=order&authoredOn=ge2020-05-11
MedicationDispense
- subject[patient].identifier
- status (where
active
orcomplete
) - whenPrepared
For example;
GET [base]/MedicationDispense?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|123543254&status=active,complete&whenPrepared=ge2020-05-11
Option: What type FHIR resources are returned?
There are four architectural options for which FHIR resources are returned:
- Only
MedicationStatement
resources - Only
MedicationStatement
resources but includingbasedOn
referencedMedicationRequest
resources for prescribed medication - A combination of
MedicationRequest
for prescribed medication withMedicationStatement
resources for non-prescription supply - A combination of
MedicationRequest
for prescribed medication,MedicationStatement
resources for non-prescription supply andMedicationDispense
resources.
The decision for which resources to return will primarily be dictated by the level of data required by consumer systems. The MedicationStatement
resource can summarise data contained within MedicationRequest
and MedicationDispense
resources. For many use cases, the level of detail available within a MedicationStatement
resource will be sufficient.
It would be feasible to build an initial implementation of the query for current medication to return only MedicationStatement
resources. This can be extended in a future build to return the more detailed resources if/when these are required to support additional and more complex consumer use cases.
Supply of Medication
Primary Care / Community Supply
Applicable for the following use cases;
- Primary Care, Community Care and Urgent and Emergency Care (UEC) medication requests to community pharmacy (aka an
FP10
in England orGP10
in Scotland). - Outpatient medication requests to be dispensed by a Community Pharmacy (aka an
FP10HNC
). - Outpatient medication requests to a contracted Outpatient pharmacy.
- Outpatient medication requests to a Homecare medicines provider.
View the England EPS guidance
Secondary Care
Applicable for the following use cases;
- Inpatient medication requests, for a named patient, to be dispensed by the hospital pharmacy and intended for administration on a hospital ward.
- Medication requests, for a named patient who is on short-term leave from an inpatient stay (but is not discharged), to be dispensed by the hospital pharmacy and intended for administration at home.
- Discharge medication requests, for a named patient, to be dispensed by the hospital pharmacy and issued on discharge for administration at home.
- Outpatient medication requests, for a named patient, to be dispensed by the hospital pharmacy and intended for administration in the Outpatients department, Accident and Emergency department, or Day unit.
- Outpatient medication requests, for a named patient, to be dispensed by the hospital pharmacy for administration at home.
Applicable FHIR resources: MedicationRequest
and MedicationDispense
The use of FHIR resources for these use cases is identical except for the following;
- Care setting identified by the
MedicationRequest.category
. - The quantity of discharge medication to supply may be defined within a
MedicationRequest.dispenseRequest
.
Medications on Admission
On admission to any secondary/tertiary care setting, a medicines reconciliation process is generally undertaken by pharmacists and pharmacy technicians. This process comprises five steps:
- Collect an accurate medication history from appropriate sources prior to admission, or had been recently prescribed
- Develop a list of medications to be prescribed or review a list of medications which have currently been prescribed
- Compare the medications on the two lists identifying medications which have not been prescribed, where doses have changed, or new medications have been prescribed
- Make clinical decisions based on the comparison and the patients current symptoms
- Communicate gaps, confirm changes and provide recommendations of the new list to appropriate caregivers and to the patient.
Inpatient Admissions
The steps as listed above would be typically undertaken and recorded within the Trust ePMA system. Changes to on-going medication will be recorded within the Trust ePMA system and explained to the patient and other caregivers over the course of the admission and any further changes on discharge.
Outpatient Appointment / Treatment
The steps above would be typically undertaken as listed and recorded within the Trust ePMA system.
General Practice Transfer / New Registrations
When a patient registers with a GP practice the medicines reconciliation process is supported by the GP2GP service that makes available the patient's GP record from their previous GP practice clinical system. For new patient registrations where there is no existing primary care record, the GP will ask the patient to describe or bring in their current medication.
Applicable FHIR resources: MedicationStatement
Medications on Discharge
Discharge Medications, Discharge Prescription, or Medication To Take Out (TTO), are medications which are given to a patient when they are discharged from the hospital with a limited supply.
This instruction is sent to the GP via a Discharge Summary document, which may be electronic, and contains a wealth of information under several headings (each heading contains additional sub-headings with various cardinality).
The prescription may include information that the treatment is intended to continue beyond the supply of medication provided and there may be an expectation that the GP will continue the supply which would be highlighted within the discharge summary itself.
PRSB eDischarge Summary Standard - Top level headings
- Patient demographics
- GP practice
- About me
- Legal information
- Safeguarding
- Professional contacts
- Personal contacts
- Individual requirements
- Participation in research
- Referrer details
- Admission details
- Discharge details
- Problems list
- Procedures and therapies
- Clinical summary
- Social context
- Investigation results
- Assessments
- Risks
- Allergies and adverse reactions
- Medications and medical devices
- Information and advice given
- Distribution list
- Plan and requested actions
- Person completing record
- Care and support plan
- Contigency plans
- Additional supoort plans
Note that the "Medications and Medical Devices" (highlighted in green) is only one heading out of 28.
Bundling the Discharge Medications with the Discharge Summary
All NHS Trusts will be familiar with the Transfer of Care process from secondary to primary care. They may complete a discharge summary using a system provided by an NHS supplier, a bespoke area within their Electronic Patient Record (EPR), or using paper.
Most digital solutions available today currently bundle discharge medications with the discharge summary, as it makes sense to bundle related things together into one document; however, this presents the following challenges.
Discharge summaries are completed after a patient has been discharged
A discharge summary has a linear progression during a patient stay, lasting for duration of the inpatient encounter.
A mature digital system may populate some of the discharge summary headings automatically; however, many of the headings require manual input from a clinician, which can be a time-consuming process.
NHS Trusts that send a digital copy of a discharge summary to GPs often delay the discharge notification to the ePMA system and the system responsible for sending the discharge summary electronically.
This delay is usually 6-24 hours after the patient has been discharged, and allows additional time for a clinician to complete the discharge summary.
The discharge summary alone is a single document where there is only one version of it that is clinically auditable and relevant - the one that is sent to the GP.
All iterations of the document up until the point the document is sent to the GP are considered as draft.
Discharge medications are required before a patient is discharged and have workflow
A patient being discharged with medication will result in at least one MedicationRequest
being sent to the pharmacy. An NHS Trust will have an additional clinical verification process in which a pharmacist will review the medications requested before approving and dispensing, resulting in at least one MedicationDispense
, or several if there are multiple line items within the prescription.
Unlike the discharge summary, there can be many clinically auditable and relevant versions of a discharge prescription during an inpatient encounter; however, only the medications taken home when the patient is discharged from the hospital can be shown in the discharge prescription.
In summary
It is recommended that any delays to the notification of inpatient discharge to downstream systems be avoided where possible.
Applicable FHIR resources: MedicationStatement
and optionally MedicationDispense
Hospital Transfer
Applicable for the following use cases;
- Internal transfer, to a ward using a different ePMA system.
- Transfer to another hospital, using a different ePMA system.
The most simple implementation of these use cases will be a RESTful POST
to the destination ePMA [B] system. The FHIR Message posted being a Bundle of MedicationStatement
resources and related/referenced resources.
Where ePMA [B] does not operate as a FHIR server then an alternative architecture would be for ePMA [B] to query ePMA [A] using GET
operations.
Where more detailed records are required, a MedicationStatement
can reference a MedicationRequest
using the MedicationStatement.basedOn
element.
MedicationStatement
could also reference a MedicationDispense
resource.
The difference between the clinical data shared in a transfer compared to that shared within a discharge process would be the inclusion of medication activity specific to the inpatient treatment, which is not relevant after discharge. For example, painkillers, pre-operative medication etc. These are sometimes described as ephemeral medications, i.e. medications that are started during an episode of care and discontinued within that same care episode.
It is not expected that ICS and shared medication records will include ephemeral medication records as these would add unnecessary complexity to the shared record for minimal value.
Applicable FHIR resources: MedicationStatement
and optionally MedicationRequest