Skip to main content

Death Event Technical Design

This a technical design document for NEMS death event. The target audiences are those working on death event publisher applications, death event subscriber applications, and NEMS implementation of death events.

Background

The NHI system process and record the patient information, including death. Death information is of interest to various stakeholders in the health sector, including patient administration systems (PAS), assisted dying service (ADS) and others.

Process view

Death event process view:

Death events and event data:

Topic taxonomy

For death events, the topic taxonomy structure follows the overall topic taxonomy structure:

service-domain/resource/event/verb/version/event-properties

The topic fields are elaborated in the table below

Enrolment Event Topic FieldField TypeValueDescription
service-domainRoot“demographics”Healthcare service domain
resourceRoot“patient”Aligned with FHIR EpisodeOfCare resource
event categoryRoot“death”Event category
verbRootVariable: new, edit, deleteEvent action, one of the values
versionRoot“0.1.0”Starting version
DistrictEvent Property8 character code or "null" (lowercase)Location of the district relating to the person’s primary residential address. Code Tables
DomicileEvent Property4 character district code or "null" (lowercase)Domicile code, representing a person’s primary residential address. Domicile Codes
GP PracticeEvent Property8 character code or "null" (lowercase)The active GP practice of the deceased healthcare user. Facility Codes Note: Not all healthcare users have a GP practice. Where no GP practice exists for the NHI, this field will be "null"

Message header (Event metadata)

HeaderKey LiteralDescriptionRequiredFormat/ValuesExample
IDsolace-user-property-idMessage id, unique for each publisherRequiredGUID correlation ID987298dd-c484-462f-a15d-f18a97267959
Sourcesolace-user-property-sourcepublisher URI referenceRequiredhttps://hip-uat.digital.health.nz for UAT https://hip.digital.health.nz for prodhttps://hip-uat.digital.health.nz for UAT and https://hip.digital.health.nz for prod
Timesolace-user-property-timeUTC time when the message is publishedRequiredYYYY-MM-DDTHH:MM:SS2023-11-30T18:54:43Z
Spec Versionversionversion of the CloudEvents specOptionalmajor.minor1.0
Typesolace-user-property-typesubstring of the topic taxonomy including root to versionRequired{root}/{version}demographics/patient/death/new/v1.0.0
Subjectsolace-user-property-subjectNHI numberRequired[A-Z]{3}([0-9]{4}|([0-9]{2}[A-Z]{2}))ZZZ0008 ZXE24NV
Content typesolace-user-property-datacontenttype or content-type for REST APIContent type of event dataRequiredapplication/jsonapplication/jso

Message payload

Event : death/new

Payload Schema


{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"callbackUrl": {
"type": "string",
"description": "Call back url for deseased patient record",
},
"deathDate": {
"type": "string",
"description": "Death date following the FHIR primitive date data type definition. This can be date or partial date.",
"pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$",
}
},
"additionalProperties": false,
"required": [
"callbackUrl",
"deathDate",
]
}

Example


{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"callbackUrl": {
"type": "string",
"description": "Call back url for deceased patient record",
},
"deathDate": {
"type": "string",
"description": "Death date following the FHIR primitive date data type definition. This can be date or partial date.",
"pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$",
}
},
"additionalProperties": false,
"required": [
"callbackUrl",
"deathDate",
]
},
{
"callbackUrl": "https://api.hip-uat.digital.health.nz/fhir/nhi/v1/Patient/ZGT56KB",
"deathDate": "2023-11",
}

Event : death/update

Payload Schema

As Above

Example

As Above

Event : death/delete

Payload Schema


{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"callbackUrl": {
"type": "string",
"description": "Call back url for deseased patient record",
},
},
"additionalProperties": false,
"required": [
"callbackUrl",
]
}

Example


TBD