Subscription Definitions
<a id="Subscription"></a>
Subscription
Information about a request for notifications to a client based on a SubscriptionTopic
Definition: The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
Aliases: WebHook, Hook, Routing Rule
Cardinality: 0..*
Mappings: rim=N/A; w5=infrastructure.exchange
<a id="Subscription.identifier"></a>
Subscription.identifier
Additional identifiers (business identifier)
Definition: A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.
Cardinality: 0..*
Type: Identifier
Summary: true
Mappings: w5=FiveWs.identifier
<a id="Subscription.name"></a>
Subscription.name
Human readable name for this subscription
Definition: A natural language name identifying the subscription.
Cardinality: 0..1
Type: string
Summary: true
<a id="Subscription.status"></a>
Subscription.status
requested | active | error | off | entered-in-error
Definition: The status of the subscription, which marks the server state for managing the subscription.
Comments: A client can only submit subscription resources in the requested or off state. Only the server can move a subscription from requested to active, and then to error. Either the server or the client can turn a subscription off.
This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.
Cardinality: 1..1
Type: code
Binding: required:subscription-status
Summary: true
Is Modifier: true (Reason: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid)
Mappings: w5=FiveWs.status
<a id="Subscription.topic"></a>
Subscription.topic
Reference to the subscription topic being subscribed to
Definition: The reference to the subscription topic to be notified about.
Cardinality: 1..1
Type: canonical
Summary: true
Mappings: w5=FiveWs.what[x]
<a id="Subscription.contact"></a>
Subscription.contact
Contact details for source (e.g. troubleshooting)
Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
Cardinality: 0..*
Type: ContactPoint
Summary: true
Mappings: w5=FiveWs.subject
<a id="Subscription.end"></a>
Subscription.end
When to automatically delete the subscription
Definition: The time for the server to turn the subscription off.
Comments: The server is permitted to deviate from this time but should observe it.
Cardinality: 0..1
Type: instant
Summary: true
Mappings: w5=FiveWs.done[x]
<a id="Subscription.managingEntity"></a>
Subscription.managingEntity
Entity responsible for Subscription changes
Definition: Entity with authorization to communicate with the server about this Subscription, such as requesting changes (e.g., updating an endpoint URL).
Comments: Note that the managing entity for a subscription does not need to be the client (e.g., in the case of server-managed Subscriptions).
Cardinality: 0..1
Type: Reference(CareTeam, Device, Group, HealthcareService, Organization, RelatedPerson, Patient, Practitioner, PractitionerRole)
Summary: true
Mappings: w5=FiveWs.author
<a id="Subscription.reason"></a>
Subscription.reason
Description of why this subscription was created
Definition: A description of why this subscription is defined.
Cardinality: 0..1
Type: string
Summary: true
Mappings: w5=FiveWs.why[x]
<a id="Subscription.filterBy"></a>
Subscription.filterBy
Criteria for narrowing the subscription topic stream
Definition: The filter properties to be applied to narrow the subscription topic stream. When multiple filters are applied, evaluates to true if all the conditions applicable to that resource are met; otherwise it returns false (i.e., logical AND).
Cardinality: 0..*
Type: BackboneElement
Summary: true
Constraints: scr-1 | error | Subscription filters may only contain a modifier or a comparator | (comparator.exists() and modifier.exists()).not()
<a id="Subscription.filterBy.resource"></a>
Subscription.filterBy.resource
Allowed Resource (reference to definition) for this Subscription filter
Definition: A resource listed in the SubscriptionTopic this Subscription references (SubscriptionTopic.canFilterBy.resource). This element can be used to differentiate filters for topics that include more than one resource type.
Cardinality: 0..1
Type: uri
Binding: extensible:subscription-types
Summary: true
<a id="Subscription.filterBy.filterParameter"></a>
Subscription.filterBy.filterParameter
Filter label defined in SubscriptionTopic
Definition: The filter as defined in the SubscriptionTopic.canFilterBy.filterParameter element.
Cardinality: 1..1
Type: string
Summary: true
<a id="Subscription.filterBy.comparator"></a>
Subscription.filterBy.comparator
eq | ne | gt | lt | ge | le | sa | eb | ap
Definition: Comparator applied to this filter parameter.
Comments: Must be a comparator allowed by the SubscriptionTopic relevant to this Subscription filter.
Conditions: scr-1
Cardinality: 0..1
Type: code
Binding: required:search-comparator
<a id="Subscription.filterBy.modifier"></a>
Subscription.filterBy.modifier
missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate
Definition: Modifier applied to this filter parameter.
Comments: Must be a modifier allowed by the SubscriptionTopic relevant to this Subscription filter.
Conditions: scr-1
Cardinality: 0..1
Type: code
Binding: required:search-modifier-code
<a id="Subscription.filterBy.value"></a>
Subscription.filterBy.value
Literal value or resource path
Definition: The literal value or resource path as is legal in search - for example, Patient/123 or le1950.
Cardinality: 1..1
Type: string
Summary: true
<a id="Subscription.filterBy.event"></a>
Subscription.filterBy.event
Event to filter by
Definition: An event filter to be applied to the topic - e.g., if a topic defined multiple event triggers, this can be used to specify a single one. Multiple values are or-joined, multiple codings within a value are and-joined.
Cardinality: 0..*
Type: CodeableConcept
Binding: example:v2-0003
Summary: true
<a id="Subscription.channelType"></a>
Subscription.channelType
Channel type for notifications
Definition: The type of channel to send notifications on.
Cardinality: 1..1
Type: Coding
Binding: extensible:subscription-channel-type
Summary: true
<a id="Subscription.endpoint"></a>
Subscription.endpoint
URL where the channel sends notifications
Definition: Channel-specific URL that describes where notifications are sent.
Comments: The URL requirements are based on channel type. For example, in a rest-hook channel, the URL must use the http or https protocol and be supplied by the client; in a websocket channel, the URL uses the ws or wss protocol and is supplied by the server.
Note that the URI is allowed to be relative. Relative URLs are relative to the FHIR server base URL (since there may be more than one, clients should avoid using relative URIs).
Cardinality: 0..1
Type: url
Summary: true
<a id="Subscription.parameter"></a>
Subscription.parameter
Channel type dependent information
Definition: Channel-dependent information to send as part of the notification (e.g., HTTP Headers).
Comments: Exactly what these mean depends on the channel type. They can convey additional information to the server or recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions. Note that names are not required to be unique, but channel definitions can impose restrictions.
Cardinality: 0..*
Type: BackboneElement
<a id="Subscription.parameter.name"></a>
Subscription.parameter.name
Name (key) of the parameter
Definition: Parameter name for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the name would be Authorization.
Cardinality: 1..1
Type: string
<a id="Subscription.parameter.value"></a>
Subscription.parameter.value
Value of the parameter to use or pass through
Definition: Parameter value for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the value would be Bearer 0193....
Cardinality: 1..1
Type: string
<a id="Subscription.heartbeatPeriod"></a>
Subscription.heartbeatPeriod
Interval in seconds to send 'heartbeat' notification
Definition: If present, a 'heartbeat' notification (keep-alive) is sent via this channel with an interval period equal to this elements integer value in seconds. If not present, a heartbeat notification is not sent.
Cardinality: 0..1
Type: unsignedInt
Summary: true
<a id="Subscription.timeout"></a>
Subscription.timeout
Timeout in seconds to attempt notification delivery
Definition: If present, the maximum amount of time a server will allow before failing a notification attempt.
Cardinality: 0..1
Type: unsignedInt
Summary: true
<a id="Subscription.contentType"></a>
Subscription.contentType
MIME type to send, or omit for no payload
Definition: The MIME type to send the payload in - e.g., application/fhir+xml or application/fhir+json. Note that:
-
clients may request notifications in a specific FHIR version by using the FHIR Version Parameter - e.g.,
application/fhir+json; fhirVersion=4.0. -
additional MIME types can be allowed by channels - e.g.,
text/plainandtext/htmlare defined by the Email channel.
Cardinality: 0..1
Type: code
Binding: required:mimetypes
Summary: true
<a id="Subscription.content"></a>
Subscription.content
empty | id-only | full-resource
Definition: How much resource content to deliver in the notification payloads. The choices are an empty payload, only the resource id, or the full resource content.
Comments: Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured. For additional information, see Notification Content.
Cardinality: 0..1
Type: code
Binding: required:subscription-payload-content
Summary: true
<a id="Subscription.maxCount"></a>
Subscription.maxCount
Maximum number of events that can be combined in a single notification
Definition: If present, the maximum number of events that will be included in a notification bundle. Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.
Cardinality: 0..1
Type: positiveInt
Summary: true