This page is part of the FHIR Specification (v4.5.0: R5 Preview #3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B
FHIR Infrastructure Work Group | Maturity Level: 0 | Trial Use | Security Category: Business | Compartments: Not linked to any defined compartments |
Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
The SubscriptionTopic
resource is used to define conceptual or computable events for Subscription resources. A SubscriptionTopic
defines the data and change of interest so that implementing servers can implement specific functionality around subscriptions and clearly communicate boundaries to clients. In other words, a SubscriptionTopic is a way of describing a state change to know that it is of interest. Because it covers a state change, a SubscriptionTopic is typically defined with either a resource-operation pair or resource values tested against the previous and current states.
This document contains information about the SubscriptionTopic
resource and details specific to options in it. See Subscriptions for general information about using Subscriptions in FHIR.
A SubscriptionTopic
represents a well-defined concept to both a client and a server. These concepts fall under several categories:
create
on Observation
resources
%previous.status!='in-progress' and %current.status='in-progress'
There is a close relationship between SubscriptionTopic and Subscription
.
SubscriptionTopic
defines the data and change a Subscription
uses to trigger notifications.
Subscription
describes a particular client's request to be notified about events defined in a SubscriptionTopic
and how those notifications should be delivered.
Subscription
may define additional filters to be applied when detecting events for notifications, but only as defined and allowed in the relevant SubscriptionTopic
.
The use of Subscriptions requires the use of SubscriptionTopics - without an underlying SubscriptionTopic, a Subscription has no meaning and will not trigger any client notifications.
This resource is referenced by Subscription, SubscriptionStatus and itself.
This resource implements the Definition pattern.
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
SubscriptionTopic | TU | DomainResource | Definition Pattern Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
url | Σ | 1..1 | uri | Logical canonical URL to reference this SubscriptionTopic (globally unique) |
identifier | Σ | 0..* | Identifier | Business Identifier for SubscriptionTopic |
version | Σ | 0..1 | string | Business version of the SubscriptionTopic |
title | Σ | 0..1 | string | Name for this SubscriptionTopic (Human friendly) |
derivedFrom | Σ | 0..* | canonical(SubscriptionTopic) | Based on FHIR protocol or definition |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
experimental | ?!Σ | 0..1 | boolean | If for testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date status first applied |
publisher | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | The name of the individual or organization that published the SubscriptionTopic |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | 0..1 | markdown | Natural language description of the ToSubscriptionTopicpic | |
useContext | Σ | 0..* | UsageContext | Content intends to support these contexts |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for Topic (if applicable) Jurisdiction (Extensible) |
purpose | 0..1 | markdown | Why this SubscriptionTopic is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
approvalDate | 0..1 | date | When SubscriptionTopic is/was approved by publisher | |
lastReviewDate | 0..1 | date | Last review date for the SubscriptionTopic | |
effectivePeriod | Σ | 0..1 | Period | The effective date range for the SubscriptionTopic |
resourceTrigger | Σ | 0..1 | BackboneElement | Criteria for including a resource update in the subscription topic |
description | Σ | 0..1 | string | Text representation of the trigger |
resourceType | Σ | 0..* | code | Candidate types for this subscription topic ResourceType (Required) |
methodCriteria | Σ | 0..* | code | create | update | delete Interaction Trigger (Required) |
queryCriteria | Σ | 0..1 | BackboneElement | Query based trigger rule |
previous | Σ | 0..1 | string | Rule applied to previous resource state |
current | Σ | 0..1 | string | Rule applied to current resource state |
requireBoth | Σ | 0..1 | boolean | Both must be true flag |
fhirPathCriteria | Σ | 0..* | string | FHIRPath based trigger rule |
canFilterBy | Σ | 0..* | BackboneElement | Properties by which a Subscription can further filter a SubscriptionTopic |
searchParamName | Σ | 0..1 | string | Search parameter that serves as filter key |
searchModifier | Σ | 0..* | code | = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type Subscription Search Modifier (Required) |
documentation | Σ | 0..1 | markdown | Description of this filter parameter |
Documentation for this format |
UML Diagram (Legend)
XML Template
<SubscriptionTopic xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 1..1 Logical canonical URL to reference this SubscriptionTopic (globally unique) --> <identifier><!-- 0..* Identifier Business Identifier for SubscriptionTopic --></identifier> <version value="[string]"/><!-- 0..1 Business version of the SubscriptionTopic --> <title value="[string]"/><!-- 0..1 Name for this SubscriptionTopic (Human friendly) --> <derivedFrom><!-- 0..* canonical(SubscriptionTopic) Based on FHIR protocol or definition --></derivedFrom> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date status first applied --> <publisher><!-- 0..1 Reference(Organization|Practitioner|PractitionerRole) The name of the individual or organization that published the SubscriptionTopic --></publisher> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the ToSubscriptionTopicpic --> <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for Topic (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this SubscriptionTopic is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <approvalDate value="[date]"/><!-- 0..1 When SubscriptionTopic is/was approved by publisher --> <lastReviewDate value="[date]"/><!-- 0..1 Last review date for the SubscriptionTopic --> <effectivePeriod><!-- 0..1 Period The effective date range for the SubscriptionTopic --></effectivePeriod> <resourceTrigger> <!-- 0..1 Criteria for including a resource update in the subscription topic --> <description value="[string]"/><!-- 0..1 Text representation of the trigger --> <resourceType value="[code]"/><!-- 0..* Candidate types for this subscription topic --> <methodCriteria value="[code]"/><!-- 0..* create | update | delete --> <queryCriteria> <!-- 0..1 Query based trigger rule --> <previous value="[string]"/><!-- 0..1 Rule applied to previous resource state --> <current value="[string]"/><!-- 0..1 Rule applied to current resource state --> <requireBoth value="[boolean]"/><!-- 0..1 Both must be true flag --> </queryCriteria> <fhirPathCriteria value="[string]"/><!-- 0..* FHIRPath based trigger rule --> </resourceTrigger> <canFilterBy> <!-- 0..* Properties by which a Subscription can further filter a SubscriptionTopic --> <searchParamName value="[string]"/><!-- 0..1 Search parameter that serves as filter key --> <searchModifier value="[code]"/><!-- 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type --> <documentation value="[markdown]"/><!-- 0..1 Description of this filter parameter --> </canFilterBy> </SubscriptionTopic>
JSON Template
{ "resourceType" : "SubscriptionTopic", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // R! Logical canonical URL to reference this SubscriptionTopic (globally unique) "identifier" : [{ Identifier }], // Business Identifier for SubscriptionTopic "version" : "<string>", // Business version of the SubscriptionTopic "title" : "<string>", // Name for this SubscriptionTopic (Human friendly) "derivedFrom" : [{ canonical(SubscriptionTopic) }], // Based on FHIR protocol or definition "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // If for testing purposes, not real usage "date" : "<dateTime>", // Date status first applied "publisher" : { Reference(Organization|Practitioner|PractitionerRole) }, // The name of the individual or organization that published the SubscriptionTopic "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the ToSubscriptionTopicpic "useContext" : [{ UsageContext }], // Content intends to support these contexts "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for Topic (if applicable) "purpose" : "<markdown>", // Why this SubscriptionTopic is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "approvalDate" : "<date>", // When SubscriptionTopic is/was approved by publisher "lastReviewDate" : "<date>", // Last review date for the SubscriptionTopic "effectivePeriod" : { Period }, // The effective date range for the SubscriptionTopic "resourceTrigger" : { // Criteria for including a resource update in the subscription topic "description" : "<string>", // Text representation of the trigger "resourceType" : ["<code>"], // Candidate types for this subscription topic "methodCriteria" : ["<code>"], // create | update | delete "queryCriteria" : { // Query based trigger rule "previous" : "<string>", // Rule applied to previous resource state "current" : "<string>", // Rule applied to current resource state "requireBoth" : <boolean> // Both must be true flag }, "fhirPathCriteria" : ["<string>"] // FHIRPath based trigger rule }, "canFilterBy" : [{ // Properties by which a Subscription can further filter a SubscriptionTopic "searchParamName" : "<string>", // Search parameter that serves as filter key "searchModifier" : ["<code>"], // = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type "documentation" : "<markdown>" // Description of this filter parameter }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:SubscriptionTopic; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:SubscriptionTopic.url [ uri ]; # 1..1 Logical canonical URL to reference this SubscriptionTopic (globally unique) fhir:SubscriptionTopic.identifier [ Identifier ], ... ; # 0..* Business Identifier for SubscriptionTopic fhir:SubscriptionTopic.version [ string ]; # 0..1 Business version of the SubscriptionTopic fhir:SubscriptionTopic.title [ string ]; # 0..1 Name for this SubscriptionTopic (Human friendly) fhir:SubscriptionTopic.derivedFrom [ canonical(SubscriptionTopic) ], ... ; # 0..* Based on FHIR protocol or definition fhir:SubscriptionTopic.status [ code ]; # 1..1 draft | active | retired | unknown fhir:SubscriptionTopic.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage fhir:SubscriptionTopic.date [ dateTime ]; # 0..1 Date status first applied fhir:SubscriptionTopic.publisher [ Reference(Organization|Practitioner|PractitionerRole) ]; # 0..1 The name of the individual or organization that published the SubscriptionTopic fhir:SubscriptionTopic.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:SubscriptionTopic.description [ markdown ]; # 0..1 Natural language description of the ToSubscriptionTopicpic fhir:SubscriptionTopic.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts fhir:SubscriptionTopic.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for Topic (if applicable) fhir:SubscriptionTopic.purpose [ markdown ]; # 0..1 Why this SubscriptionTopic is defined fhir:SubscriptionTopic.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:SubscriptionTopic.approvalDate [ date ]; # 0..1 When SubscriptionTopic is/was approved by publisher fhir:SubscriptionTopic.lastReviewDate [ date ]; # 0..1 Last review date for the SubscriptionTopic fhir:SubscriptionTopic.effectivePeriod [ Period ]; # 0..1 The effective date range for the SubscriptionTopic fhir:SubscriptionTopic.resourceTrigger [ # 0..1 Criteria for including a resource update in the subscription topic fhir:SubscriptionTopic.resourceTrigger.description [ string ]; # 0..1 Text representation of the trigger fhir:SubscriptionTopic.resourceTrigger.resourceType [ code ], ... ; # 0..* Candidate types for this subscription topic fhir:SubscriptionTopic.resourceTrigger.methodCriteria [ code ], ... ; # 0..* create | update | delete fhir:SubscriptionTopic.resourceTrigger.queryCriteria [ # 0..1 Query based trigger rule fhir:SubscriptionTopic.resourceTrigger.queryCriteria.previous [ string ]; # 0..1 Rule applied to previous resource state fhir:SubscriptionTopic.resourceTrigger.queryCriteria.current [ string ]; # 0..1 Rule applied to current resource state fhir:SubscriptionTopic.resourceTrigger.queryCriteria.requireBoth [ boolean ]; # 0..1 Both must be true flag ]; fhir:SubscriptionTopic.resourceTrigger.fhirPathCriteria [ string ], ... ; # 0..* FHIRPath based trigger rule ]; fhir:SubscriptionTopic.canFilterBy [ # 0..* Properties by which a Subscription can further filter a SubscriptionTopic fhir:SubscriptionTopic.canFilterBy.searchParamName [ string ]; # 0..1 Search parameter that serves as filter key fhir:SubscriptionTopic.canFilterBy.searchModifier [ code ], ... ; # 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type fhir:SubscriptionTopic.canFilterBy.documentation [ markdown ]; # 0..1 Description of this filter parameter ], ...; ]
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
SubscriptionTopic | TU | DomainResource | Definition Pattern Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
url | Σ | 1..1 | uri | Logical canonical URL to reference this SubscriptionTopic (globally unique) |
identifier | Σ | 0..* | Identifier | Business Identifier for SubscriptionTopic |
version | Σ | 0..1 | string | Business version of the SubscriptionTopic |
title | Σ | 0..1 | string | Name for this SubscriptionTopic (Human friendly) |
derivedFrom | Σ | 0..* | canonical(SubscriptionTopic) | Based on FHIR protocol or definition |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
experimental | ?!Σ | 0..1 | boolean | If for testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date status first applied |
publisher | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | The name of the individual or organization that published the SubscriptionTopic |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | 0..1 | markdown | Natural language description of the ToSubscriptionTopicpic | |
useContext | Σ | 0..* | UsageContext | Content intends to support these contexts |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for Topic (if applicable) Jurisdiction (Extensible) |
purpose | 0..1 | markdown | Why this SubscriptionTopic is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
approvalDate | 0..1 | date | When SubscriptionTopic is/was approved by publisher | |
lastReviewDate | 0..1 | date | Last review date for the SubscriptionTopic | |
effectivePeriod | Σ | 0..1 | Period | The effective date range for the SubscriptionTopic |
resourceTrigger | Σ | 0..1 | BackboneElement | Criteria for including a resource update in the subscription topic |
description | Σ | 0..1 | string | Text representation of the trigger |
resourceType | Σ | 0..* | code | Candidate types for this subscription topic ResourceType (Required) |
methodCriteria | Σ | 0..* | code | create | update | delete Interaction Trigger (Required) |
queryCriteria | Σ | 0..1 | BackboneElement | Query based trigger rule |
previous | Σ | 0..1 | string | Rule applied to previous resource state |
current | Σ | 0..1 | string | Rule applied to current resource state |
requireBoth | Σ | 0..1 | boolean | Both must be true flag |
fhirPathCriteria | Σ | 0..* | string | FHIRPath based trigger rule |
canFilterBy | Σ | 0..* | BackboneElement | Properties by which a Subscription can further filter a SubscriptionTopic |
searchParamName | Σ | 0..1 | string | Search parameter that serves as filter key |
searchModifier | Σ | 0..* | code | = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type Subscription Search Modifier (Required) |
documentation | Σ | 0..1 | markdown | Description of this filter parameter |
Documentation for this format |
XML Template
<SubscriptionTopic xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 1..1 Logical canonical URL to reference this SubscriptionTopic (globally unique) --> <identifier><!-- 0..* Identifier Business Identifier for SubscriptionTopic --></identifier> <version value="[string]"/><!-- 0..1 Business version of the SubscriptionTopic --> <title value="[string]"/><!-- 0..1 Name for this SubscriptionTopic (Human friendly) --> <derivedFrom><!-- 0..* canonical(SubscriptionTopic) Based on FHIR protocol or definition --></derivedFrom> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date status first applied --> <publisher><!-- 0..1 Reference(Organization|Practitioner|PractitionerRole) The name of the individual or organization that published the SubscriptionTopic --></publisher> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the ToSubscriptionTopicpic --> <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for Topic (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this SubscriptionTopic is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <approvalDate value="[date]"/><!-- 0..1 When SubscriptionTopic is/was approved by publisher --> <lastReviewDate value="[date]"/><!-- 0..1 Last review date for the SubscriptionTopic --> <effectivePeriod><!-- 0..1 Period The effective date range for the SubscriptionTopic --></effectivePeriod> <resourceTrigger> <!-- 0..1 Criteria for including a resource update in the subscription topic --> <description value="[string]"/><!-- 0..1 Text representation of the trigger --> <resourceType value="[code]"/><!-- 0..* Candidate types for this subscription topic --> <methodCriteria value="[code]"/><!-- 0..* create | update | delete --> <queryCriteria> <!-- 0..1 Query based trigger rule --> <previous value="[string]"/><!-- 0..1 Rule applied to previous resource state --> <current value="[string]"/><!-- 0..1 Rule applied to current resource state --> <requireBoth value="[boolean]"/><!-- 0..1 Both must be true flag --> </queryCriteria> <fhirPathCriteria value="[string]"/><!-- 0..* FHIRPath based trigger rule --> </resourceTrigger> <canFilterBy> <!-- 0..* Properties by which a Subscription can further filter a SubscriptionTopic --> <searchParamName value="[string]"/><!-- 0..1 Search parameter that serves as filter key --> <searchModifier value="[code]"/><!-- 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type --> <documentation value="[markdown]"/><!-- 0..1 Description of this filter parameter --> </canFilterBy> </SubscriptionTopic>
JSON Template
{ "resourceType" : "SubscriptionTopic", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // R! Logical canonical URL to reference this SubscriptionTopic (globally unique) "identifier" : [{ Identifier }], // Business Identifier for SubscriptionTopic "version" : "<string>", // Business version of the SubscriptionTopic "title" : "<string>", // Name for this SubscriptionTopic (Human friendly) "derivedFrom" : [{ canonical(SubscriptionTopic) }], // Based on FHIR protocol or definition "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // If for testing purposes, not real usage "date" : "<dateTime>", // Date status first applied "publisher" : { Reference(Organization|Practitioner|PractitionerRole) }, // The name of the individual or organization that published the SubscriptionTopic "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the ToSubscriptionTopicpic "useContext" : [{ UsageContext }], // Content intends to support these contexts "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for Topic (if applicable) "purpose" : "<markdown>", // Why this SubscriptionTopic is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "approvalDate" : "<date>", // When SubscriptionTopic is/was approved by publisher "lastReviewDate" : "<date>", // Last review date for the SubscriptionTopic "effectivePeriod" : { Period }, // The effective date range for the SubscriptionTopic "resourceTrigger" : { // Criteria for including a resource update in the subscription topic "description" : "<string>", // Text representation of the trigger "resourceType" : ["<code>"], // Candidate types for this subscription topic "methodCriteria" : ["<code>"], // create | update | delete "queryCriteria" : { // Query based trigger rule "previous" : "<string>", // Rule applied to previous resource state "current" : "<string>", // Rule applied to current resource state "requireBoth" : <boolean> // Both must be true flag }, "fhirPathCriteria" : ["<string>"] // FHIRPath based trigger rule }, "canFilterBy" : [{ // Properties by which a Subscription can further filter a SubscriptionTopic "searchParamName" : "<string>", // Search parameter that serves as filter key "searchModifier" : ["<code>"], // = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type "documentation" : "<markdown>" // Description of this filter parameter }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:SubscriptionTopic; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:SubscriptionTopic.url [ uri ]; # 1..1 Logical canonical URL to reference this SubscriptionTopic (globally unique) fhir:SubscriptionTopic.identifier [ Identifier ], ... ; # 0..* Business Identifier for SubscriptionTopic fhir:SubscriptionTopic.version [ string ]; # 0..1 Business version of the SubscriptionTopic fhir:SubscriptionTopic.title [ string ]; # 0..1 Name for this SubscriptionTopic (Human friendly) fhir:SubscriptionTopic.derivedFrom [ canonical(SubscriptionTopic) ], ... ; # 0..* Based on FHIR protocol or definition fhir:SubscriptionTopic.status [ code ]; # 1..1 draft | active | retired | unknown fhir:SubscriptionTopic.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage fhir:SubscriptionTopic.date [ dateTime ]; # 0..1 Date status first applied fhir:SubscriptionTopic.publisher [ Reference(Organization|Practitioner|PractitionerRole) ]; # 0..1 The name of the individual or organization that published the SubscriptionTopic fhir:SubscriptionTopic.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:SubscriptionTopic.description [ markdown ]; # 0..1 Natural language description of the ToSubscriptionTopicpic fhir:SubscriptionTopic.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts fhir:SubscriptionTopic.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for Topic (if applicable) fhir:SubscriptionTopic.purpose [ markdown ]; # 0..1 Why this SubscriptionTopic is defined fhir:SubscriptionTopic.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:SubscriptionTopic.approvalDate [ date ]; # 0..1 When SubscriptionTopic is/was approved by publisher fhir:SubscriptionTopic.lastReviewDate [ date ]; # 0..1 Last review date for the SubscriptionTopic fhir:SubscriptionTopic.effectivePeriod [ Period ]; # 0..1 The effective date range for the SubscriptionTopic fhir:SubscriptionTopic.resourceTrigger [ # 0..1 Criteria for including a resource update in the subscription topic fhir:SubscriptionTopic.resourceTrigger.description [ string ]; # 0..1 Text representation of the trigger fhir:SubscriptionTopic.resourceTrigger.resourceType [ code ], ... ; # 0..* Candidate types for this subscription topic fhir:SubscriptionTopic.resourceTrigger.methodCriteria [ code ], ... ; # 0..* create | update | delete fhir:SubscriptionTopic.resourceTrigger.queryCriteria [ # 0..1 Query based trigger rule fhir:SubscriptionTopic.resourceTrigger.queryCriteria.previous [ string ]; # 0..1 Rule applied to previous resource state fhir:SubscriptionTopic.resourceTrigger.queryCriteria.current [ string ]; # 0..1 Rule applied to current resource state fhir:SubscriptionTopic.resourceTrigger.queryCriteria.requireBoth [ boolean ]; # 0..1 Both must be true flag ]; fhir:SubscriptionTopic.resourceTrigger.fhirPathCriteria [ string ], ... ; # 0..* FHIRPath based trigger rule ]; fhir:SubscriptionTopic.canFilterBy [ # 0..* Properties by which a Subscription can further filter a SubscriptionTopic fhir:SubscriptionTopic.canFilterBy.searchParamName [ string ]; # 0..1 Search parameter that serves as filter key fhir:SubscriptionTopic.canFilterBy.searchModifier [ code ], ... ; # 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type fhir:SubscriptionTopic.canFilterBy.documentation [ markdown ]; # 0..1 Description of this filter parameter ], ...; ]
See the Profiles & Extensions and the alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions, the spreadsheet version & the dependency analysis a
Path | Definition | Type | Reference |
---|---|---|---|
SubscriptionTopic.status | The lifecycle status of an artifact. | Required | PublicationStatus |
SubscriptionTopic.jurisdiction | Countries and regions within which this artifact is targeted for use. | Extensible | Jurisdiction ValueSet |
SubscriptionTopic.resourceTrigger.resourceType | Resource types defined as part FHIR. | Required | ResourceType |
SubscriptionTopic.resourceTrigger.methodCriteria | FHIR RESTful interaction used for subscription topic trigger. | Required | InteractionTrigger |
SubscriptionTopic.canFilterBy.searchModifier | Operator to apply to filter label. | Required | SubscriptionSearchModifier |
Each server is responsible for accurately implementing each SubscriptionTopic it advertises support for. Due to the breadth of possible topics, detailed implementation guidance cannot be provided here. Following are a few topics to consider when implementing a Subscription Topic within a server:
Defining a new SubscriptionTopic
requires clear communication to implementers of both clients and servers around requirements and expectations. Anyone defining a SubscriptionTopic
is encouraged to publish their definition at registry.fhir.org . Below are some areas which should be considered when creating a SubscriptionTopic
.
Definitions for Subscription Topics fall into three categories, which are described in more detail below. Good definitions will have useful definitions for two parts (conceptual and one of the other two), but the server implementation should always prioritize accurately representing the concept definition.
Subscription Topics MUST always document the concept it represents. While a short definition is included in the SubscriptionTopic
itself, this documentation will typically not be sufficient for implementers. Definitions must be clear and specific. For example, if the goal is to define an 'admission' topic, the single word is common enough to feel sufficient - implementers generally know what an 'admission' is and could implement something that would qualify. However, is the intention to represent a patient being physically admitted to a care facility, or the start of a clinical encounter? Either definition is common, and without more information implementations will not be consistent. Without complete and specific definitions, server implementions will vary and clients will have unexpected behavior.
Subscription Topics based on Resource Operation Pairs are the simplest to describe - definitions include the resource type (e.g., Patient
, Encounter
) and the operation of interest (e.g., create
, delete
).
Subscription Topics for resource-operation pairs are defined using the SubscriptionTopic.resourceTrigger.resourceType
and SubscriptionTopic.resourceTrigger.methodCriteria
fields.
Subscription Topics defined around resource create
operations are triggered each time a resource of the specified type is created.
Filters for create
operations are restricted to the type of resource being created and must be evaluated on the created resource instance. If more complicated filtering is required (e.g., new Observations when a Patient has a given diagnosis), implementers should use the computable definitions provided by Resource Value Tests.
Subscription Topics defined around resource delete
operations are triggered each time a resource of the specified type is deleted.
Filters for delete
operations are restricted to the type of resource being deleted and must be evaluated on the resource instance being deleted. If more complicated filtering is required (e.g., deleting a Patient which has a particular Observation), implementers should use the computable definitions provided by Resource Value Tests.
Subscription Topics defined around resource update
operations are triggered each time the server updates a resource of the specified type. Triggering an update
operation does not imply that the resource has changes visible to the subscriber, nor does it require servers to monitor resources for actual changes. Servers MAY generate notifications on their internal triggers, regardless of actual changes (e.g., a client issuing an HTTP PUT with an identical resource).
Filters for update
operations are restricted to the type of resource being updated and must be evaluated on the resource instance after the update is performed (e.g., post-state change). If more complicated filtering is required (e.g., detecting when an Encounter leaves the 'in-progress' state), implementers should use the computable definitions provided by Resource Value Tests.
If a topic requires more granularity than operations provide, a topic can provide either FHIRPath or query (Search) definitions to test against state changes.
Computable Definitions serve two purposes when defining topics. First, some server implementers may be able to use computable definitions directly (or with minimal changes). In this scenario, the benifit of a computable definition is quite large (e.g., user-defined SubscriptionTopics
, high portability, etc.). Second, implementers that do not use computable definitions internally will be able to read definitions during their implementation in order to precisley understand what is being defined.
Query definitions are based on Search evaluations performed before and/or after a state change in the server. Allowed query parameters are based on the SubscriptionTopic.resourceTrigger.resourceType
(e.g., if the resource is an Encounter, the list of available search parameters can be found here).
FHIRPath expressions can be used to define topical state changes in a server. Each FHIRPath expression is assumed to be provided the inputs listed below. If multiple FHIRPath expressions are present in SubscriptionTopic.resourceTrigger.fhirPathCriteria
, they are joined together by AND clauses.
FHIRPath expression input variables:
In order to reduce the complexity of evaluating Subscription
requests at runtime, topics define what filters clients are allowed to request. These filters are applied in servers to filter possible events into events that a particular client is interested in (e.g., from a topic defining all all admissions to a subscription for admissions on patients within a care team).
The element SubscriptionTopic.canFilterBy.searchParamName
contains the name of the search parameter used to filter events for the focus resource (defined by SubscriptionTopic.resourceTrigger.resourceType
). The search parameter must be either from the list of Parameters for all resources (e.g., _id
, _tag
) or the parameters defined by the specific resource (e.g., Encounter Search Parameters, Patient search parameters, etc.).
If a search parameter name is not provided, it is defaulted to _id
.
The element SubscriptionTopic.canFilterBy.searchModifier
contains the search modifier used when evaluating a change. Allowed search parameters are pulled from Search, with the addition of =
to show simple equality (e.g., no modifier). Note that modifiers are only valid for specific types of data (e.g., a modifer of sa
(starts after) has no meaning when applied to a string).
If a search modifier is not provided, it is defaulted to =
(no modifer).
When to evaluate filters depends on the type of change covered by the topic.
Filters for create
operations must be applied after the resource has been created. For example, a topic interested in new patients may allow filters on elements within the patient resource (e.g., new patients in a specified age range).
Filters for delete
operations must be applied before the resource has been deleted. For example, a topic interested in practitioners being removed may allow filters on the practitioner resource (e.g., removed practitioners with a specific qualification).
Filters for update
operations can be applied to either the pre-update or post-update state. Servers SHOULD document their method of operation.
Implementers are encouraged to add additional filters, but cannot remove existing ones nor change the 'concept' of a SubscriptionTopic during derivation. For example:
Trial-Use Note: Warning: This section is still in early drafting.
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Expression | In Common |
date N | date | Date status first applied | SubscriptionTopic.date | |
derived-or-self N | uri | A server defined search that matches either the url or derivedFrom | SubscriptionTopic.url | SubscriptionTopic.derivedFrom | |
identifier | token | Business Identifier for SubscriptionTopic | SubscriptionTopic.identifier | |
publisher | reference | The name of the individual or organization that published the SubscriptionTopic | SubscriptionTopic.publisher (Practitioner, Organization, PractitionerRole) | |
resource-type N | token | Candidate types for this subscription topic | SubscriptionTopic.resourceTrigger.resourceType | |
status N | token | draft | active | retired | unknown | SubscriptionTopic.status | |
title N | string | Name for this SubscriptionTopic (Human friendly) | SubscriptionTopic.title | |
trigger-description N | string | Text representation of the trigger | SubscriptionTopic.resourceTrigger.description | |
url N | uri | Logical canonical URL to reference this SubscriptionTopic (globally unique) | SubscriptionTopic.url | |
version N | token | Business version of the SubscriptionTopic | SubscriptionTopic.version |