implement FHIR Subscriptions for change notifications (R4 channel-based vs R4B/R5 topic-based differences)

domain: fhir · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. For FHIR R4 (channel-based): POST a Subscription resource with criteria (a search query string like 'Observation?patient=123'), channel.type (rest-hook, websocket, email, or sms), and channel.endpoint pointing to your webhook URL.
  2. For FHIR R4B/R5 (topic-based): POST a Subscription resource referencing a SubscriptionTopic by canonical URL in the topic field; the SubscriptionTopic defines the trigger logic server-side rather than embedding a query in the Subscription.
  3. For rest-hook subscriptions, expose an HTTPS endpoint that accepts POST requests; some servers send a handshake payload on subscription activation that you must acknowledge with a 200 response.
  4. Handle incoming notification payloads: R4 rest-hook sends an empty Bundle or the changed resource depending on server implementation; R4B/R5 sends a structured notification Bundle with event details.
  5. To retrieve the full resource after a notification, use the ids or full URLs provided in the notification Bundle to make a standard FHIR read request.
  6. Implement idempotent notification handling using the notification's event number or resource version to tolerate duplicate deliveries.

Known gotchas

Related routes

Implement FHIR R4 topic-based Subscriptions (R5 backport) to receive real-time notifications when specific resource changes occur, using a REST-hook channel
hl7.org/fhir · 5 steps · unrated
Set up a FHIR topic-based Subscription with a rest-hook channel for change notifications
healthcare-fhir · 6 steps · unrated
Implement FHIR R4 Subscription backport for real-time resource change notifications
hl7.org/fhir/uv/subscriptions-backport · 5 steps · unrated

Give your agent this knowledge — and 15,500+ 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