FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Subscriptiontopic.shex

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for subscriptiontopic

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

IMPORT <uri.shex>
IMPORT <code.shex>
IMPORT <date.shex>
IMPORT <string.shex>
IMPORT <Coding.shex>
IMPORT <Period.shex>
IMPORT <boolean.shex>
IMPORT <dateTime.shex>
IMPORT <markdown.shex>
IMPORT <canonical.shex>
IMPORT <Identifier.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>

start=@<SubscriptionTopic> AND {fhir:nodeRole [fhir:treeRoot]}

# The definition of a specific topic for triggering events within the Subscriptions framework
<SubscriptionTopic> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:SubscriptionTopic]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:url @<uri>;                        # Canonical identifier for this 
                                            # subscription topic, represented as 
                                            # an absolute URI (globally unique) 
    fhir:identifier @<OneOrMore_Identifier>?;  # Business identifier for 
                                            # subscription topic 
    fhir:version @<string>?;                # Business version of the 
                                            # subscription topic 
    fhir:versionAlgorithm @<string>  OR 
    			@<Coding>  ?;  # How to compare versions
    fhir:name @<string>?;                   # Name for this subscription topic 
                                            # (computer friendly) 
    fhir:title @<string>?;                  # Name for this subscription topic 
                                            # (human friendly) 
    fhir:derivedFrom @<OneOrMore_canonical>?;  # Based on FHIR protocol or 
                                            # definition 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:experimental @<boolean>?;          # If for testing purposes, not real 
                                            # usage 
    fhir:date @<dateTime>?;                 # Date status first applied
    fhir:publisher @<string>?;              # The name of the individual or 
                                            # organization that published the 
                                            # SubscriptionTopic 
    fhir:contact @<OneOrMore_ContactDetail>?;  # Contact details for the publisher
    fhir:description @<markdown>?;          # Natural language description of 
                                            # the SubscriptionTopic 
    fhir:useContext @<OneOrMore_UsageContext>?;  # Content intends to support these 
                                            # contexts 
    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Intended jurisdiction of the 
                                            # SubscriptionTopic (if applicable) 
    fhir:purpose @<markdown>?;              # Why this SubscriptionTopic is 
                                            # defined 
    fhir:copyright @<markdown>?;            # Use and/or publishing restrictions
    fhir:copyrightLabel @<string>?;         # Copyright holder and year(s)
    fhir:approvalDate @<date>?;             # When SubscriptionTopic is/was 
                                            # approved by publisher 
    fhir:lastReviewDate @<date>?;           # Date the Subscription Topic was 
                                            # last reviewed by the publisher 
    fhir:effectivePeriod @<Period>?;        # The effective date range for the 
                                            # SubscriptionTopic 
    fhir:trigger @<OneOrMore_SubscriptionTopic.trigger>?;  # Definition of a trigger for the 
                                            # subscription topic 
}  

# Query based trigger rule
<SubscriptionTopic.trigger.queryCriteria> EXTENDS @<BackboneElement> CLOSED {   
    fhir:previous @<string>?;               # Rule applied to previous resource 
                                            # state 
    fhir:resultForCreate @<code> AND
    	{fhir:v @fhirvs:subscriptiontopic-cr-behavior}?;  # test-passes | test-fails
    fhir:current @<string>?;                # Rule applied to current resource 
                                            # state 
    fhir:resultForDelete @<code> AND
    	{fhir:v @fhirvs:subscriptiontopic-cr-behavior}?;  # test-passes | test-fails
    fhir:requireBoth @<boolean>?;           # Both must be true flag
}  

# Properties by which a Subscription can filter notifications based on this trigger
<SubscriptionTopic.trigger.canFilterBy> EXTENDS @<BackboneElement> CLOSED {   
    fhir:description @<markdown>?;          # Description of this filter 
                                            # parameter 
    fhir:resource @<uri>?;                  # URL of the triggering Resource 
                                            # that this filter applies to 
    fhir:filterParameter @<string>;         # Human-readable and 
                                            # computation-friendly name for a 
                                            # filter parameter usable by 
                                            # subscriptions on this topic, via 
                                            # Subscription.filterBy.filterPara-
                                            # meter 
    fhir:filterDefinition @<uri>?;          # Canonical URL for a 
                                            # filterParameter definition 
    fhir:comparator @<OneOrMore_code> AND
    	{fhir:v @fhirvs:search-comparator}?;  # eq | ne | gt | lt | ge | le | sa | 
                                            # eb | ap 
    fhir:modifier @<OneOrMore_code> AND
    	{fhir:v @fhirvs:search-modifier-code}?;  # missing | exact | contains | not | 
                                            # text | in | not-in | below | above 
                                            # | type | identifier | of-type | 
                                            # code-text | text-advanced | 
                                            # iterate 
}  

