Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

Messaging Architecture Overview

Overview of the Messaging Architecture section

Events Message Flow

The diagram below shows the high level requirements of an National Events Management Service (NEMS) as well as the role of the NEMS within the interaction between publishers and subscribers.

  1. A subscriber subscribes to event messages by event types or patient identifier using the Subscription API

  2. A successful subscription request will return a confirmation of the subscription creation
  3. A publisher will generate an event message and send it to the NEMS
  4. The NEMS will validate the sent event message and return an accepted response to the publisher
  5. The NEMS takes the event messages and matches the content of the event message to the subscriptions. For each event message which matches the subscription criteria the NEMS will send the event message to the subscriber via MESH.

Messaging Pattern

The National Events Management Service (NEMS) is based on a Publish and Subscribe messaging pattern, where:

  • a publisher sends an event message to the messaging service without being concerned who will receive the message
  • a subscriber is a system which would like to receive event messages that match a set of criteria, such as matching a specific event type or the patient having a specific identifier

More information around the messaging pattern is available on the NHS Digital developer network Integration Patterns pages.

Publishers

Event messages are created by services such as the National Population Failsafe, the Spine Patient Demographics Service, a hospital, a child health service and are constructed in line with this event message implementation guide.

The event messages have a common Event Header Information structure which allows the receiving system of the event message to identify the patient this event relates to, the type of event message and additional meta data about the event message such as the originating organisation.

Once the publisher has constructed the event message they use the NEMS publish API to send the event message to the NEMS. If the event message is valid the NEMS will return an accepted response to the publisher before continuing to process the event message internally.

Subscribers

A subscriber can use the subscription API within the NEMS to request that event messages are sent to them. The subscription API allows the subscriber to specify rules around what messages they wish to receive and how they want to receive the event messages.

Delivery Of Event Messages

Onward delivery to subscribers will be over MESH. The NEMS wraps up the published event message in an additional ITK FHIR bundle when forwarding the message over MESH, as outlined in the Event Receiver Requirements pages, to allow standard messaging controls to be used.

For further information relating to MESH see Message Exchange for Social Care and Health (MESH).

Tags: fhir

All content is available under the Open Government Licence v3.0, except where otherwise stated