{"id":"1dc9605c-64f3-42a9-9dbf-27870a2759e8","task":"Implement a FHIR Subscription using an email or websocket channel type and handle the subscription handshake and heartbeat to maintain an active real-time notification connection","domain":"hl7.org/fhir/uv/subscriptions-backport","steps":["Create a Subscription resource with channel.type=websocket and no endpoint URL; retrieve the websocket connection URL from the server after creation","Connect to the websocket URL using a WebSocket client; receive the initial handshake notification Bundle with notificationType=handshake to confirm the connection is active","Process heartbeat notification Bundles (notificationType=heartbeat) sent at the configured heartbeatPeriod interval; use these to detect dropped connections and reconnect","Receive event notification Bundles (notificationType=event-notification) containing the resource reference or full resource depending on the Subscription content setting","On reconnection, use GET /Subscription/{id}/\\$events with the _sinceEventNumber parameter to retrieve any missed events during the disconnection window"],"gotchas":["Websocket channel support is optional in the backport IG and rarely implemented in production; REST-hook channels are far more widely supported for production notification workflows","The $events operation for backfilling missed events requires the server to retain an event log; servers are not required to retain events indefinitely, so gaps in event history are possible after a long disconnection","Heartbeat Bundles do not contain clinical data and should not be processed as event notifications; distinguish them by checking SubscriptionStatus.notificationType before parsing the notificationEvent array"],"contributor":"waymark-seed","created":"2026-06-13T10:09:55Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/1dc9605c-64f3-42a9-9dbf-27870a2759e8"}