# Definition of a trigger for the subscription topic
<SubscriptionTopic.trigger> EXTENDS @<BackboneElement> CLOSED {   
    fhir:description @<markdown>?;          # Text representation of the 
                                            # resource trigger 
    fhir:resource @<uri>;                   # Key Data Type, Resource (reference 
                                            # to definition), or relevant 
                                            # definition for this trigger 
    fhir:supportedInteraction @<OneOrMore_code> AND
    	{fhir:v @fhirvs:interaction-trigger}?;  # create | update | delete
    fhir:queryCriteria @<SubscriptionTopic.trigger.queryCriteria>?;  # Query based trigger rule
    fhir:fhirPathCriteria @<string>?;       # FHIRPath based trigger rule
    fhir:event @<CodeableConcept>?;         # Event which can trigger a 
                                            # notification from the 
                                            # SubscriptionTopic 
    fhir:canFilterBy @<OneOrMore_SubscriptionTopic.trigger.canFilterBy>?;  # Properties by which a Subscription 
                                            # can filter notifications based on 
                                            # this trigger 
    fhir:notificationShape @<OneOrMore_SubscriptionTopic.trigger.notificationShape>?;  # Properties for describing the 
                                            # shape of notifications generated 
                                            # by this trigger 
}  

# Properties for describing the shape of notifications generated by this trigger
<SubscriptionTopic.trigger.notificationShape> EXTENDS @<BackboneElement> CLOSED {   
    fhir:resource @<uri>;                   # URL of the key definition that is 
                                            # the focus in a notification shape 
    fhir:include @<OneOrMore_string>?;      # Include directives, rooted in the 
                                            # resource for this shape 
    fhir:revInclude @<OneOrMore_string>?;   # Reverse include directives, rooted 
                                            # in the resource for this shape 
    fhir:relatedQuery @<OneOrMore_SubscriptionTopic.trigger.notificationShape.relatedQuery>?;  # Query describing data relevant to 
                                            # this notification 
}  

# Query describing data relevant to this notification
<SubscriptionTopic.trigger.notificationShape.relatedQuery> EXTENDS @<BackboneElement> CLOSED {   
    fhir:queryType @<Coding>?;              # Coded information describing the 
                                            # type of data this query provides 
    fhir:query @<string>;                   # Query to perform
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_canonical> CLOSED {
    rdf:first @<canonical>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_canonical> 
}
<OneOrMore_ContactDetail> CLOSED {
    rdf:first @<ContactDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail> 
}
<OneOrMore_UsageContext> CLOSED {
    rdf:first @<UsageContext>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}
<OneOrMore_SubscriptionTopic.trigger> CLOSED {
    rdf:first @<SubscriptionTopic.trigger>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_SubscriptionTopic.trigger> 
}
<OneOrMore_code> CLOSED {
    rdf:first @<code>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_code> 
}
<OneOrMore_SubscriptionTopic.trigger.canFilterBy> CLOSED {
    rdf:first @<SubscriptionTopic.trigger.canFilterBy>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_SubscriptionTopic.trigger.canFilterBy> 
}
<OneOrMore_SubscriptionTopic.trigger.notificationShape> CLOSED {
    rdf:first @<SubscriptionTopic.trigger.notificationShape>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_SubscriptionTopic.trigger.notificationShape> 
}
<OneOrMore_string> CLOSED {
    rdf:first @<string>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_string> 
}
<OneOrMore_SubscriptionTopic.trigger.notificationShape.relatedQuery> CLOSED {
    rdf:first @<SubscriptionTopic.trigger.notificationShape.relatedQuery>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_SubscriptionTopic.trigger.notificationShape.relatedQuery> 
}

#---------------------- Value Sets ------------------------

# FHIR RESTful interaction codes used for SubscriptionTopic trigger.
fhirvs:interaction-trigger ["create" "update" "delete"]

# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]

# What Search Comparator Codes are supported in search.
fhirvs:search-comparator ["eq" "ne" "gt" "lt" "ge" "le" "sa" "eb" "ap"]

# A supported modifier for a search parameter.
fhirvs:search-modifier-code ["missing" "exact" "contains" "not" "text" "in" "not-in" "below" "above" "type" "identifier" "of-type" "code-text" "text-advanced" "iterate"]

# Behavior a server can exhibit when a criteria state does not exist (e.g., state prior to a create or after a delete).
fhirvs:subscriptiontopic-cr-behavior ["test-passes" "test-fails"]


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.