Operation: Subscription Events
Scope
The Subscription $events operation retrieves Subscription Notifications on an existing subscription, along with the associated payloads if requested. as a Parameters FHIR R4 resource conformant to R4 Backported R5 Subscription Events
Interaction Sequence Diagram
Specification
This specification is based on the FHIR R5 Backport specification.
** Notification Events Request**
Get [base]/Subscription/[id]/$events
where [id] is the logical id of the existing Subscription resource.
Notification Events Response
The server returns a 200 OK HTTP status code.
Example Notification Events Opeartion
While this $events operation is defined in FHIR R5 for the Subscription resource, it has also been backported to FHIR R4, functioning in the same way.
GET [base]/Submission/$event?patient=12345&type=history
Response message body:
{ "resourceType" : "Bundle", "id" : "r4b-notification-full-resource", "meta" : { "profile" : [ 🔗 "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification" ] }, "type" : "history", "timestamp" : "2020-05-29T11:44:13.1882432-05:00", "entry" : [ { "fullUrl" : "urn:uuid:120e93df-a9ab-4b01-b0e2-6660338e5927", "resource" : { "resourceType" : "SubscriptionStatus", "id" : "120e93df-a9ab-4b01-b0e2-6660338e5927", "text" : { "status" : "generated", "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"SubscriptionStatus_120e93df-a9ab-4b01-b0e2-6660338e5927\"> </a><p><b>Generated Narrative: SubscriptionStatus </b><a name=\"120e93df-a9ab-4b01-b0e2-6660338e5927\"> </a><a name=\"hc120e93df-a9ab-4b01-b0e2-6660338e5927\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">ResourceSubscriptionStatus "120e93df-a9ab-4b01-b0e2-6660338e5927" </p></div><p><b>status</b>: active</p><p><b>type</b>: event-notification</p><p><b>eventsSinceSubscriptionStart</b>: 2</p><h3>NotificationEvents</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>EventNumber</b></td><td><b>Timestamp</b></td><td><b>Focus</b></td></tr><tr><td style=\"display: none\">*</td><td>2</td><td>May 29, 2020, 4:44:13\u202fPM</td><td>See on this page: https://example.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616</td></tr></table><p><b>subscription</b>: <a href=\"https://example.org/fhir/Subscription/admission\">https://example.org/fhir/Subscription/admission</a></p><p><b>topic</b>: <a href=\"http://hl7.org/SubscriptionTopic/admission\">http://hl7.org/SubscriptionTopic/admission</a></p></div>" }, "status" : "active", "type" : "event-notification", "eventsSinceSubscriptionStart" : "2", "notificationEvent" : [ { "eventNumber" : "2", "timestamp" : "2020-05-29T11:44:13.1882432-05:00", "focus" : { "reference" : "https://example.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616" } } ], "subscription" : { "reference" : "https://example.org/fhir/Subscription/admission" }, "topic" : "http://hl7.org/SubscriptionTopic/admission" }, "request" : { "method" : "GET", "url" : "https://example.org/fhir/Subscription/admission/$status" }, "response" : { "status" : "200" } }, { "fullUrl" : "https://example.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616", "resource" : { "resourceType" : "Encounter", "id" : "86009987-eabe-42bf-8c02-b112b18cb616", "text" : { "status" : "generated", "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Encounter_86009987-eabe-42bf-8c02-b112b18cb616\"> </a><p><b>Generated Narrative: Encounter </b><a name=\"86009987-eabe-42bf-8c02-b112b18cb616\"> </a><a name=\"hc86009987-eabe-42bf-8c02-b112b18cb616\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">ResourceEncounter "86009987-eabe-42bf-8c02-b112b18cb616" </p></div><p><b>status</b>: in-progress</p><p><b>class</b>: virtual (Details: ActCode code VR = ' virtual ', stated as ' null ')</p><p><b>subject</b>: <a href=\"Bundle-r4-notification-multi-resource.html#https-//example.org/fhir/Patient/1599eb66-431a-447c-a3de-6897fe9ae9a1\">https://example.org/fhir/Patient/1599eb66-431a-447c-a3de-6897fe9ae9a1: Example Patient</a></p></div>" }, "status" : "in-progress", "class" : { "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode", "code" : "VR" }, "subject" : { "reference" : "https://example.org/fhir/Patient/1599eb66-431a-447c-a3de-6897fe9ae9a1", "display" : "Example Patient" } }, "request" : { "method" : "POST", "url" : "Encounter" }, "response" : { "status" : "201" } } ] }
Please see the $events Operation Definition page from the R5 Subscriptions Backport for details on the $events operation used for the Ontario Health Subscriptions service.
Supported Profiles
Profile Name | URL |
---|---|
Backport Subscription Notification Bundle | R4B Topic-Based Subscription Notification Bundle |