R6 Ballot (1st Draft)

This page is part of the FHIR Specification v6.0.0-ballot1: Release 6 Ballot (1st Draft) (see Ballot Notes). The current version is 5.0.0. For a full list of available versions, see the Directory of published versions

Subscriptionstatus.shex

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

Raw ShEx

ShEx statement for subscriptionstatus

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 <code.shex>
IMPORT <instant.shex>
IMPORT <Resource.shex>
IMPORT <integer64.shex>
IMPORT <Reference.shex>
IMPORT <canonical.shex>
IMPORT <Subscription.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>


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

# Status information about a Subscription provided during event notification
<SubscriptionStatus> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:status @<code> AND
    	{fhir:v @fhirvs:subscription-status}?;  # requested | active | error | off | 
                                            # entered-in-error 
    fhir:type @<code> AND
    	{fhir:v @fhirvs:subscription-notification-type};  # handshake | heartbeat | 
                                            # event-notification | query-status 
                                            # | query-event 
    fhir:eventsSinceSubscriptionStart @<integer64>?;  # Events since the Subscription was 
                                            # created 
    fhir:notificationEvent @<OneOrMore_SubscriptionStatus.notificationEvent>?;  # Detailed information about any 
                                            # events relevant to this 
                                            # notification 
    fhir:subscription @<Reference> AND {fhir:link 
    			@<Subscription> ? };  # Reference to the Subscription 
                                            # responsible for this notification 
    fhir:topic @<canonical>?;               # Reference to the SubscriptionTopic 
                                            # this notification relates to 
    fhir:error @<OneOrMore_CodeableConcept>?;  # List of errors on the subscription
}  

# Detailed information about any events relevant to this notification
<SubscriptionStatus.notificationEvent> EXTENDS @<BackboneElement> CLOSED {   
    fhir:eventNumber @<integer64>;          # Sequencing index of this event
    fhir:timestamp @<instant>?;             # The instant this event occurred
    fhir:focus @<Reference> AND {fhir:link 
    			@<Resource> ? }?;  # Reference to the primary resource 
                                            # or information of this event 
    fhir:additionalContext @<OneOrMore_Reference_Resource>?;  # References related to the focus 
                                            # resource and/or context of this 
                                            # event 
}  

#---------------------- Cardinality Types (OneOrMore) -------------------

<OneOrMore_SubscriptionStatus.notificationEvent> CLOSED {
    rdf:first @<SubscriptionStatus.notificationEvent>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_SubscriptionStatus.notificationEvent> 
}

<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

<OneOrMore_Reference_Resource> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Resource> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource> 
}

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

# The type of notification represented by the status message.
fhirvs:subscription-notification-type ["handshake" "heartbeat" "event-notification" "query-status" "query-event"]

# 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.