Release 4B Snapshot 3: Connectathon 32 Base

This page is part of the FHIR Specification (v4.3.0: R4B - STU (v5.0.0-snapshot3: R5 Snapshot #3, to support Connectathon 32 ). 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

2.48 2.15 Resource SubscriptionTopic - Content

FHIR Infrastructure icon Work Group Maturity Level : 0   Draft Trial Use Security Category : Business Compartments : Not linked to any defined compartments

Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.

This document contains information about the SubscriptionTopic resource and details specific to options in it. It is defined as part of the topic-based model of See Subscriptions (Publish / Subscribe pattern). for general information about using Subscriptions in FHIR.

The SubscriptionTopic resource is used to define conceptual or computable canonical resource defining a set of events for that a client can subscribe to. A Subscription SubscriptionTopic resources. Conceptually, subscription topics specify: represents a concrete concept for both clients and servers. For example:

  • What causes a notification, either by referencing an event definition in an event trigger (e.g., Resource Interactions, such as http://example.com/fhir/events#something-interesting-happened create ) or by describing a resource state change in a resource trigger (e.g., an on Encounter Observation resources.
  • Resource Value Changes, such as an Encounter resource that is created or updated modified to have an a Encounter.state status of active ). in-progress .
  • What filters a client is allowed to request. For example, a topic that allows clients to restrict notifications External Events, such as http://terminology.hl7.org/CodeSystem/v2-0003#A01 .

SubscriptionTopic elements belong to a particular patient id or group, a specific procedure, etc., relevant to that particular topic. few general categories:

Subscription Topics are intended to be discoverable, reusable, and extensible. Definitions should be computably defined whenever possible, but the conceptual definition is the arbiter between any discrepancies. For example, a query-based and a FHIRPath-based definition may differ slightly because of what is expressable in each language. In such cases, the goal is correct implementation of the concept - not literal translations between computable definitions.

The SubscriptionTopic resource is used in the Pub/Sub (Publisher/Subscriber) model of FHIR Subscriptions. Subscriptions Framework . Information about the Boundaries and Relationships both within the Subscriptions Framework and to other areas of the FHIR specification can be found here .

This resource is referenced by SubscriptionStatus and itself. This resource implements the

Structure

Name icon Flags icon Card. icon Type icon Description & Constraints icon doco icon
. . SubscriptionTopic D TU DomainResource The definition of a specific topic for triggering events within the Subscriptions framework

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: CanonicalResource
. . . url Σ 1..1 uri Canonical identifier for this subscription topic definition, represented as a URI (globally unique)
. . . identifier Σ 0..* Identifier Business Identifier for this subscription topic

. . . version Σ 0..1 string Business version of the subscription topic
. . . 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 Σ T 0..1 string The name of the individual or organization that published the SubscriptionTopic
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description T 0..1 markdown Natural language description of the SubscriptionTopic
. . . useContext Σ 0..* UsageContext Content intends to support these contexts

. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction of the SubscriptionTopic (if applicable)
Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this SubscriptionTopic is defined
. . . copyright T 0..1 markdown Use and/or publishing restrictions
. . . approvalDate copyrightLabel T 0..1 string Copyright holder and year(s)
... approvalDate 0..1 date When SubscriptionTopic is/was approved by publisher
. . . lastReviewDate 0..1 date Date the Subscription Topic was last reviewed by the publisher
. . . effectivePeriod Σ 0..1 Period The effective date range for the SubscriptionTopic
. . . resourceTrigger Σ 0..* BackboneElement Definition of a resource-based trigger for the subscription topic

. . . . description Σ 0..1 markdown Text representation of the resource trigger
. . . . resource Σ 1..1 uri Data Type or Resource (reference to definition) for this trigger definition
FHIRDefinedType All FHIR Types ( Extensible )
. . . . supportedInteraction Σ 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
. . . . . resultForCreate Σ 0..1 code test-passes | test-fails
CriteriaNotExistsBehavior ( Required )
. . . . . current Σ 0..1 string Rule applied to current resource state
. . . . . resultForDelete Σ 0..1 code test-passes | test-fails
CriteriaNotExistsBehavior ( Required )
. . . . . requireBoth Σ 0..1 boolean Both must be true flag
. . . . fhirPathCriteria Σ 0..1 string FHIRPath based trigger rule
. . . eventTrigger Σ 0..* BackboneElement Event definitions the SubscriptionTopic

. . . . description Σ 0..1 markdown Text representation of the event trigger
. . . . event Σ 1..1 CodeableConcept Event which can trigger a notification from the SubscriptionTopic
hl7VS-eventTypeCode icon ( Example )
. . . . resource Σ 1..1 uri Data Type or Resource (reference to definition) for this trigger definition
FHIRDefinedType All FHIR Types ( Extensible )
. . . canFilterBy Σ 0..* BackboneElement Properties by which a Subscription can filter notifications from the SubscriptionTopic

. . . . description Σ 0..1 markdown Description of this filter parameter
. . . . resource Σ 0..1 uri URL of the triggering Resource that this filter applies to
FHIRDefinedType All FHIR Types ( Extensible )
. . . . filterParameter Σ 1..1 string Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
. . . . filterDefinition Σ 0..1 uri Canonical URL for a filterParameter definition
. . . . modifier Σ 0..* code = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
Subscription Search Modifier ( Required )

. . . notificationShape Σ 0..* BackboneElement Properties for describing the shape of notifications generated by this topic

. . . . resource Σ 1..1 uri URL of the Resource that is the focus (main) resource in a notification shape
FHIRDefinedType All FHIR Types ( Extensible )
. . . . include Σ 0..* string Include directives, rooted in the resource for this shape

. . . . revInclude Σ 0..* string Reverse include directives, rooted in the resource for this shape


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

SubscriptionTopic ( DomainResource ) + CanonicalResource An absolute URI that is used to identify this subscription topic when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this subscription topic is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the subscription topic is stored on different servers url : uri [1..1] Business identifiers assigned to this subscription topic by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server identifier : Identifier [0..*] The identifier that is used to identify this version of the subscription topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable version : string [0..1] A short, descriptive, user-friendly title for the SubscriptionTopic, for example, "admission" title : string [0..1] The canonical URL pointing to another FHIR-defined SubscriptionTopic that is adhered to in whole or in part by this SubscriptionTopic derivedFrom : canonical [0..*] « SubscriptionTopic » The current state of the SubscriptionTopic (this element modifies the meaning of other elements) status : code [1..1] « null (Strength=Required) PublicationStatus ! » A flag to indicate that this TopSubscriptionTopicic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal date : dateTime [0..1] Helps establish the "authority/credibility" of the SubscriptionTopic. May also allow for contact publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the Topic from the consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions useContext : UsageContext [0..*] A jurisdiction in which the Topic is intended to be used jurisdiction : CodeableConcept [0..*] « null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explains why this Topic is needed and why it has been designed as it has purpose : markdown [0..1] A copyright statement relating to the SubscriptionTopic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SubscriptionTopic copyright : markdown [0..1] A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved') copyrightLabel : string [0..1] The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date lastReviewDate : date [0..1] The period during which the SubscriptionTopic content was or is planned to be effective effectivePeriod : Period [0..1] ResourceTrigger The human readable description of this resource trigger for the SubscriptionTopic - for example, "An Encounter enters the 'in-progress' state" description : markdown [0..1] URL of the Resource that is the type used in this resource trigger. Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient. For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a> resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » The FHIR RESTful interaction which can be used to trigger a notification for the SubscriptionTopic. Multiple values are considered OR joined (e.g., CREATE or UPDATE) supportedInteraction : code [0..*] « null (Strength=Required) InteractionTrigger ! » The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic fhirPathCriteria : string [0..1] QueryCriteria The FHIR query based rules are applied to the previous resource state (e.g., state before an update) previous : string [0..1] For "create" interactions, should the "previous" criteria count as an automatic pass or an automatic fail resultForCreate : code [0..1] « null (Strength=Required) CriteriaNotExistsBehavior ! » The FHIR query based rules are applied to the current resource state (e.g., state after an update) current : string [0..1] For "delete" interactions, should the "current" criteria count as an automatic pass or an automatic fail resultForDelete : code [0..1] « null (Strength=Required) CriteriaNotExistsBehavior ! » If set to true, both current and previous criteria must evaluate true to trigger a notification for this topic. Otherwise a notification for this topic will be triggered if either one evaluates to true requireBoth : boolean [0..1] EventTrigger The human readable description of an event to trigger a notification for the SubscriptionTopic - for example, "Patient Admission, as defined in HL7v2 via message ADT^A01". Multiple values are considered OR joined (e.g., matching any single event listed) description : markdown [0..1] A well-defined event which can be used to trigger notifications from the SubscriptionTopic event : CodeableConcept [1..1] « null (Strength=Example) Hl7VSEventTypeCode ?? » URL of the Resource that is the focus type used in this event trigger. Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient. For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a> resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » CanFilterBy Description of how this filtering parameter is intended to be used description : markdown [0..1] URL of the Resource that is the type used in this filter. This is the "focus" of the topic (or one of them if there are more than one). It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present resource : uri [0..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or topic-defined parameter (like "hub.event") which is a label for the filter filterParameter : string [1..1] Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or the officially-defined URI for a shared filter concept (like "http://example.org/concepts/shared-common-event") filterDefinition : uri [0..1] Allowable operators to apply when determining matches (Search Modifiers). If the filterParameter is a SearchParameter, this list of modifiers SHALL be a strict subset of the modifiers defined on that SearchParameter modifier : code [0..*] « null (Strength=Required) SubscriptionSearchModifier ! » NotificationShape URL of the Resource that is the type used in this shape. This is the "focus" of the topic (or one of them if there are more than one) and the root resource for this shape definition. It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » Search-style _include directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them. Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them include : string [0..*] Search-style _revinclude directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them. Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them revInclude : string [0..*] The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic queryCriteria [0..1] A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification) resourceTrigger [0..*] Event definition which can be used to trigger the SubscriptionTopic eventTrigger [0..*] List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event) canFilterBy [0..*] List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic notificationShape [0..*]

XML Template

<SubscriptionTopic xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <

 <url value="[uri]"/><!-- 1..1 Canonical identifier for this subscription topic definition, represented as a URI (globally unique) -->

 <identifier><!-- 0..* Identifier Business Identifier for this subscription topic --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the subscription topic -->
 <title value="[string]"/><!-- 0..1 Name for this subscription topic (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 value="[string]"/><!-- 0..1 The name of the individual or organization that published the SubscriptionTopic -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the SubscriptionTopic -->
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction of the SubscriptionTopic (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this SubscriptionTopic is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->

 <approvalDate value="[date]"/><!-- 0..1 When SubscriptionTopic is/was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 Date the Subscription Topic was last reviewed by the publisher -->
 <effectivePeriod><!-- 0..1 Period The effective date range for the SubscriptionTopic --></effectivePeriod>
 <resourceTrigger>  <!-- 0..* Definition of a resource-based trigger for the subscription topic -->
  <description value="[markdown]"/><!-- 0..1 Text representation of the resource trigger -->
  <

  <resource value="[uri]"/><!-- 1..1 Data Type or Resource (reference to definition) for this trigger definition -->

  <supportedInteraction value="[code]"/><!-- 0..* create | update | delete -->
  <queryCriteria>  <!-- 0..1 Query based trigger rule -->
   <previous value="[string]"/><!-- 0..1 Rule applied to previous resource state -->
   <resultForCreate value="[code]"/><!-- 0..1 test-passes | test-fails -->
   <current value="[string]"/><!-- 0..1 Rule applied to current resource state -->
   <resultForDelete value="[code]"/><!-- 0..1 test-passes | test-fails -->
   <requireBoth value="[boolean]"/><!-- 0..1 Both must be true flag -->
  </queryCriteria>
  <fhirPathCriteria value="[string]"/><!-- 0..1 FHIRPath based trigger rule -->
 </resourceTrigger>
 <eventTrigger>  <!-- 0..* Event definitions the SubscriptionTopic -->
  <description value="[markdown]"/><!-- 0..1 Text representation of the event trigger -->
  <</event>
  <

  <event><!-- 1..1 CodeableConcept Event which can trigger a notification from the SubscriptionTopic icon --></event>
  <resource value="[uri]"/><!-- 1..1 Data Type or Resource (reference to definition) for this trigger definition -->

 </eventTrigger>
 <canFilterBy>  <!-- 0..* Properties by which a Subscription can filter notifications from the SubscriptionTopic -->
  <description value="[markdown]"/><!-- 0..1 Description of this filter parameter -->
  <

  <resource value="[uri]"/><!-- 0..1 URL of the triggering Resource that this filter applies to -->

  <filterParameter value="[string]"/><!-- 1..1 Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter -->
  <filterDefinition value="[uri]"/><!-- 0..1 Canonical URL for a filterParameter definition -->
  <modifier value="[code]"/><!-- 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type -->
 </canFilterBy>
 <notificationShape>  <!-- 0..* Properties for describing the shape of notifications generated by this topic -->
  <

  <resource value="[uri]"/><!-- 1..1 URL of the Resource that is the focus (main) resource in a notification shape -->

  <include value="[string]"/><!-- 0..* Include directives, rooted in the resource for this shape -->
  <revInclude value="[string]"/><!-- 0..* Reverse include directives, rooted in the resource for this shape -->
 </notificationShape>
</SubscriptionTopic>

JSON Template

{doco
  "resourceType" : "SubscriptionTopic",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "

  "url" : "<uri>", // R!  Canonical identifier for this subscription topic definition, represented as a URI (globally unique)

  "identifier" : [{ Identifier }], // Business Identifier for this subscription topic
  "version" : "<string>", // Business version of the subscription topic
  "title" : "<string>", // Name for this subscription topic (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" : "<string>", // 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 SubscriptionTopic
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction of the SubscriptionTopic (if applicable)
  "purpose" : "<markdown>", // Why this SubscriptionTopic is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)

  "approvalDate" : "<date>", // When SubscriptionTopic is/was approved by publisher
  "lastReviewDate" : "<date>", // Date the Subscription Topic was last reviewed by the publisher
  "effectivePeriod" : { Period }, // The effective date range for the SubscriptionTopic
  "resourceTrigger" : [{ // Definition of a resource-based trigger for the subscription topic
    "description" : "<markdown>", // Text representation of the resource trigger
    "

    "resource" : "<uri>", // R!  Data Type or Resource (reference to definition) for this trigger definition

    "supportedInteraction" : ["<code>"], // create | update | delete
    "queryCriteria" : { // Query based trigger rule
      "previous" : "<string>", // Rule applied to previous resource state
      "resultForCreate" : "<code>", // test-passes | test-fails
      "current" : "<string>", // Rule applied to current resource state
      "resultForDelete" : "<code>", // test-passes | test-fails
      "requireBoth" : <boolean> // Both must be true flag
    },
    "fhirPathCriteria" : "<string>" // FHIRPath based trigger rule
  }],
  "eventTrigger" : [{ // Event definitions the SubscriptionTopic
    "description" : "<markdown>", // Text representation of the event trigger
    "
    "

    "event" : { CodeableConcept }, // R!  Event which can trigger a notification from the SubscriptionTopic icon
    "resource" : "<uri>" // R!  Data Type or Resource (reference to definition) for this trigger definition

  }],
  "canFilterBy" : [{ // Properties by which a Subscription can filter notifications from the SubscriptionTopic
    "description" : "<markdown>", // Description of this filter parameter
    "

    "resource" : "<uri>", // URL of the triggering Resource that this filter applies to

    "filterParameter" : "<string>", // R!  Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
    "filterDefinition" : "<uri>", // Canonical URL for a filterParameter definition
    "modifier" : ["<code>"] // = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
  }],
  "notificationShape" : [{ // Properties for describing the shape of notifications generated by this topic
    "

    "resource" : "<uri>", // R!  URL of the Resource that is the focus (main) resource in a notification shape

    "include" : ["<string>"], // Include directives, rooted in the resource for this shape
    "revInclude" : ["<string>"] // Reverse include directives, rooted in the resource for this shape
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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:

  fhir:SubscriptionTopic.url [ uri ]; # 1..1 Canonical identifier for this subscription topic definition, represented as a URI (globally unique)

  fhir:SubscriptionTopic.identifier [ Identifier ], ... ; # 0..* Business Identifier for this subscription topic
  fhir:SubscriptionTopic.version [ string ]; # 0..1 Business version of the subscription topic
  fhir:SubscriptionTopic.title [ string ]; # 0..1 Name for this subscription topic (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:

  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 [ string ]; # 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 SubscriptionTopic
  fhir:SubscriptionTopic.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  fhir:SubscriptionTopic.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction of the SubscriptionTopic (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.copyrightLabel [ string ]; # 0..1 Copyright holder and year(s)

  fhir:SubscriptionTopic.approvalDate [ date ]; # 0..1 When SubscriptionTopic is/was approved by publisher
  fhir:SubscriptionTopic.lastReviewDate [ date ]; # 0..1 Date the Subscription Topic was last reviewed by the publisher
  fhir:SubscriptionTopic.effectivePeriod [ Period ]; # 0..1 The effective date range for the SubscriptionTopic
  fhir:SubscriptionTopic.resourceTrigger [ # 0..* Definition of a resource-based trigger for the subscription topic
    fhir:SubscriptionTopic.resourceTrigger.description [ markdown ]; # 0..1 Text representation of the resource trigger
    fhir:SubscriptionTopic.resourceTrigger.resource [ uri ]; # 1..1 Data Type or Resource (reference to definition) for this trigger definition
    fhir:SubscriptionTopic.resourceTrigger.supportedInteraction [ 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.resultForCreate [ code ]; # 0..1 test-passes | test-fails
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.current [ string ]; # 0..1 Rule applied to current resource state
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.resultForDelete [ code ]; # 0..1 test-passes | test-fails
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.requireBoth [ boolean ]; # 0..1 Both must be true flag
    ];
    fhir:SubscriptionTopic.resourceTrigger.fhirPathCriteria [ string ]; # 0..1 FHIRPath based trigger rule
  ], ...;
  fhir:SubscriptionTopic.eventTrigger [ # 0..* Event definitions the SubscriptionTopic
    fhir:SubscriptionTopic.eventTrigger.description [ markdown ]; # 0..1 Text representation of the event trigger
    fhir:SubscriptionTopic.eventTrigger.event [ CodeableConcept ]; # 1..1 Event which can trigger a notification from the SubscriptionTopic
    fhir:SubscriptionTopic.eventTrigger.resource [ uri ]; # 1..1 Data Type or Resource (reference to definition) for this trigger definition
  ], ...;
  fhir:SubscriptionTopic.canFilterBy [ # 0..* Properties by which a Subscription can filter notifications from the SubscriptionTopic
    fhir:SubscriptionTopic.canFilterBy.description [ markdown ]; # 0..1 Description of this filter parameter
    fhir:SubscriptionTopic.canFilterBy.resource [ uri ]; # 0..1 URL of the triggering Resource that this filter applies to
    fhir:SubscriptionTopic.canFilterBy.filterParameter [ string ]; # 1..1 Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
    fhir:SubscriptionTopic.canFilterBy.filterDefinition [ uri ]; # 0..1 Canonical URL for a filterParameter definition
    fhir:SubscriptionTopic.canFilterBy.modifier [ code ], ... ; # 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
  ], ...;
  fhir:SubscriptionTopic.notificationShape [ # 0..* Properties for describing the shape of notifications generated by this topic
    fhir:SubscriptionTopic.notificationShape.resource [ uri ]; # 1..1 URL of the Resource that is the focus (main) resource in a notification shape
    fhir:SubscriptionTopic.notificationShape.include [ string ], ... ; # 0..* Include directives, rooted in the resource for this shape
    fhir:SubscriptionTopic.notificationShape.revInclude [ string ], ... ; # 0..* Reverse include directives, rooted in the resource for this shape
  ], ...;
]

Changes since R4

This resource did not exist in Release 3

This analysis is available as XML or JSON .

Conversions between R3 and R4

Structure

Name icon Flags icon Card. icon Type icon Description & Constraints icon doco icon
. . SubscriptionTopic D TU DomainResource The definition of a specific topic for triggering events within the Subscriptions framework

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: CanonicalResource
. . . url Σ 1..1 uri Canonical identifier for this subscription topic definition, represented as a URI (globally unique)
. . . identifier Σ 0..* Identifier Business Identifier for this subscription topic

. . . version Σ 0..1 string Business version of the subscription topic
. . . 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 Σ T 0..1 string The name of the individual or organization that published the SubscriptionTopic
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description T 0..1 markdown Natural language description of the SubscriptionTopic
. . . useContext Σ 0..* UsageContext Content intends to support these contexts

. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction of the SubscriptionTopic (if applicable)
Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this SubscriptionTopic is defined
. . . copyright T 0..1 markdown Use and/or publishing restrictions
. . . approvalDate copyrightLabel T 0..1 string Copyright holder and year(s)
... approvalDate 0..1 date When SubscriptionTopic is/was approved by publisher
. . . lastReviewDate 0..1 date Date the Subscription Topic was last reviewed by the publisher
. . . effectivePeriod Σ 0..1 Period The effective date range for the SubscriptionTopic
. . . resourceTrigger Σ 0..* BackboneElement Definition of a resource-based trigger for the subscription topic

. . . . description Σ 0..1 markdown Text representation of the resource trigger
. . . . resource Σ 1..1 uri Data Type or Resource (reference to definition) for this trigger definition
FHIRDefinedType All FHIR Types ( Extensible )
. . . . supportedInteraction Σ 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
. . . . . resultForCreate Σ 0..1 code test-passes | test-fails
CriteriaNotExistsBehavior ( Required )
. . . . . current Σ 0..1 string Rule applied to current resource state
. . . . . resultForDelete Σ 0..1 code test-passes | test-fails
CriteriaNotExistsBehavior ( Required )
. . . . . requireBoth Σ 0..1 boolean Both must be true flag
. . . . fhirPathCriteria Σ 0..1 string FHIRPath based trigger rule
. . . eventTrigger Σ 0..* BackboneElement Event definitions the SubscriptionTopic

. . . . description Σ 0..1 markdown Text representation of the event trigger
. . . . event Σ 1..1 CodeableConcept Event which can trigger a notification from the SubscriptionTopic
hl7VS-eventTypeCode icon ( Example )
. . . . resource Σ 1..1 uri Data Type or Resource (reference to definition) for this trigger definition
FHIRDefinedType All FHIR Types ( Extensible )
. . . canFilterBy Σ 0..* BackboneElement Properties by which a Subscription can filter notifications from the SubscriptionTopic

. . . . description Σ 0..1 markdown Description of this filter parameter
. . . . resource Σ 0..1 uri URL of the triggering Resource that this filter applies to
FHIRDefinedType All FHIR Types ( Extensible )
. . . . filterParameter Σ 1..1 string Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
. . . . filterDefinition Σ 0..1 uri Canonical URL for a filterParameter definition
. . . . modifier Σ 0..* code = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
Subscription Search Modifier ( Required )

. . . notificationShape Σ 0..* BackboneElement Properties for describing the shape of notifications generated by this topic

. . . . resource Σ 1..1 uri URL of the Resource that is the focus (main) resource in a notification shape
FHIRDefinedType All FHIR Types ( Extensible )
. . . . include Σ 0..* string Include directives, rooted in the resource for this shape

. . . . revInclude Σ 0..* string Reverse include directives, rooted in the resource for this shape


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

SubscriptionTopic ( DomainResource ) + CanonicalResource An absolute URI that is used to identify this subscription topic when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this subscription topic is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the subscription topic is stored on different servers url : uri [1..1] Business identifiers assigned to this subscription topic by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server identifier : Identifier [0..*] The identifier that is used to identify this version of the subscription topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable version : string [0..1] A short, descriptive, user-friendly title for the SubscriptionTopic, for example, "admission" title : string [0..1] The canonical URL pointing to another FHIR-defined SubscriptionTopic that is adhered to in whole or in part by this SubscriptionTopic derivedFrom : canonical [0..*] « SubscriptionTopic » The current state of the SubscriptionTopic (this element modifies the meaning of other elements) status : code [1..1] « null (Strength=Required) PublicationStatus ! » A flag to indicate that this TopSubscriptionTopicic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal date : dateTime [0..1] Helps establish the "authority/credibility" of the SubscriptionTopic. May also allow for contact publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the Topic from the consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions useContext : UsageContext [0..*] A jurisdiction in which the Topic is intended to be used jurisdiction : CodeableConcept [0..*] « null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explains why this Topic is needed and why it has been designed as it has purpose : markdown [0..1] A copyright statement relating to the SubscriptionTopic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SubscriptionTopic copyright : markdown [0..1] A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved') copyrightLabel : string [0..1] The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date lastReviewDate : date [0..1] The period during which the SubscriptionTopic content was or is planned to be effective effectivePeriod : Period [0..1] ResourceTrigger The human readable description of this resource trigger for the SubscriptionTopic - for example, "An Encounter enters the 'in-progress' state" description : markdown [0..1] URL of the Resource that is the type used in this resource trigger. Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient. For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a> resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » The FHIR RESTful interaction which can be used to trigger a notification for the SubscriptionTopic. Multiple values are considered OR joined (e.g., CREATE or UPDATE) supportedInteraction : code [0..*] « null (Strength=Required) InteractionTrigger ! » The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic fhirPathCriteria : string [0..1] QueryCriteria The FHIR query based rules are applied to the previous resource state (e.g., state before an update) previous : string [0..1] For "create" interactions, should the "previous" criteria count as an automatic pass or an automatic fail resultForCreate : code [0..1] « null (Strength=Required) CriteriaNotExistsBehavior ! » The FHIR query based rules are applied to the current resource state (e.g., state after an update) current : string [0..1] For "delete" interactions, should the "current" criteria count as an automatic pass or an automatic fail resultForDelete : code [0..1] « null (Strength=Required) CriteriaNotExistsBehavior ! » If set to true, both current and previous criteria must evaluate true to trigger a notification for this topic. Otherwise a notification for this topic will be triggered if either one evaluates to true requireBoth : boolean [0..1] EventTrigger The human readable description of an event to trigger a notification for the SubscriptionTopic - for example, "Patient Admission, as defined in HL7v2 via message ADT^A01". Multiple values are considered OR joined (e.g., matching any single event listed) description : markdown [0..1] A well-defined event which can be used to trigger notifications from the SubscriptionTopic event : CodeableConcept [1..1] « null (Strength=Example) Hl7VSEventTypeCode ?? » URL of the Resource that is the focus type used in this event trigger. Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient. For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a> resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » CanFilterBy Description of how this filtering parameter is intended to be used description : markdown [0..1] URL of the Resource that is the type used in this filter. This is the "focus" of the topic (or one of them if there are more than one). It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present resource : uri [0..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or topic-defined parameter (like "hub.event") which is a label for the filter filterParameter : string [1..1] Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or the officially-defined URI for a shared filter concept (like "http://example.org/concepts/shared-common-event") filterDefinition : uri [0..1] Allowable operators to apply when determining matches (Search Modifiers). If the filterParameter is a SearchParameter, this list of modifiers SHALL be a strict subset of the modifiers defined on that SearchParameter modifier : code [0..*] « null (Strength=Required) SubscriptionSearchModifier ! » NotificationShape URL of the Resource that is the type used in this shape. This is the "focus" of the topic (or one of them if there are more than one) and the root resource for this shape definition. It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present resource : uri [1..1] « null (Strength=Extensible) FHIRDefinedType FHIRTypes + » Search-style _include directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them. Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them include : string [0..*] Search-style _revinclude directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them. Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them revInclude : string [0..*] The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic queryCriteria [0..1] A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification) resourceTrigger [0..*] Event definition which can be used to trigger the SubscriptionTopic eventTrigger [0..*] List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event) canFilterBy [0..*] List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic notificationShape [0..*]

XML Template

<SubscriptionTopic xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <

 <url value="[uri]"/><!-- 1..1 Canonical identifier for this subscription topic definition, represented as a URI (globally unique) -->

 <identifier><!-- 0..* Identifier Business Identifier for this subscription topic --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the subscription topic -->
 <title value="[string]"/><!-- 0..1 Name for this subscription topic (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 value="[string]"/><!-- 0..1 The name of the individual or organization that published the SubscriptionTopic -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the SubscriptionTopic -->
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction of the SubscriptionTopic (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this SubscriptionTopic is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->

 <approvalDate value="[date]"/><!-- 0..1 When SubscriptionTopic is/was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 Date the Subscription Topic was last reviewed by the publisher -->
 <effectivePeriod><!-- 0..1 Period The effective date range for the SubscriptionTopic --></effectivePeriod>
 <resourceTrigger>  <!-- 0..* Definition of a resource-based trigger for the subscription topic -->
  <description value="[markdown]"/><!-- 0..1 Text representation of the resource trigger -->
  <

  <resource value="[uri]"/><!-- 1..1 Data Type or Resource (reference to definition) for this trigger definition -->

  <supportedInteraction value="[code]"/><!-- 0..* create | update | delete -->
  <queryCriteria>  <!-- 0..1 Query based trigger rule -->
   <previous value="[string]"/><!-- 0..1 Rule applied to previous resource state -->
   <resultForCreate value="[code]"/><!-- 0..1 test-passes | test-fails -->
   <current value="[string]"/><!-- 0..1 Rule applied to current resource state -->
   <resultForDelete value="[code]"/><!-- 0..1 test-passes | test-fails -->
   <requireBoth value="[boolean]"/><!-- 0..1 Both must be true flag -->
  </queryCriteria>
  <fhirPathCriteria value="[string]"/><!-- 0..1 FHIRPath based trigger rule -->
 </resourceTrigger>
 <eventTrigger>  <!-- 0..* Event definitions the SubscriptionTopic -->
  <description value="[markdown]"/><!-- 0..1 Text representation of the event trigger -->
  <</event>
  <

  <event><!-- 1..1 CodeableConcept Event which can trigger a notification from the SubscriptionTopic icon --></event>
  <resource value="[uri]"/><!-- 1..1 Data Type or Resource (reference to definition) for this trigger definition -->

 </eventTrigger>
 <canFilterBy>  <!-- 0..* Properties by which a Subscription can filter notifications from the SubscriptionTopic -->
  <description value="[markdown]"/><!-- 0..1 Description of this filter parameter -->
  <

  <resource value="[uri]"/><!-- 0..1 URL of the triggering Resource that this filter applies to -->

  <filterParameter value="[string]"/><!-- 1..1 Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter -->
  <filterDefinition value="[uri]"/><!-- 0..1 Canonical URL for a filterParameter definition -->
  <modifier value="[code]"/><!-- 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type -->
 </canFilterBy>
 <notificationShape>  <!-- 0..* Properties for describing the shape of notifications generated by this topic -->
  <

  <resource value="[uri]"/><!-- 1..1 URL of the Resource that is the focus (main) resource in a notification shape -->

  <include value="[string]"/><!-- 0..* Include directives, rooted in the resource for this shape -->
  <revInclude value="[string]"/><!-- 0..* Reverse include directives, rooted in the resource for this shape -->
 </notificationShape>
</SubscriptionTopic>

JSON Template

{doco
  "resourceType" : "SubscriptionTopic",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "

  "url" : "<uri>", // R!  Canonical identifier for this subscription topic definition, represented as a URI (globally unique)

  "identifier" : [{ Identifier }], // Business Identifier for this subscription topic
  "version" : "<string>", // Business version of the subscription topic
  "title" : "<string>", // Name for this subscription topic (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" : "<string>", // 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 SubscriptionTopic
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction of the SubscriptionTopic (if applicable)
  "purpose" : "<markdown>", // Why this SubscriptionTopic is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)

  "approvalDate" : "<date>", // When SubscriptionTopic is/was approved by publisher
  "lastReviewDate" : "<date>", // Date the Subscription Topic was last reviewed by the publisher
  "effectivePeriod" : { Period }, // The effective date range for the SubscriptionTopic
  "resourceTrigger" : [{ // Definition of a resource-based trigger for the subscription topic
    "description" : "<markdown>", // Text representation of the resource trigger
    "

    "resource" : "<uri>", // R!  Data Type or Resource (reference to definition) for this trigger definition

    "supportedInteraction" : ["<code>"], // create | update | delete
    "queryCriteria" : { // Query based trigger rule
      "previous" : "<string>", // Rule applied to previous resource state
      "resultForCreate" : "<code>", // test-passes | test-fails
      "current" : "<string>", // Rule applied to current resource state
      "resultForDelete" : "<code>", // test-passes | test-fails
      "requireBoth" : <boolean> // Both must be true flag
    },
    "fhirPathCriteria" : "<string>" // FHIRPath based trigger rule
  }],
  "eventTrigger" : [{ // Event definitions the SubscriptionTopic
    "description" : "<markdown>", // Text representation of the event trigger
    "
    "

    "event" : { CodeableConcept }, // R!  Event which can trigger a notification from the SubscriptionTopic icon
    "resource" : "<uri>" // R!  Data Type or Resource (reference to definition) for this trigger definition

  }],
  "canFilterBy" : [{ // Properties by which a Subscription can filter notifications from the SubscriptionTopic
    "description" : "<markdown>", // Description of this filter parameter
    "

    "resource" : "<uri>", // URL of the triggering Resource that this filter applies to

    "filterParameter" : "<string>", // R!  Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
    "filterDefinition" : "<uri>", // Canonical URL for a filterParameter definition
    "modifier" : ["<code>"] // = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
  }],
  "notificationShape" : [{ // Properties for describing the shape of notifications generated by this topic
    "

    "resource" : "<uri>", // R!  URL of the Resource that is the focus (main) resource in a notification shape

    "include" : ["<string>"], // Include directives, rooted in the resource for this shape
    "revInclude" : ["<string>"] // Reverse include directives, rooted in the resource for this shape
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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:

  fhir:SubscriptionTopic.url [ uri ]; # 1..1 Canonical identifier for this subscription topic definition, represented as a URI (globally unique)

  fhir:SubscriptionTopic.identifier [ Identifier ], ... ; # 0..* Business Identifier for this subscription topic
  fhir:SubscriptionTopic.version [ string ]; # 0..1 Business version of the subscription topic
  fhir:SubscriptionTopic.title [ string ]; # 0..1 Name for this subscription topic (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:

  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 [ string ]; # 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 SubscriptionTopic
  fhir:SubscriptionTopic.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  fhir:SubscriptionTopic.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction of the SubscriptionTopic (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.copyrightLabel [ string ]; # 0..1 Copyright holder and year(s)

  fhir:SubscriptionTopic.approvalDate [ date ]; # 0..1 When SubscriptionTopic is/was approved by publisher
  fhir:SubscriptionTopic.lastReviewDate [ date ]; # 0..1 Date the Subscription Topic was last reviewed by the publisher
  fhir:SubscriptionTopic.effectivePeriod [ Period ]; # 0..1 The effective date range for the SubscriptionTopic
  fhir:SubscriptionTopic.resourceTrigger [ # 0..* Definition of a resource-based trigger for the subscription topic
    fhir:SubscriptionTopic.resourceTrigger.description [ markdown ]; # 0..1 Text representation of the resource trigger
    fhir:SubscriptionTopic.resourceTrigger.resource [ uri ]; # 1..1 Data Type or Resource (reference to definition) for this trigger definition
    fhir:SubscriptionTopic.resourceTrigger.supportedInteraction [ 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.resultForCreate [ code ]; # 0..1 test-passes | test-fails
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.current [ string ]; # 0..1 Rule applied to current resource state
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.resultForDelete [ code ]; # 0..1 test-passes | test-fails
      fhir:SubscriptionTopic.resourceTrigger.queryCriteria.requireBoth [ boolean ]; # 0..1 Both must be true flag
    ];
    fhir:SubscriptionTopic.resourceTrigger.fhirPathCriteria [ string ]; # 0..1 FHIRPath based trigger rule
  ], ...;
  fhir:SubscriptionTopic.eventTrigger [ # 0..* Event definitions the SubscriptionTopic
    fhir:SubscriptionTopic.eventTrigger.description [ markdown ]; # 0..1 Text representation of the event trigger
    fhir:SubscriptionTopic.eventTrigger.event [ CodeableConcept ]; # 1..1 Event which can trigger a notification from the SubscriptionTopic
    fhir:SubscriptionTopic.eventTrigger.resource [ uri ]; # 1..1 Data Type or Resource (reference to definition) for this trigger definition
  ], ...;
  fhir:SubscriptionTopic.canFilterBy [ # 0..* Properties by which a Subscription can filter notifications from the SubscriptionTopic
    fhir:SubscriptionTopic.canFilterBy.description [ markdown ]; # 0..1 Description of this filter parameter
    fhir:SubscriptionTopic.canFilterBy.resource [ uri ]; # 0..1 URL of the triggering Resource that this filter applies to
    fhir:SubscriptionTopic.canFilterBy.filterParameter [ string ]; # 1..1 Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
    fhir:SubscriptionTopic.canFilterBy.filterDefinition [ uri ]; # 0..1 Canonical URL for a filterParameter definition
    fhir:SubscriptionTopic.canFilterBy.modifier [ code ], ... ; # 0..* = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
  ], ...;
  fhir:SubscriptionTopic.notificationShape [ # 0..* Properties for describing the shape of notifications generated by this topic
    fhir:SubscriptionTopic.notificationShape.resource [ uri ]; # 1..1 URL of the Resource that is the focus (main) resource in a notification shape
    fhir:SubscriptionTopic.notificationShape.include [ string ], ... ; # 0..* Include directives, rooted in the resource for this shape
    fhir:SubscriptionTopic.notificationShape.revInclude [ string ], ... ; # 0..* Reverse include directives, rooted in the resource for this shape
  ], ...;
]

Changes since Release 4

This resource did not exist in Release 3

This analysis is available as XML or JSON .

Conversions between R3 and R4

 

See the Profiles & Extensions and the alternate Additional definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see , the extensions spreadsheet version & the dependency analysis

Path Definition Type Reference
SubscriptionTopic.status

The lifecycle status of an artifact.

Required PublicationStatus
SubscriptionTopic.jurisdiction

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

Extensible Jurisdiction ValueSet JurisdictionValueSet
SubscriptionTopic.resourceTrigger.resource

All FHIR types

Extensible FHIRDefinedType FHIRTypes (a valid code from All FHIR Types )
SubscriptionTopic.resourceTrigger.supportedInteraction

FHIR RESTful interaction codes used for SubscriptionTopic trigger.

Required InteractionTrigger
SubscriptionTopic.resourceTrigger.queryCriteria.resultForCreate

Behavior a server can exhibit when a criteria state does not exist (e.g., state prior to a create or after a delete).

Required CriteriaNotExistsBehavior
SubscriptionTopic.resourceTrigger.queryCriteria.resultForDelete

Behavior a server can exhibit when a criteria state does not exist (e.g., state prior to a create or after a delete).

Required CriteriaNotExistsBehavior
SubscriptionTopic.eventTrigger.event

Concepts specifying the trigger event for Version 2.x interface messages.

Example Hl7VSEventTypeCode icon (a valid code from eventType icon )
SubscriptionTopic.eventTrigger.resource

All FHIR types

Extensible FHIRDefinedType FHIRTypes (a valid code from All FHIR Types )
SubscriptionTopic.canFilterBy.resource

All FHIR types

Extensible FHIRDefinedType FHIRTypes (a valid code from All FHIR Types )
SubscriptionTopic.canFilterBy.modifier

FHIR search modifiers allowed for use in Subscriptions and SubscriptionTopics.

Required SubscriptionSearchModifier (a valid code from SubscriptionSearchModifer )
SubscriptionTopic.notificationShape.resource

All FHIR types

Extensible FHIRDefinedType FHIRTypes (a valid code from All FHIR Types )

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 points to consider when implementing a Subscription Topic within a server:

The SubscriptionTopic resource is designed to define what is possible for a subscription - what causes a server to generate notifications, what related information notifications contain, and what a client can use to filter a class of possible subscriptions down to what that particular client is interested in. Implementers and users SHOULD be able to use a subscription topic to arrive at the same expectations.

Defining a new SubscriptionTopic requires clear communication around requirements and expectations. Anyone defining a SubscriptionTopic is encouraged to publish their definition at registry.fhir.org icon . Similarly, before defining a new SubscriptionTopic implementers are encouraged to check the registry to see if an existing definition can be reused (either directly or as a base for derivation).

Note that SubscriptionTopic is a Canonical Resource and inherits many elements related to authoring and publication. Authors SHOULD review inherited elements and populate them accordingly.

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 implementations will vary and clients will have unexpected behavior.

Subscription Topics based on Resource Interactions are simple to describe - definitions include the resource type (e.g., Patient , Encounter ) and the interaction of interest (e.g., create , delete ).

Subscription Topics for resource interactions are defined using the SubscriptionTopic.resourceTrigger.resource and SubscriptionTopic.resourceTrigger.supportedInteraction elements.

If a topic is designed to cover multiple resources, it can contain multiple resourceTrigger elements with each resource. If a topic is generic to all resources, the Resource is available within the FHIR Defined Type value set.

Subscription Topics defined on create interactions 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 .

  • resource: Patient , supportedInteraction: create : notify each time a new patient is created on the server, e.g., to send 'new patient' information.
  • resource: AdverseEvent , supportedInteraction: create : notify each time a new Adverse Event is created on the server, e.g., to perform internal review.
  • resource: Resource , supportedInteraction: create : notify each time any resource is created on the server, e.g., for internal logging/processing.

Subscription Topics defined on delete interactions 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., notifications for deleting a Patient which has a particular Condition), implementers should use the computable definitions provided by Resource Value Tests .

  • resource: Resource , supportedInteraction: delete : notify each time a new resource is delete on the server, e.g., for internal logging/processing.

Subscription Topics defined on update interactions 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 interactions 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 .

  • resource: Patient , supportedInteraction: update : notify each time a patient is modified on the server, e.g., to a processing server to determine further actions.
  • resource: CarePlan , supportedInteraction: update : notify each time a Care Plan is modified on the server, e.g., to notify a care team of changes.
  • resource: Resource , supportedInteraction: update : notify each time any resource is modified on the server, e.g., for internal logging/processing.

If a topic requires more granularity than interactions provide, a topic can provide state-change tests using either FHIRPath or query ( Search ) definitions.

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 benefit of a computable definition is quite large (e.g., user-defined Subscription Topics, high portability, etc.). Second, implementers that do not use computable definitions directly will be able to read definitions during their implementation in order to precisley precisely 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 resourceTrigger.resource (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. The FHIRPath expression is assumed to be provided the inputs listed below.

FHIRPath expression input variables:

  • Variable [previous] = resource instance prior to state change being applied
  • Variable [current] - resource instance post state change being applied

For example, the expression: %previous.status!='in-progress' and %current.status='in-progress' indicates that the resource has an element, status , and that notifications are generated if the pre-update version status is not 'in-progress' and the post-update version is 'in-progress'.

There are use-cases when a triggering event is not easily described in terms of FHIR resources (e.g., shift change at a facility) or that an existing workflow is already defined on an event-based system (e.g., patient admission in HL7v2). To support these scenarios Subscription Topics MAY include an event trigger, either instead of or in addition to resource triggers.

Event triggers are straightforward to define, since most of the definition exists in the event. The event element references the event which causes a Subscription to trigger. For example, using the event http://terminology.hl7.org/CodeSystem/v2-0003#A01 indicates that a Subscription activates under the same conditions that a HL7v2 system would send an ADT^A01 message. Similarly, an event trigger using http://fhircast.org/events/patient-open indicates that a Subscription activates under the same conditions that a FHIRcast Hub generates a patient-open message.

In order to allow Subscriptions to filter event-based topic definitions, event definitions require a "root" FHIR resource that can be referenced. This is defined in the eventTrigger.resource element. For example, a HL7v2 patient admission event ( http://terminology.hl7.org/CodeSystem/v2-0003#A01 ) would likely be rooted in an Encounter resource, while a FHIRcast patient open event ( http://fhircast.org/events/patient-open ) would likely be rooted in a Patient resource. By establishing the appropriate root resource for an event, topics can expose filters that are appropriate for notifications. If there is no logical resource available (e.g., events referencing non-FHIR events), resources such as Parameters or Basic may be used.

Note that while having a conceptual description and linking to an event is sufficient for a definition, authors are encouraged to include resource triggers if possible.

To help servers filter a large set of topic notifications into a smaller set of events that a particular client is interested in, each SubscriptionTopic defines a set of filters that clients are allowed to request. For example, filters can be used to allow a Subscription to narrow down notifications from a topic defining all patient admissions to a just admissions for patients for a specific care team.

The element canFilterBy.filterParameter contains the name of a parameter used to filter events for the focus resource, as defined by resourceTrigger.resource or eventTrigger.resource . The name used in this element is only valid in the context of the Subscription Topic.

The filter parameter MAY be a Search Parameter, either from the list of Parameters for all resources (e.g., _id , _tag ) or Search Parameter defined for a specific resource (e.g., Encounter Search Parameters , Patient search parameters , etc.). When a Search Parameter is used, the topic SHALL contain a reference to a valid canonical definition in the canFilterBy.filterDefinition element.

The filter parameter MAY be a filter defined in the context of a topic. When a parameter is defined by a topic, the canFilterBy.filterDefinition SHOULD point to a URL containing detailed information about the parameter - e.g., datatype of the parameter.

Filters MAY have external definitions. For example, Search Parameters defined in the FHIR Specifications have canonical URLs in the format of http://hl7.org/fhir/SearchParameter/[id] (see Search Parameter Registry ). with Search Parameters, it is possible that two externally-defined filters share the same "short" name. In these cases, the URI contained in the filterDefinition element is used to link a context-local name for the parameter ( filterParameter ) to the complete definition.

As described in Filter Parameter , parameters backed by full Search Parameter definitions SHALL contain a link to the canonical URL in this element and other parameters SHOULD contain a useful URI in this element.

The element canFilterBy.modifier contains a 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 modifier 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). modifier).

If a filter parameter is a defined Search Parameter, the list of allowed modifiers SHALL be a strict subset of the modifiers defined on the Search Parameter.

When a server evaluates filters depends on the type of change covered by the topic. Guidance is provided based on implementation feedback, but note that all filters are defined to explicitly describe the state before and after the interaction occurs.

Logically, filters evaluated against create interactions must be performed 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).

Tests can specifically include or exclude changes caused by a create interactions, either via null testing in FHIRPath (e.g., %previous is null ) or via the resourceTrigger.queryCriteria.resultForCreate element for query-based definitions.

Logically, filters evaluated against delete interactions must be performed 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).

Tests can specifically include or exclude changes caused by a delete interactions, either via null testing in FHIRPath (e.g., %current is null ) or via the resourceTrigger.queryCriteria.resultForDelete element for query-based definitions.

Logically, filters evaluated against update interactions MAY be performed either before or after the update occurs. Note however that filters are explicitly defined against the two states: previous and current . Notifications based on resource changes SHALL NOT be sent if the update request fails, since no state change occurred.

In addition to the triggering information for a topic, this resource also defines the expected 'shape' of notifications via notificationShape . This element defines the possible 'root' resources for a notification, as well as additional resources that may be included.

The element notificationShape.resource defines a 'root' resource for notifications. Typically, this resource will be the same as the triggering resource (e.g., resourceTrigger.resource or eventTrigger.resource ), however there may be situations where this is not the case. For example, a topic may be defined across all resources (e.g., every time a resource is deleted), but the author may want additional information depending on which resource is involved. In that scenario, the resourceTrigger.resource could be set to Resource to trigger on all resources. However, shapes could be defined for each resource in the patient compartment to include patient information with those notifications (e.g., if an Encounter is deleted, include the Patient record as well). Note that the opposite scenario is also supported - an author may define multiple triggers on different types of events and simply define a shape that is valid for all of those resources.

Sometimes it is benficial to include additional resources with a subscription notification. For example, queries for additional resources may be complex in the future, but simple at the time of notification due to context in the event. Alternatively, the subscriber may have limited ability to request additional resource (e.g., a client that is generally offline).

In order to facilitate these workflows, a Subscription can define additional resources that MAY be included when a notification is sent. These additions are based off of the focus resource of the notification, and are described as a list of _include and _revinclude directives. When notifications are generated, a server SHOULD check the appropriate notificationShape.resource for a matching resource and SHOULD include any additional resources listed via notificationShape.include and notificationShape.revInclude , if they exist and the user context for the subscription is authorized to access them.

Included resources should be added in the same style as the focus resource - e.g., if notifications are id-only , then included resources should only include their ids as well.

By populating the derivedFrom element, implementers can advertise that a new topic is compatible with, and offers additional features on top of, another Subscription Topic. A derived topic can add additional filters, but cannot remove existing ones nor change the 'concept' of a topic during derivation. For example:

  • Deriving a new SubscriptionTopic with the same concept but a different computable definition is OK.
  • Deriving a new SubscriptionTopic to expose additional canFilterBy parameters is OK.
  • Deriving a new SubscriptionTopic to remove an existing canFilterBy parameter is NOT ok.
  • Deriving a new SubscriptionTopic based on a different resource than its parent is NOT ok (e.g., start/end of medication derived from encounter).

Trial-Use Note: Note to Implementers: Warning: This section is still in early drafting; feedback from topic authors is welcome to refine the following guidance.

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 30 Resources
derived-or-self N uri A server defined search that matches either the url or derivedFrom SubscriptionTopic.url | SubscriptionTopic.derivedFrom
identifier TU token Business Identifier for SubscriptionTopic SubscriptionTopic.identifier 28 Resources
resource N uri Allowed Data type or Resource (reference to definition) for this definition, searches resourceTrigger, eventTrigger, and notificationShape for matches. SubscriptionTopic.resourceTrigger.resource
status N token draft | active | retired | unknown SubscriptionTopic.status 34 Resources
title N string Name for this SubscriptionTopic (Human friendly) SubscriptionTopic.title 27 Resources
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 33 Resources
version N token Business version of the SubscriptionTopic SubscriptionTopic.version 30 Resources