FHIR CI-Build

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

Example StructureDefinition/TriggerDefinition (Turtle)

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

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for TriggerDefinition

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "TriggerDefinition"] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "trial-use" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ] ;
     fhir:value [ fhir:v "fhir" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition"] ;
  fhir:version [ fhir:v "6.0.0-ballot2"], [ fhir:v "6.0.0-ballot2"] ;
  fhir:name [ fhir:v "TriggerDefinition"], [ fhir:v "TriggerDefinition"] ;
  fhir:status [ fhir:v "draft"], [ fhir:v "draft"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2024-11-07T14:43:37+00:00"], [ fhir:v "2024-11-07T14:43:37+00:00"] ;
  fhir:publisher [ fhir:v "HL7 International / FHIR Infrastructure"], [ fhir:v "HL7 International / FHIR Infrastructure"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."], [ fhir:v "TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:fhirVersion [ fhir:v "6.0.0-ballot2"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "complex-type"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "TriggerDefinition"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/DataType"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "TriggerDefinition" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "TriggerDefinition" ] ;
       fhir:short [ fhir:v "Defines an expected trigger for a module" ] ;
       fhir:definition [ fhir:v "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element." ] ;
       fhir:comment [ fhir:v "If an event is a named-event, it means the event is completely pre-coordinated, and no other information can be specified for the event. If the event is one of the data- events, the data and condition elements specify the triggering criteria. The data element specifies the structured component, and the condition element provides additional optional refinement of that structured component. If the event is periodic, the timing element defines when the event is triggered. For both data- and periodic events, a name can be provided as a shorthand for the formal semantics provided by the other elements." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "trd-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Either timing, or a data requirement, but not both" ] ;
         fhir:expression [ fhir:v "data.empty() or timing.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] [
         fhir:key [ fhir:v "trd-2" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "A condition only if there is a data requirement" ] ;
         fhir:expression [ fhir:v "condition.exists() implies data.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] [
         fhir:key [ fhir:v "trd-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "A named event requires a name, a periodic event requires timing, and a data event requires data" ] ;
         fhir:expression [ fhir:v "(type = 'named-event' implies name.exists()) and (type = 'periodic' implies timing.exists()) and (type.startsWith('data-') implies data.exists())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.id" ] ;
       fhir:path [ fhir:v "TriggerDefinition.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.extension" ] ;
       fhir:path [ fhir:v "TriggerDefinition.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
       fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.type" ] ;
       fhir:path [ fhir:v "TriggerDefinition.type" ] ;
       fhir:short [ fhir:v "named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended" ] ;
       fhir:definition [ fhir:v "The type of triggering event." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.type" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/binding-definition" ] ;
           fhir:value [ fhir:v "The type of trigger." ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "TriggerType" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "The type of trigger." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/trigger-type|6.0.0-ballot2" ]
       ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.name" ] ;
       fhir:path [ fhir:v "TriggerDefinition.name" ] ;
       fhir:short [ fhir:v "Name or URI that identifies the event" ] ;
       fhir:definition [ fhir:v "A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context." ] ;
       fhir:comment [ fhir:v "An event name can be provided for all event types, but is required for named events. If a name is provided for a type other than named events, it is considered to be a shorthand for the semantics described by the formal description of the event." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.name" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.code" ] ;
       fhir:path [ fhir:v "TriggerDefinition.code" ] ;
       fhir:short [ fhir:v "Coded definition of the event" ] ;
       fhir:definition [ fhir:v "A code that identifies the event." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.code" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.subscriptionTopic" ] ;
       fhir:path [ fhir:v "TriggerDefinition.subscriptionTopic" ] ;
       fhir:short [ fhir:v "What event" ] ;
       fhir:definition [ fhir:v "A reference to a SubscriptionTopic resource that defines the event. If this element is provided, no other information about the trigger definition may be supplied." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.subscriptionTopic" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "canonical" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/SubscriptionTopic" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.timing[x]" ] ;
       fhir:path [ fhir:v "TriggerDefinition.timing[x]" ] ;
       fhir:short [ fhir:v "Timing of the event" ] ;
       fhir:definition [ fhir:v "The timing of the event (if this is a periodic trigger)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.timing[x]" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Timing" ]
       ] [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Schedule" ] )
       ] [
         fhir:code [ fhir:v "date" ]
       ] [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] [ fhir:v "trd-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.data" ] ;
       fhir:path [ fhir:v "TriggerDefinition.data" ] ;
       fhir:short [ fhir:v "Triggering data of the event (multiple = 'and')" ] ;
       fhir:definition [ fhir:v "The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true." ] ;
       fhir:comment [ fhir:v "This element shall be present for any data type trigger." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.data" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "DataRequirement" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] [ fhir:v "trd-2" ] [ fhir:v "trd-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.condition" ] ;
       fhir:path [ fhir:v "TriggerDefinition.condition" ] ;
       fhir:short [ fhir:v "Whether the event triggers (boolean expression)" ] ;
       fhir:definition [ fhir:v "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires." ] ;
       fhir:comment [ fhir:v "This element can be only be specified for data type triggers and provides additional semantics for the trigger. The context available within the condition is based on the type of data event. For all events, the current resource will be available as context. In addition, for modification events, the previous resource will also be available. The expression may be inlined, or may be a simple absolute URI, which is a reference to a named expression within a logic library referenced by a library element or extension within the containing resource. If the expression is a FHIR Path expression, it evaluates in the context of a resource of one of the type identified in the data requirement, and may also refer to the variable %previous for delta comparisons on events of type data-changed, data-modified, and data-deleted which will always have the same type." ] ;
       fhir:requirements [ fhir:v "Need to be able to formally describe the triggering criteria." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "TriggerDefinition.condition" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Expression" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-2" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "TriggerDefinition" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "TriggerDefinition" ] ;
       fhir:short [ fhir:v "Defines an expected trigger for a module" ] ;
       fhir:definition [ fhir:v "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element." ] ;
       fhir:comment [ fhir:v "If an event is a named-event, it means the event is completely pre-coordinated, and no other information can be specified for the event. If the event is one of the data- events, the data and condition elements specify the triggering criteria. The data element specifies the structured component, and the condition element provides additional optional refinement of that structured component. If the event is periodic, the timing element defines when the event is triggered. For both data- and periodic events, a name can be provided as a shorthand for the formal semantics provided by the other elements." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "trd-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "A named event requires a name, a periodic event requires timing, and a data event requires data" ] ;
         fhir:expression [ fhir:v "(type = 'named-event' implies name.exists()) and (type = 'periodic' implies timing.exists()) and (type.startsWith('data-') implies data.exists())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] [
         fhir:key [ fhir:v "trd-2" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "A condition only if there is a data requirement" ] ;
         fhir:expression [ fhir:v "condition.exists() implies data.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] [
         fhir:key [ fhir:v "trd-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Either timing, or a data requirement, but not both" ] ;
         fhir:expression [ fhir:v "data.empty() or timing.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/TriggerDefinition" ]
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.type" ] ;
       fhir:path [ fhir:v "TriggerDefinition.type" ] ;
       fhir:short [ fhir:v "named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended" ] ;
       fhir:definition [ fhir:v "The type of triggering event." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] ) ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/binding-definition" ] ;
           fhir:value [ fhir:v "The type of trigger." ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "TriggerType" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "The type of trigger." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/trigger-type|6.0.0-ballot2" ]
       ]
     ] [
       fhir:id [ fhir:v "TriggerDefinition.name" ] ;
       fhir:path [ fhir:v "TriggerDefinition.name" ] ;
       fhir:short [ fhir:v "Name or URI that identifies the event" ] ;
       fhir:definition [ fhir:v "A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context." ] ;
       fhir:comment [ fhir:v "An event name can be provided for all event types, but is required for named events. If a name is provided for a type other than named events, it is considered to be a shorthand for the semantics described by the formal description of the event." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.code" ] ;
       fhir:path [ fhir:v "TriggerDefinition.code" ] ;
       fhir:short [ fhir:v "Coded definition of the event" ] ;
       fhir:definition [ fhir:v "A code that identifies the event." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.subscriptionTopic" ] ;
       fhir:path [ fhir:v "TriggerDefinition.subscriptionTopic" ] ;
       fhir:short [ fhir:v "What event" ] ;
       fhir:definition [ fhir:v "A reference to a SubscriptionTopic resource that defines the event. If this element is provided, no other information about the trigger definition may be supplied." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "canonical" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/SubscriptionTopic" ] )
       ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.timing[x]" ] ;
       fhir:path [ fhir:v "TriggerDefinition.timing[x]" ] ;
       fhir:short [ fhir:v "Timing of the event" ] ;
       fhir:definition [ fhir:v "The timing of the event (if this is a periodic trigger)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Timing" ]
       ] [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Schedule" ] )
       ] [
         fhir:code [ fhir:v "date" ]
       ] [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] [ fhir:v "trd-1" ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.data" ] ;
       fhir:path [ fhir:v "TriggerDefinition.data" ] ;
       fhir:short [ fhir:v "Triggering data of the event (multiple = 'and')" ] ;
       fhir:definition [ fhir:v "The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true." ] ;
       fhir:comment [ fhir:v "This element shall be present for any data type trigger." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "DataRequirement" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-3" ] [ fhir:v "trd-2" ] [ fhir:v "trd-1" ] )
     ] [
       fhir:id [ fhir:v "TriggerDefinition.condition" ] ;
       fhir:path [ fhir:v "TriggerDefinition.condition" ] ;
       fhir:short [ fhir:v "Whether the event triggers (boolean expression)" ] ;
       fhir:definition [ fhir:v "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires." ] ;
       fhir:comment [ fhir:v "This element can be only be specified for data type triggers and provides additional semantics for the trigger. The context available within the condition is based on the type of data event. For all events, the current resource will be available as context. In addition, for modification events, the previous resource will also be available. The expression may be inlined, or may be a simple absolute URI, which is a reference to a named expression within a logic library referenced by a library element or extension within the containing resource. If the expression is a FHIR Path expression, it evaluates in the context of a resource of one of the type identified in the data requirement, and may also refer to the variable %previous for delta comparisons on events of type data-changed, data-modified, and data-deleted which will always have the same type." ] ;
       fhir:requirements [ fhir:v "Need to be able to formally describe the triggering criteria." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Expression" ]
       ] ) ;
       fhir:condition ( [ fhir:v "trd-2" ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------


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