FHIR Subscriptions
SanteDB supports subscribing to resource events via the creation of Subscription
resource instances.
Currently the SanteDB iCDR PubSub layer does not use persistence queues for retry/resubmit. This feature is currently under construction, as of version 2.1.x PubSub requests are realtime push notifications and the use of an external reliable delivery method is recommended.
Creating Subscriptions
The underlying implementation of the FHIR Subscription mechanism is the SanteDB PubSub broker, when a Subscription
resource is created the SanteDB iCDR service interacts with the PubSub broker to:
Create a new channel definition with the appropriate endpoint and authentication information,
Creates a new subscription definition with the appropriate filter criteria,
Activates the subscription if
active
is set to true.
For example, consider this subscription request
This subscription definition would:
Create a new channel definition pointing at http://localhost:8989
Content/Type would be added (
application/fhir+json
) to the channel definitionAuthorization header (
bearer secret-token-abc-123
) added to the channel definitionThe channel dispatcher would be mapped from
rest-hook
to theFhirRestHookDispatcher
Create a new subscription definition :
FHIR resource type
Patient
would be mapped to targetSanteDB.Core.Model.Roles.Patient
Filter criteria
gender=female
would be mapped to HDSI filtergenderConcept.referenceTerm.mnemonic=female
Subscription would be activated
Subscription would have a
notAfter
time set of2025-01-01
Supported Dispatchers
The SanteDB iCDR supports the following dispatchers on the channel:
Type
Channel Scheme
Dispatcher
rest-hook
fhir-rest-http://
FhirPubSubRestHookDispatcher
message
fhir-msg-http://
FhirPubSubMessageDispatcher
sms
sms://
Default handler for SMS messages
mailto://
Default handler for e-mail messages
llp (extended)
llp://
Notify using HL7v2 LL (extended option)
Last updated