FHIR R4 Current Build
This page is part of FHIR R4 - the current version v4.0.0 - in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions .
FHIR Infrastructure Work Group Maturity Level : 3 0   Trial Use Security Category : Business Compartments : Not linked to any defined compartments

Detailed Descriptions for the elements in the Subscription resource.

Comments Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured.
Subscription
Element Id Subscription
Definition

The subscription resource is used to define a push-based subscription from describes a server particular client's request to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends be notified about a message on the defined "channel" so that another system can take an appropriate action. Topic.

Cardinality 0..*
Type DomainResource
Alternate Names WebHook; Hook; Routing Rule
Subscription.identifier
Element Id Subscription.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.

Note This is a business identifier, not a resource identifier (see discussion )
Cardinality 0..*
Type Identifier
Summary true
Subscription.name
Element Id Subscription.name
Definition

A natural language name identifying the subscription.

Cardinality 0..1
Type string
Summary true
Subscription.status
Element Id Subscription.status
Definition

The status of the subscription, which marks the server state for managing the subscription.

Cardinality 1..1
Terminology Binding SubscriptionStatus ( Required )
Type code
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)
Summary true
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.

Subscription.topic
Element Id Subscription.topic
Definition

The reference to the topic to be notified about.

Cardinality 1..1
Type Reference ( Topic )
Summary true
Subscription.contact
Element Id Subscription.contact
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
Subscription.end
Element Id Subscription.end
Definition

The time for the server to turn the subscription off.

Cardinality 0..1
Type instant
Summary true
Comments

The server is permitted to deviate from this time but should observe it.

Subscription.reason
Element Id Subscription.reason
Definition

A description of why this subscription is defined.

Cardinality 1..1
Type string
Summary true
Subscription.criteria Subscription.filterBy
Element Id Subscription.criteria Subscription.filterBy
Definition

The rules that the server should use filter properties to determine when be applied to generate notifications for this subscription. narrow the topic stream. When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false. (i.e., logical AND).

Cardinality 0..*
Summary true
Subscription.filterBy.name
Element Id Subscription.filterBy.name
Definition

The filter label (=key) as defined in the Topic.canFilterBy.name element.

Cardinality 1..1
Type string
Summary true
Subscription.filterBy.matchType
Comments Element Id Subscription.filterBy.matchType
Definition

The rules are search criteria (without operator to apply to the [base] part). Like Bundle.entry.request.url, it has no leading "/". filter value when determining matches (Search modifiers).

Cardinality 0..1
Terminology Binding SubscriptionFilterByMatchType ( Required )
Type code
Summary true
Subscription.filterBy.value
Element Id Subscription.filterBy.value
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
Subscription.error
Element Id Subscription.error
Definition

A record of the last error that occurred when the server processed a notification.

Cardinality 0..*
Terminology Binding Subscription Error Codes ( Example )
Type CodeableConcept
Summary true
Comments

Recommended practice: If available, convey the HTTP error in an adjacent Coding or in text.

Subscription.eventCount
Element Id Subscription.eventCount
Definition

A record of the number of events for which the server has attempted delivery on this subscription (i.e., the number of events that occurred while the subscription is in an "active" or "error" state -- not "requested" or "off"). Server Initializes to 0 for a new subscription. Repeated attempts at delivery of the same event notification do not increment this counter.

Cardinality 0..1
Type string unsignedInt
Summary true
Subscription.channel
Element Id Subscription.channel
Definition

Details where to send notifications when resources are received that meet the criteria.

Cardinality 1..1
Summary true
Subscription.channel.type
Element Id Subscription.channel.type
Definition

The type of channel to send notifications on.

Cardinality 1..1
Terminology Binding SubscriptionChannelType SubscriptionChannel Type Codes ( Required Extensible )
Type code CodeableConcept
Summary true
Subscription.channel.endpoint
Element Id Subscription.channel.endpoint
Definition

The url that describes the actual end-point to send messages to.

Cardinality 0..1
Type url
Summary true
Comments

For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs).

Subscription.channel.header
Element Id Subscription.channel.header
Definition

Additional headers / information to send as part of the notification.

Cardinality 0..*
Type string
Summary true
Comments

Exactly what these mean depend on the channel type. They can convey additional information to the recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions.

Subscription.channel.heartbeatPeriod
Element Id Subscription.channel.heartbeatPeriod
Definition

If present, a 'hearbeat" notification (keepalive) is sent via this channel with an the 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
Subscription.channel.payload
Element Id Subscription.channel.payload
Definition

The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. mimetype and content. If the payload is not present, then there is no payload in the notification, just a notification.

Cardinality 0..1
Summary true
Subscription.channel.payload.contentType
Element Id Subscription.channel.payload.contentType
Definition

The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The mime type "text/plain" may also be used for Email and SMS subscriptions.

Cardinality 0..1
Terminology Binding MimeType ( Required )
Type code
Summary true
Subscription.channel.header Subscription.channel.payload.content
Element Id Subscription.channel.header Subscription.channel.payload.content
Definition

Additional headers / information to send as part How much of the notification. resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.

Cardinality 0..* 0..1
Terminology Binding SubscriptionPayloadContent ( Required )
Type string code
Summary true
Comments

Exactly what these mean depend on the channel type. They can convey additional information to Sending the recipient and/or meet payload has obvious security requirements; implications. The server is responsible for example, support of multiple headers in ensuring that the outgoing notifications for rest-hook type subscriptions. content is appropriately secured.