Notification Payloads
Notification messages will be sent to the endpoint configured on rest-hook Subscriptions when corresponding events take place within the Spine which match the filter on the Subscription.
Notifications sent to an endpoint by the BadgerNet Spine consist of a JSON FHIR Bundle which contains a single SubscriptionStatus resource. The SubscriptionStatus resource indicates some status information about the Subscription which caused the notification to be received by the Endpoint and includes a list of the resource events included in the notification.
The content of affected FHIR resources is not included in the notification, nor is there an indication of the details of the change. The notification simply indicates that something has changed within the record, and the responsibility resides with the Spine Client System to read the record and handle it accordingly.
Contents of Notification messages
Messages will be sent to the endpoint using the HTTP POST method:
POST {endpoint-address}
Parameters
Name | Type | Description |
|---|---|---|
| JSON Object (body) | Example
JSON
|
Notable properties within SubscriptionStatus:
type:handshake- Part of the initial handshake on the Endpointheartbeat- A periodic notification to verify server connectivityevent-notification- A regular event notification
eventsSinceSubscriptionStart: The total number of events raised on this Subscription so farnotificationEvent: An array of zero or more events, each of which contains:eventNumber: A unique incrementing number for this eventtimestamp: The instant this event occurredfocus: A reference to a FHIR Resource which is the focus of the event, for example an event triggered by a pregnancy update would contain a reference to the Patient.
Response
The endpoint must respond with a ‘successful’ HTTP Response Code: 2xx (e.g. 200, 201, 204 etc) to acknowledge delivery of the notification.