NEMS Event

GP Surgerys will receive an event notification from NEMS when a person is registering at at that Surgery.

Event Signal Example

{
    "id": "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b", // String, UUID
    "type": "gpit-change-of-gp-1",  // String, must be a valid, supported event type
    "subject": {
        "nhsNumber": "9912003888", // String, 10 digit NHS Number
        "familyName": "DAWKINS",
        "dob": "2017-10-02"
    },
    "source": {
        "name": "NHS Digital",
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhsGPITASID",
            "value": "477121000324"
        }
    },
    "time": "2022-04-05T17:31:00.000Z", // ISO-8601 datetime
    "data": {
        "fullUrl": "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888",
        "versionId": 'W/"2"',        
        "odsCode" : "0123456",
        "registrationEncounterCode" : "01", 
        "provenance": {
            "name": "The GP Practice",
            "identifier": {
                "system": "https://fhir.nhs.uk/Id/nhsSpineASID",
                "value": "477121000323"
            }
        },
 
  }
}

Event Payload Example

The payload is structured in line with FHIR4

{
    "resourceType": "Bundle",
    "id": "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b", // String, UUID
    "type": "history",
    "timestamp": "2022-04-05T17:31:00.000Z", // ISO-8601, datetime
    "entry": [
      {
        "fullUrl": "urn:uuid:c6ca3f0a-2470-407d-b0f4-c3dc70ab153b",
        "resource": {
          "resourceType": "Parameters",
          "meta": {
            "profile": [
              "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4"
            ]
          },
          "id": "c6ca3f0a-2470-407d-b0f4-c3dc70ab153b",
          "parameter": [
            {
              "name": "subscription",
              "valueReference": {
                "reference": "https://api.service.nhs.uk/multicast-notification-service/subscriptions" // String, URL for subscriptions endpoint
              }
            },
            {
              "name": "status",
              "valueCode": "active"
            },
            {
              "name": "type",
              "valueCode": "event-notification"
            },
            {
              "name": "notification-event",
              "part": [
                {
                  "name": "event-number",
                  "valueString": "W/\"2\"" // String, Maps to VersionID, event-number is a mandatory field
                },
                {
                  "name": "timestamp",
                  "valueInstant": "2022-01-07T15:06:00+00:00" // ISO-8601, Time of event from publsiher system
                },
                {
                  "name": "focus",
                  "valueReference": {
                    "reference": "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888" // String, URL Hydration URL
                  }
                }
              ]
            },
            {
              "name": "additional-context",
              "part": [
                {
                  "name": "eventType",
                  "valueString": "gpit-change-of-gp-1"
                },
                {
                  "name": "subject", // Note this refernces a patient resource, could be other resource types where subject is not a patient
                  "valueReference": {
                    "reference": "urn:uuid:96b132b7-d169-4b93-a640-07e0ab6a3758"
                  }
                },
                {
                  "name": "provenance",
                  "valueReference": {
                    "reference": "urn:uuid:ed1a6a7b-0d25-4216-893d-484c9d769f8a"
                  }
                },
                {
                  "name": "source",
                  "valueReference": {
                    "reference": "urn:uuid:45e2534c-56f7-45e9-b189-e070b694159a"
                  }
                }
              ]
            }
          ]
        },
        // Note, These are an artefact of 'bundle' of type ' history, its needed due to being a backport'
        "request": {
          "method": "GET",
          "url": "https://api.service.nhs.uk/multicast-notification-service/subscriptions" // String, URL for subscriptions endpoint
        },
        "response": {
          "status": "200"
        }
      },
      {
        "fullUrl": "urn:uuid:96b132b7-d169-4b93-a640-07e0ab6a3758",
        "resource": {
          "resourceType": "Patient",
          "id": "96b132b7-d169-4b93-a640-07e0ab6a3758",
          "identifier": [
            {
              "system": "https://fhir.nhs.uk/Id/nhs-number",
              "value": "9912003888" // String, Patient NHS NUmber
            }
          ],
          "name": [
            {
              "family": "DAWKINS" // String, Patient surname
            }
          ],
          "birthDate": "2017-10-02" // String, Patient DoB
        },
        // Note, These are an artefact of 'bundle' of type ' history, its needed due to being a backport'
        "request": {
          "method": "POST",
          "url": "Patient"
        },
        "response": {
          "status": "201"
        }
      },
      {
        "fullUrl": "urn:uuid:ed1a6a7b-0d25-4216-893d-484c9d769f8a",
        "resource": {
          "resourceType": "Provenance",
          "id": "ed1a6a7b-0d25-4216-893d-484c9d769f8a",
          "target": [
            {
              "reference": "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888"
            }
          ],
          "recorded": "2022-04-05T17:31:00.000Z",
          // Custom attribute
          "activity": {
            "text": "odsCode",
            "coding": [
              {
                "code": "0123456"
              }
            ]
          }
          "activity": {
            "text": "registrationEncounterCode",
            "coding": [
              {
                "code": "01"
              }
            ]
          },
          "agent": [
            {
              "who": {
                "identifier": {
                  "system": "https://fhir.nhs.uk/Id/nhsSpineASID",
                  "value": "477121000323" // String, triggering system's ASID
                },
                "display": "The GP Practice" // String, triggering system's name
              }
            }
          ]
        },
        // Note, These are an artefact of 'bundle' of type ' history, its needed due to being a backport'
        "request": {
          "method": "POST",
          "url": "Provenance"
        },
        "response": {
          "status": "201"
        }
      },
      {
        "fullUrl": "urn:uuid:45e2534c-56f7-45e9-b189-e070b694159a",
        "resource": {
          "resourceType": "Organization",
          "id": "45e2534c-56f7-45e9-b189-e070b694159a",
          "identifier": [
            {
              "system": "https://fhir.nhs.uk/Id/nhsGpItASID",
              "value": "477121000324" // String, publishing system's ASID
            }
          ],
          "name": "NHS Digital" // String, publishing systems name
        },
        // Note, These are an artefact of 'bundle' of type ' history, its needed due to being a backport'
        "request": {
          "method": "POST",
          "url": "Organization"
        },
        "response": {
          "status": "201"
        }
      }
    ]
  }