Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

PDS Record Change

The PDS Record Change event

The PDS Record Change event message is generated and published by the Spine, when a change is made to a patient record within the Patient Demographics Service (PDS). The event message will not contain all the PDS information, as the event message is only intended to be a notification that the referenced patient record has changed which allows the subscriber to trigger their PDS synchronisation processes.

Any change to a patients PDS record will trigger the publication of this event, some example of changes that would trigger this event are:

  • The NHS Number on the record being superseded
  • Changes to demographic information
  • Changes to contact details
  • Application/Removal of S-Flags, I-Flags

FHIR Event Message Structure

The following is the FHIR event message structure for the PDS Record Change event.

Onward Delivery

The delivery of the PDS Record Change event messages to subscribers via MESH will use the following WorkflowID within the MESH control file. This WorkflowID will need to be added to the receiving MESH mailbox configuration before event messages can be received.

MESH WorkflowID PDS_RECORD_CHANGE_1

Resource Population Guidance

Bundle

The Bundle resource is the container for the event message and SHALL conform to the Bundle FHIR profile.

Resource Cardinality 1..1
Element Cardinality Additional Guidance
type 1..1 Fixed value: message

Event-MessageHeader-1

The MessageHeader resource included as part of the event message SHALL conform to the Event-MessageHeader-1 constrained FHIR profile and the additional population guidance as per the table below:

Resource Cardinality 1..1
Element Cardinality Additional Guidance
extension(routingDemographics) 1..1 The extension MUST contain the details of the patient who is the focus of this event message.
extension(routingDemographics).extension(nhsNumber) 1..1 The extension MUST contain the patient’s NHS Number identifier and is used by the NEMS for routing event messages to subscribers.
extension(routingDemographics).extension(name) 1..1 The extension MUST contain the human name element containing the patient’s official names as recognised by PDS, and match the NHS number in the routingDemographics extension.
extension(routingDemographics).extension(birthDateTime) 1..1 The extension MUST contain the patient’s Date Of Birth which matches the NHS number in the routingDemographics extension.
extension(messageEventType) 1..1 Fixed value: new
event 1..1 Fixed Value: pds-record-change-1 (PDS Record Change)
focus 1..1 This will reference the focus “Patient” resource.

Note: Where the event message relates to a PDS record being superseded by another, the patient details included in the event will be for the record which is being superceeded rather than the record which is superseding it.

CareConnect-Patient-1

This Patient resource included in the event message SHALL conform to the CareConnect-Patient-1 constrained FHIR profile and the additional population guidance as per the table below:

Resource Cardinality 1..1

The following table outlines the key elements which will be included, but additional elements and extensions may be included in the resource if required.

Element Cardinality Additional Guidance
meta.versionId 1..1 This element will contain the serial change number (SCN) of the patient’s record within Spine at the time this event was published.
identifier 1..* The NHS Number of the patient will be included in the nhsNumber identifier slice. If the event message is the result of the PDS record being superseeded this will include the NHS Number of the record being superseded and not the record which is superseding it.
name 1..* The patient’s name(s) registered on PDS.
birthDate 1..1 The patients date of birth.

Provenance

The Provenance resource will be included where appropriate to indicate who performed the change which trigged the publish of this event message. The resource SHALL conform to the Provenance FHIR profile and the additional population guidance as per the table below:

Resource Cardinality 0..1

The following table outlines the key elements which will be included, but additional elements and extensions may be included in the resource.

Element Cardinality Additional Guidance
target 1..1 The target will reference the Patient resource
recorded 1..1 The date and time the change was made to the record
agent 1..* The agent which performed the change to the PDS record
agent.whoReference 1..1 This will reference the agent who updated the record.

When this is a citizen updating their own PDS record this will reference the Patient resource in the event message.

Otherwise this will be the organisation who updated the event message, with reference to the ODS API.

Examples

