type: "object"
description: "The PDS Death Signal. You will receive this object if you subscribe to `pds-death-notification-1` events with an `application/json` format."
required:
  - "id"
  - "data"
  - "type"
  - "subject"
  - "source"
  - "time"
properties:
  id:
    type: "string"
    description: "UUID v4 format identifier."
  type:
    type: "string"
    description: "A unique string representing the signal type."
  subject:
    type: "object"
    required:
      - "nhsNumber"
      - "familyName"
      - "dob"
    description: "The NHS patient who is the subject of the signal."
    properties:
      nhsNumber:
        type: "string"
        description: "NHS Number validated in line with https://www.datadictionary.nhs.uk/attributes/nhs_number.html."
      familyName:
        type: "string"
        description: "Last name, capitalised"
      dob:
        type: "string"
        format: "date"
        description: "ISO-8601 is the required format. However, due to data quality inconsistencies in demographic records, both 'YYYY' and 'YYYY-MM' formats may also be seen. Refer to the [PDS FHIR API documentation](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir#get-/Patient) for further clarification on the accepted formats."
  source:
    type: "object"
    required:
      - "name"
      - "identifier"
    description: "Organisation responsible for publishing the patient-related signal."
    properties:
      name:
        type: "string"
        description: "Organisation name"
      identifier:
        type: "object"
        required:
          - "system"
          - "value"
        description: "Must follow this identifier system: https://fhir.nhs.uk/Id/nhsSpineASID and provide the ASID Code as the value."
        properties:
          system:
            type: "string"
          value:
            type: "string"
  time:
    type: "string"
    format: "date-time"
    description: "The time at which the signal is published. This must be a compliant RFC3339 datetime in line with the FHIR standard for [system instants](https://hl7.org/fhir/R4/datatypes.html#instant). This means it can have seconds or milliseconds precision."
  data:
    type: "object"
    required:
    - deathNotificationStatus
    - fullUrl
    - provenance
    - versionId
    properties:
    deathNotificationStatus:
      type: "string"
      description: |
          A set of coded values that represent the status of the death notification. This field is only provided for the pds-death-notification-1 event type.
          The permitted codes are as follows:
          | Code | Type                  | Description                                                                                                      |
          | ---- | --------------------- | ---------------------------------------------------------------------------------------------------------------- |
          | 1    |  Informal             | This status is added when there is an understanding that a person passed away but it lacks official documentation. e.g. a death notice is received via an update from a local NHS Organisation such as a GP Practice or NHS Trust. |
          | 2    |  Formal               | This formal status is established through the completion and filing of a death certificate, which contains details about the deceased individual, including their name, date and place of death, cause of death (if known), and other relevant information. Formal confirmation is received from the Registrar of Deaths. |
          | U    |  Death Status Removed | A revocation of a patient death event as the death was entered in error, the patient is NOT DEAD.                    |
      versionId:
        type: "string"
        description: "The versionId/ETAG identifies the version of the resource. The format should be a version identifier enclosed in quotes and preceded by 'W/'."
      fullUrl:
        type: "string"
        description: "The URL where the subscriber can retrieve the source of truth record for the patient or the full event payload."
      provenance: 
        type: "object"
        description: "The provenance describes which organisation was responsible for the creation of the event."
        required:
        - name
        - identifier
        properties:
          name: 
            type: "string"
            description: "The name of the organisation responsible for the creating the event. This may be an empty string due to publisher data issues."
          identifier: 
            type: "object"
            required:
            - "system"
            - "value"
            description: "Must follow this identifier system: https://fhir.nhs.uk/Id/nhsSpineASID and provide the ASID value and name of the system."
            properties:
                system:
                  type: "string"
                value:
                  type: "string"
example:
  id: "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b"
  type: "pds-death-notification-1"
  subject:
    dob: "2017-10-02"
    familyName: "DAWKINS"
    nhsNumber: "9912003888"
  source:
    name: "NHS DIGITAL"
    identifier:
      system: "https://fhir.nhs.uk/Id/nhsSpineASID"
      value: "477121000324"
  time: "2022-04-05T17:31:00.000Z"
  data:
    versionId: 'W/"16"'
    fullUrl: "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888"
    deathNotificationStatus: "2"
    provenance:
      name: "The GP Practice"
      identifier:
        system: "https://fhir.nhs.uk/Id/nhsSpineASID"
        value: "477121000323"