Subscription Adapter Implementation Guide
0.1.0 - ci-build
Publish Box goes here
The adapter uses the R4 shape from the HL7 Subscriptions R5 Backport IG. This lets R4 systems use the Subscription concepts from later FHIR versions without requiring native R5 support.
Basic resources;Subscription plus backport extensions;Bundle.type = history;Parameters resource representing backported SubscriptionStatus;related-query part in notification-event.subscriber system
-> local subscribe request
subscriber adapter
-> FHIR Subscription
source adapter
-> handshake notification
subscriber adapter
source system
-> simple event signal
source adapter
-> event notification with related-query
subscriber adapter
-> GET related-query
source adapter
-> event-specific FHIR Bundle
subscriber adapter
-> local received event data
subscriber system
The notification does not include the medical content. It includes enough context to let the receiver perform a pull:
The example related query is:
GET /source-adapter/fhir/$notify-pull?notification-id={notification-id}
The source adapter role queries the source-system FHIR API by notification-id and returns a FHIR searchset Bundle containing only the data elements for that event:
Observation;QuestionnaireResponse.The pull response is intentionally event-specific. It should not return all resources for the patient. This keeps event notifications small and makes replay/audit behavior easier to reason about.
The source adapter matches source events to subscriptions by:
The prototype stores patient scope on the subscription. A production topic may define additional filters, but patient-level scope is the minimum for this example.
Creating the same subscription again for the same endpoint, topic and patient returns the existing subscription. The source adapter does not create another active subscription and does not send another handshake.
This makes subscription creation safe to retry.
Notify pull is useful when:
In production, the pull query must be governed by active relationship, consent, authorization, replay policy, endpoint identity and source-system audit.