Aidbox topic-based subscriptions
Last updated
Last updated
This functionality is available in Aidbox versions 2409 and later.
This feature enables dynamic subscriptions to changes in FHIR resources, allowing users/systems to receive notifications through multiple channels, including Kafka.
For an application example, refer to Aidbox Subscriptions & Kafka AidboxTopicDestination
AidboxSubscriptionTopic
is a custom Aidbox resource modeled after the FHIR R6 SubscriptionTopic resource. The resource allows defining a set of events that clients can subscribe to, such as changes in specific resources.
FHIR Compliance:
For FHIR R4: Use the AidboxSubscriptionTopic
as it is, since FHIR does not include this functionality in R4.
For FHIR R4b, R5, and R6: You can use either the AidboxSubscriptionTopic
or the FHIR SubscriptionTopic resource, depending on the FHIR version used. These version-specific resources will be added in the upcoming releases.
AidboxTopicDestination
is a custom Aidbox resource that defines where and how the notifications triggered by an AidboxSubscriptionTopic
should be sent. This resource offers flexibility in specifying various types of destinations. And is considered as a system configuration resource.
AidboxSubscriptionStatus
is a custom Aidbox resource which describes the notifications: what messages stored in the bundle, source and destination.
The AidboxSubscriptionTopic
resource describes the data sources for subscriptions. It allows clients to subscribe to events in Aidbox and filter them using user-defined triggers, which are specified by the trigger
element. Supported properties:
resource
*
uri
Resource (reference to definition) for this trigger definition. It is binding to All Resource Types.
supportedInteraction
code
create | update | delete
fhirPathCriteria
string
FHIRPath based trigger rule. Only current resource state is allowed.
description
string
Text representation of the event trigger.
* required.
AidboxSubscriptionTopic
resourceThe AidboxTopicDestination
resource is used to define channel configurations for processing subscription data.
To start processing subscription data, create a AidboxTopicDestination
resource with a reference to the AidboxSubscriptionTopic
. Examples of AidboxTopicDestination
resources can be found in sub-sections.
To stop processing subscription data, delete the AidboxTopicDestination
resource.
Ensure that the resource metadata contains the kind-specific AidboxTopicDestination
profile.
status
code
active
- the only possible value for now. Expected to be expanded.
topic
*
string
Url of AidboxSubscriptionTopic
resource.
kind
*
code
Defines the destination for sending notifications. Supported values: kafka-at-least-once
, kafka-best-effort
, webhook-at-least-once
, gcp-pubsub-at-least-once
parameter
*
Defines the destination parameters for sending notifications. Parameters are restricted by profiles for each destination.
content
full-resource
| id-only
| empty
full-resource
is the default value.
* required.
Notification is a FHIR Bundle resource with history
type, containing relevant resources in its entries. The first entry is a AidboxSubscriptionStatus
resource, which describes the payload.
The other entries depend on AidboxTopicDestination
content
parameter. This parameter is the binding to the FHIR subscription-payload-content value set: full-resource
| id-only
| empty