ePMA Implementation Guidance for FHIR STU3

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.
Please note: This guidance has been superseded by the Implementation guide for digitial medicines, which contains up-to-date information.

Medications Data Use Cases

Note: This section of the implementation guidance is not yet complete.

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:


meds-data-flow


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;

  1. Directly by the clinical staff within the patient's GP practice
  2. In summary form uploaded [in England] to the NHS Summary Care Record
  3. Via the IM1 pairing integration
  4. 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.


use-case-prescribing-system-querying-ics


Applicable FHIR resources: MedicationStatement, and optionally MedicationRequest and MedicationDispense

Definition of 'Current' Medication

IMPORTANT: A definition of what is deemed 'current' has been a challenge for healthcare IT for many years. This implementation guidance only provides a suggested approach. Until a national standard a published, accepted and proven, this guidance is of experimental status.

Suggested Criteria:

  • Medication where MedicationStatement.effectiveDateTime or MedicationStatement.effectivePeriod.start is in the past 12 months.
  • Medication prescribed where MedicationRequest.authoredOn is in the past 12 months and the intent is order.
  • Medication supplied/dispensed where MedicationDispense.whenPrepared or MedicationDispense.whenHandedOver is in the past 12 months.
  • Resources where status is active or complete.
NOTE: A period of 12 months is suggested in this guidance for the age of medication records deemed to be 'current'. Existing implementations across different types of clinical system are known to be using different algorithms, such as 6, 9 or 12 months.

Implementation Options

Option: Where is 'current' determined?

There are three architectural options for where 'current' medication is determined:

  1. By the ICS / shared record via an end-point to return only current medication
  2. 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'
  3. 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
NOTE: Technically the above is not as per the FHIR standard as there is no 'currentmedication' operation defined within FHIR.

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 or complete)
  • 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 or complete)
  • 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 or complete)
  • 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:

  1. Only MedicationStatement resources
  2. Only MedicationStatement resources but including basedOn referenced MedicationRequest resources for prescribed medication
  3. A combination of MedicationRequest for prescribed medication with MedicationStatement resources for non-prescription supply
  4. A combination of MedicationRequest for prescribed medication, MedicationStatement resources for non-prescription supply and MedicationDispense 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 or GP10 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.
Note: For implementations within England using the Electronic Prescription Service (EPS), refer to the specific implementation guidance below;

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

use-cases

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:

  1. Collect an accurate medication history from appropriate sources prior to admission, or had been recently prescribed
  2. Develop a list of medications to be prescribed or review a list of medications which have currently been prescribed
  3. Compare the medications on the two lists identifying medications which have not been prescribed, where doses have changed, or new medications have been prescribed
  4. Make clinical decisions based on the comparison and the patients current symptoms
  5. 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.

More detail about the electronic discharge summary standard can be found on the NHS Digital and Professional Records Standards Body websites.

PRSB eDischarge Summary Standard - Top level headings

  1. Patient demographics
  2. GP practice
  3. About me
  4. Legal information
  5. Safeguarding
  6. Professional contacts
  7. Personal contacts
  8. Individual requirements
  9. Participation in research
  10. Referrer details
  11. Admission details
  12. Discharge details
  13. Problems list
  14. Procedures and therapies
  15. Clinical summary
  16. Social context
  17. Investigation results
  18. Assessments
  19. Risks
  20. Allergies and adverse reactions
  21. Medications and medical devices
  22. Information and advice given
  23. Distribution list
  24. Plan and requested actions
  25. Person completing record
  26. Care and support plan
  27. Contigency plans
  28. 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

edischarge-summary-timeline

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

discharge-medication-timeline

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.

Note: A discharge prescription could be requested several times during an inpatient encounter. For example, a patient may have been ready for discharge, but something happened which resulted in them staying within secondary care for longer.

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

While discharge medications and discharge summaries happen around the time that a patient is discharged from a hospital, they are not the same thing.

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.


use-case-epma-to-epma


Where more detailed records are required, a MedicationStatement can reference a MedicationRequest using the MedicationStatement.basedOn element.

Note: At the time of writing, it is unclear how a 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

Note: The data required to be shared for a hospital transfer in addition to the medications data is out of scope for this implementation guide.

Integrated Care Systems (ICS) / Shared Medication Records

These systems are conduits for sharing medication records between clinical systems within a geographic region and nationally between regional implementations.

See Shared Medication Record Architectures.

back to top