type: datatypedatatype: TriggerDefinition
TriggerDefinition
Elements
- TriggerDefinition.type [1..1]: code The type of triggering event
- TriggerDefinition.name [0..1]: string 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
- TriggerDefinition.code [0..1]: CodeableConcept A code that identifies the event
- TriggerDefinition.subscriptionTopic [0..1]: canonical(SubscriptionTopic) 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
- TriggerDefinition.timing[x] [0..1]: Timing|date|dateTime The timing of the event (if this is a periodic trigger)
- TriggerDefinition.data [0..*]: DataRequirement 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
- TriggerDefinition.condition [0..1]: Expression 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
Bindings
- TriggerDefinition.type:
TriggerType| strength: code list | reference: #trigger-type
Invariants
- TriggerDefinition.timing[x]:
3 - TriggerDefinition.timing[x]:
1 - TriggerDefinition.data:
3 - TriggerDefinition.data:
1
Requirements
- TriggerDefinition.condition: Need to be able to formally describe the triggering criteria
Comments
- TriggerDefinition.name: 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
- TriggerDefinition.data: This element shall be present for any data type trigger
- TriggerDefinition.condition: This element can be specified for any type of trigger and provides additional criteria for the trigger. The context available within the condition is based on the type of 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