Aidbox SubSubscriptions
While Aidbox SubSubscriptions are stable and fully functional, they will no longer receive active development or new features. For enhanced capabilities and ongoing support, please use Aidbox topic-based subscriptions. This newer implementation offers improved performance, flexibility, and will continue to be developed to meet future needs.
Aidbox subscriptions module is a way to subscribe and get notifications about updating resources on the server. It is a common denominator of FHIR R4/R5 subscriptions specification with some extensions.
This module introduces two new resources into Aidbox:
SubsSubscription — meta-resource which binds events (create/update/delete resource) with a communication channel through which subscriber is notified about changes.
SubsNotification — resource which represents notification with its status (sent or not).
Aidbox doesn't delete SubsNotification resources by itself. The simple way to implement a retention policy is to create a cron job. Let us know if there is a more clear way.
See tutorial "Subscribe to new Patient resource"
Your service can register subscription by POST SubsSubscription resource:
Trigger format
Subscription.trigger is a key-value object, where key is resource type and each value can contain a collection of events (values can be 'all', 'create', 'update', 'delete') and .filter collection. For now filter support matcho engine (FHIRPath and FHIR Search filters are coming soon):
Filter matches if at least one of item in the collection matches, i.e. collection has or
semantic.
Protocol
After you registered subscription, Aidbox sends on channel.endpoint handshake
notification in json format. It's good if your service responds with status: 200
On every trigger event Aidbox will send a notification to your service endpoint. Your service has to respond with status: 200
and optional json body.
Results of all notifications are logged into SubsNotification resource:
SubsSubscription/<id>/$handshake
You can force a handshake notification for the specific subscription with:
SubsSubscription/<id>/$debug
To debug subscription notifications, you can send debug messages with:
SubsNotification/$notify (not implemented yet)
Or you can send a list of notifications by providing a list of search params:
SubsNotification/<id>/$notify
You can resend the specific notification with
/subs/webhook (not implemented yet)
You can subscribe one instance of Aidbox to notifications from another instance and replicate data between boxes by using /subs/webhook/<source-id>
endpoint:
Last updated