Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is a downloaded copy of the specification. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Triggerdefinition.shex

Modeling and Methodology Work GroupMaturity Level: N/AStandards Status: Informative

Raw ShEx

ShEx statement for TriggerDefinition

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 <date.shex>
IMPORT <string.shex>
IMPORT <Timing.shex>
IMPORT <DataType.shex>
IMPORT <dateTime.shex>
IMPORT <Schedule.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Expression.shex>
IMPORT <CodeableConcept.shex>
IMPORT <DataRequirement.shex>

# Defines an expected trigger for a module
<TriggerDefinition> EXTENDS @<DataType> CLOSED {   

    a [fhir:TriggerDefinition]?;

    fhir:type @<code> AND
    	{fhir:v @fhirvs:trigger-type};  # named-event | periodic | 
                                            # data-changed | data-added | 
                                            # data-modified | data-removed | 
                                            # data-accessed | data-access-ended 
    fhir:name @<string>?;                   # Name or URI that identifies the 
                                            # event 
    fhir:code @<CodeableConcept>?;          # Coded definition of the event
    fhir:subscriptionTopic @<canonical>?;   # What event
    fhir:timing @<Timing>  OR 
    			(@<Reference>  AND {fhir:link @<Schedule> })  OR 
    			@<date>  OR 
    			@<dateTime>  ?;  # Timing of the event
    fhir:data @<OneOrMore_DataRequirement>?;  # Triggering data of the event 
                                            # (multiple = 'and') 
    fhir:condition @<Expression>?;          # Whether the event triggers 
                                            # (boolean expression) 
}  

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

<OneOrMore_DataRequirement> CLOSED {
    rdf:first @<DataRequirement>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_DataRequirement> 
}

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

# The type of trigger.
fhirvs:trigger-type ["named-event" "periodic" "data-changed" "data-added" "data-modified" "data-removed" "data-accessed" "data-access-ended"]


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.