Citizen Update Organization Update
<Bundle xmlns="http://hl7.org/fhir"> <id value="236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b"/> <meta> <profile value="http://hl7.org/fhir/STU3/StructureDefinition/Bundle"/> </meta> <type value="message"/> <entry> <fullUrl value="3cfdf880-13e9-4f6b-8299-53e96ef5ec02"/> <resource> <MessageHeader> <id value="3cfdf880-13e9-4f6b-8299-53e96ef5ec02"/> <meta> <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/Event-MessageHeader-1"/> </meta> <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RoutingDemographics-1"> <extension url="nhsNumber"> <valueIdentifier> <system value="https://fhir.nhs.uk/Id/nhs-number"/> <value value="9912003888"/> </valueIdentifier> </extension> <extension url="name"> <valueHumanName> <use value="official"/> <family value="DAWKINS"/> <given value="Jack"/> </valueHumanName> </extension> <extension url="birthDateTime"> <valueDateTime value="2017-10-02T12:00:00+00:00"/> </extension> </extension> <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-MessageEventType-1"> <valueCodeableConcept> <coding> <system value="https://fhir.nhs.uk/STU3/CodeSystem/MessageEventType-1"/> <code value="new"/> <display value="New event message"/> </coding> </valueCodeableConcept> </extension> <event> <system value="https://fhir.nhs.uk/STU3/CodeSystem/EventType-1"/> <code value="pds-record-change-1"/> <display value="PDS Record Change"/> </event> <timestamp value="2019-11-01T15:00:00+00:00"/> <source> <contact> <system value="email"/> <value value="ssd.nationalservicedesk@nhs.net"/> </contact> <endpoint value="urn:nhs:addressing:asid:477121000323"/> </source> <responsible> <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/X26"/> <display value="NHS DIGITAL"/> </responsible> <focus> <reference value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> </focus> </MessageHeader> </resource> </entry> <entry> <fullUrl value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> <resource> <Patient> <id value="7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> <meta> <versionId value="1"/> <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"/> </meta> <identifier> <extension url="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1"> <valueCodeableConcept> <coding> <system value="https://fhir.hl7.org.uk/STU3/CareConnect-NHSNumberVerificationStatus-1"/> <code value="01"/> <display value="Number present and verified"/> </coding> </valueCodeableConcept> </extension> <system value="https://fhir.nhs.uk/Id/nhs-number"/> <value value="9912003888"/> </identifier> <name> <use value="official"/> <family value="DAWKINS"/> <given value="Jack"/> </name> <birthDate value="2017-10-02"/> </Patient> </resource> </entry> <entry> <fullUrl value="urn:uuid:7bc8c1bc-e54c-11eb-ba80-0242ac130004"/> <resource> <Provenance> <id value="7bc8c1bc-e54c-11eb-ba80-0242ac130004"/> <target> <reference value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> </target> <recorded value="2021-07-15T08:39:24+00:00"/> <agent> <role> <coding> <system value="http://hl7.org/fhir/v3/ParticipationType"/> <code value="AUT"/> </coding> </role> <whoReference> <reference value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> </whoReference> </agent> </Provenance> </resource> </entry> </Bundle>
<Bundle xmlns="http://hl7.org/fhir"> <id value="236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b"/> <meta> <profile value="http://hl7.org/fhir/STU3/StructureDefinition/Bundle"/> </meta> <type value="message"/> <entry> <fullUrl value="3cfdf880-13e9-4f6b-8299-53e96ef5ec02"/> <resource> <MessageHeader> <id value="3cfdf880-13e9-4f6b-8299-53e96ef5ec02"/> <meta> <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/Event-MessageHeader-1"/> </meta> <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RoutingDemographics-1"> <extension url="nhsNumber"> <valueIdentifier> <system value="https://fhir.nhs.uk/Id/nhs-number"/> <value value="9912003888"/> </valueIdentifier> </extension> <extension url="name"> <valueHumanName> <use value="official"/> <family value="DAWKINS"/> <given value="Jack"/> </valueHumanName> </extension> <extension url="birthDateTime"> <valueDateTime value="2017-10-02T12:00:00+00:00"/> </extension> </extension> <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-MessageEventType-1"> <valueCodeableConcept> <coding> <system value="https://fhir.nhs.uk/STU3/CodeSystem/MessageEventType-1"/> <code value="new"/> <display value="New event message"/> </coding> </valueCodeableConcept> </extension> <event> <system value="https://fhir.nhs.uk/STU3/CodeSystem/EventType-1"/> <code value="pds-record-change-1"/> <display value="PDS Record Change"/> </event> <timestamp value="2019-11-01T15:00:00+00:00"/> <source> <contact> <system value="email"/> <value value="ssd.nationalservicedesk@nhs.net"/> </contact> <endpoint value="urn:nhs:addressing:asid:477121000323"/> </source> <responsible> <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/X26"/> <display value="NHS DIGITAL"/> </responsible> <focus> <reference value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> </focus> </MessageHeader> </resource> </entry> <entry> <fullUrl value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> <resource> <Patient> <id value="7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> <meta> <versionId value="1"/> <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"/> </meta> <identifier> <extension url="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1"> <valueCodeableConcept> <coding> <system value="https://fhir.hl7.org.uk/STU3/CareConnect-NHSNumberVerificationStatus-1"/> <code value="01"/> <display value="Number present and verified"/> </coding> </valueCodeableConcept> </extension> <system value="https://fhir.nhs.uk/Id/nhs-number"/> <value value="9912003888"/> </identifier> <name> <use value="official"/> <family value="DAWKINS"/> <given value="Jack"/> </name> <birthDate value="2017-10-02"/> </Patient> </resource> </entry> <entry> <fullUrl value="urn:uuid:7bc8c1bc-e54c-11eb-ba80-0242ac130004"/> <resource> <Provenance> <id value="7bc8c1bc-e54c-11eb-ba80-0242ac130004"/> <target> <reference value="urn:uuid:7b0c7720-d1ed-11e8-a8d5-f2801f1b9fd1"/> </target> <recorded value="2021-07-15T08:39:24+00:00"/> <agent> <role> <coding> <system value="http://hl7.org/fhir/v3/ParticipationType"/> <code value="AUT"/> </coding> </role> <whoReference> <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/X26"/> </whoReference> </agent> </Provenance> </resource> </entry> </Bundle>
Tags: fhir

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