Release 5 FHIR CI-Build

This page is part of the Continuous Integration Build of FHIR Specification (v5.0.0: R5 - STU ). This is the current published version in it's permanent home (it will always (will be available incorrect/inconsistent at this URL). For a full list of available versions, see times).
See the Directory of published versions . Page versions: R5 R4B R4 R3

Subscription.shex

Maturity Level : N/A
Responsible Owner: FHIR Infrastructure Work Group Standards Status : Informative Compartments : No defined compartments

Raw ShEx

ShEx statement for subscription

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 <url.shex>
IMPORT <uri.shex>
IMPORT <code.shex>
IMPORT <string.shex>

# ShEx Version 2.2
IMPORT <Url.shex>
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Group.shex>
IMPORT <String.shex>
IMPORT <Device.shex>

IMPORT <Coding.shex>
IMPORT <instant.shex>

IMPORT <Instant.shex>

IMPORT <Patient.shex>
IMPORT <CareTeam.shex>
IMPORT <canonical.shex>

IMPORT <Canonical.shex>

IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <unsignedInt.shex>
IMPORT <positiveInt.shex>

IMPORT <UnsignedInt.shex>
IMPORT <PositiveInt.shex>

IMPORT <ContactPoint.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>

IMPORT <PractitionerRole.shex>
IMPORT <HealthcareService.shex>
start=@<Subscription> AND {fhir:nodeRole [fhir:treeRoot]}
# Notification about a SubscriptionTopic

# Information about a request for notifications to a client based on a SubscriptionTopic

<Subscription> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:Subscription]?;
    fhir:nodeRole [fhir:treeRoot]?;

    a [fhir:Subscription]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Additional identifiers (business 
                                            # identifier) 
    fhir:name @<string>?;                   # Human readable name for this 

    fhir:name @<String>?;                   # Human readable name for this 

                                            # subscription 
    fhir:status @<code> AND

    fhir:status @<Code> AND

    	{fhir:v @fhirvs:subscription-status};  # requested | active | error | off | 
                                            # entered-in-error 
    fhir:topic @<canonical>;                # Reference to the subscription 

    fhir:topic @<Canonical>;                # Reference to the subscription 

                                            # topic being subscribed to 
    fhir:contact @<OneOrMore_ContactPoint>?;  # Contact details for source (e.g. 
                                            # troubleshooting) 
    fhir:end @<instant>?;                   # When to automatically delete the 

    fhir:end @<Instant>?;                   # When to automatically delete the 

                                            # subscription 
    fhir:managingEntity @<Reference> AND {fhir:link 

    fhir:managingEntity @<Reference> AND {fhir:l 

    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Group> OR 

    			@<HealthcareService> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Entity responsible for 
                                            # Subscription changes 
    fhir:reason @<string>?;                 # Description of why this 

    fhir:reason @<String>?;                 # Description of why this 

                                            # subscription was created 
    fhir:filterBy @<OneOrMore_Subscription.filterBy>?;  # Criteria for narrowing the 
                                            # subscription topic stream 
    fhir:channelType @<Coding>;             # Channel type for notifications
    fhir:endpoint @<url>?;                  # Where the channel points to
    fhir:parameter @<OneOrMore_Subscription.parameter>?;  # Channel type
    fhir:heartbeatPeriod @<unsignedInt>?;   # Interval in seconds to send 

    fhir:endpoint @<Url>?;                  # URL where the channel sends 
                                            # notifications 
    fhir:parameter @<OneOrMore_Subscription.parameter>?;  # Channel type dependent information
    fhir:heartbeatPeriod @<UnsignedInt>?;   # Interval in seconds to send 

                                            # 'heartbeat' notification 
    fhir:timeout @<unsignedInt>?;           # Timeout in seconds to attempt 

    fhir:timeout @<UnsignedInt>?;           # Timeout in seconds to attempt 

                                            # notification delivery 
    fhir:contentType @<code> AND

    fhir:contentType @<Code> AND

    	{fhir:v @fhirvs:mimetypes}?;  # MIME type to send, or omit for no 
                                            # payload 
    fhir:content @<code> AND

    fhir:content @<Code> AND

    	{fhir:v @fhirvs:subscription-payload-content}?;  # empty | id-only | full-resource
    fhir:maxCount @<positiveInt>?;          # Maximum number of events that can 

    fhir:maxCount @<PositiveInt>?;          # Maximum number of events that can 

                                            # be combined in a single 
                                            # notification 
}  
# Criteria for narrowing the subscription topic stream
<Subscription.filterBy> EXTENDS @<BackboneElement> CLOSED {   
    fhir:resourceType @<uri>?;              # Allowed Resource (reference to 

    fhir:resource @<Uri>?;                  # Allowed Resource (reference to 

                                            # definition) for this Subscription 
                                            # filter 
    fhir:filterParameter @<string>;         # Filter label defined in 

    fhir:filterParameter @<String>;         # Filter label defined in 

                                            # SubscriptionTopic 
    fhir:comparator @<code> AND

    fhir:comparator @<Code> AND

    	{fhir:v @fhirvs:search-comparator}?;  # eq | ne | gt | lt | ge | le | sa | 
                                            # eb | ap 
    fhir:modifier @<code> AND

    fhir:modifier @<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 
    fhir:value @<string>;                   # Literal value or resource path

    fhir:value @<String>;                   # Literal value or resource path
    fhir:event @<OneOrMore_CodeableConcept>?;  # Event to filter by

}  
# Channel type

# Channel type dependent information

<Subscription.parameter> EXTENDS @<BackboneElement> CLOSED {   
    fhir:name @<string>;                    # Name (key) of the parameter
    fhir:value @<string>;                   # Value of the parameter to use or 

    fhir:name @<String>;                    # Name (key) of the parameter
    fhir:value @<String>;                   # Value of the parameter to use or 

                                            # pass through 
}  
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_ContactPoint> CLOSED {
    rdf:first @<ContactPoint>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ContactPoint> 
}
<OneOrMore_Subscription.filterBy> CLOSED {
    rdf:first @<Subscription.filterBy>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Subscription.filterBy> 
}
<OneOrMore_Subscription.parameter> CLOSED {
    rdf:first @<Subscription.parameter>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Subscription.parameter> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

#---------------------- Value Sets ------------------------
# This value set includes all possible codes from BCP-13 (see http://tools.ietf.org/html/bcp13)
fhirvs:mimetypes xsd:string #EXTERNAL
# 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"]
# Codes to represent how much resource content to send in the notification payload.

# Codes to represent how much resource content to send in notification payloads.

fhirvs:subscription-payload-content ["empty" "id-only" "full-resource"]
# State values for FHIR Subscriptions.
fhirvs:subscription-status ["requested" "active" "error" "off" "entered-in-error"]

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.