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 · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a Subscription resource with channel.type=websocket and no endpoint URL; retrieve the websocket connection URL from the server after creation
  2. Connect to the websocket URL using a WebSocket client; receive the initial handshake notification Bundle with notificationType=handshake to confirm the connection is active
  3. Process heartbeat notification Bundles (notificationType=heartbeat) sent at the configured heartbeatPeriod interval; use these to detect dropped connections and reconnect
  4. Receive event notification Bundles (notificationType=event-notification) containing the resource reference or full resource depending on the Subscription content setting
  5. On reconnection, use GET /Subscription/{id}/\$events with the _sinceEventNumber parameter to retrieve any missed events during the disconnection window

Known gotchas

Related routes

implement FHIR Subscriptions for change notifications (R4 channel-based vs R4B/R5 topic-based differences)
fhir · 6 steps · unrated
Implement FHIR R4 Subscriptions using the R5 backport IG for real-time event notifications
healthcare-fhir · 6 steps · unrated
Use FHIR subscriptions to receive webhook notifications when patient data changes
fhir · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans