This page is part of the FHIR Specification (v3.3.0: R4 Ballot 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3
Modeling and Methodology Work Group | Maturity Level: N/A | Ballot Status: Informative |
StructureDefinition for TriggerDefinition
{ "resourceType": "StructureDefinition", "id": "TriggerDefinition", "meta": { "lastUpdated": "2018-04-03T12:05:46.262+10:00" }, "text": { "status": "generated", "div": "<div>!-- Snipped for Brevity --></div>" }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-ballot-status", "valueString": "Trial Use" } ], "url": "http://hl7.org/fhir/StructureDefinition/TriggerDefinition", "name": "TriggerDefinition", "status": "draft", "date": "2018-04-03T12:05:46+10:00", "publisher": "HL7 FHIR Standard", "contact": [ { "telecom": [ { "system": "url", "value": "http://hl7.org/fhir" } ] } ], "description": "Base StructureDefinition for TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.", "fhirVersion": "3.3.0", "mapping": [ { "identity": "rim", "uri": "http://hl7.org/v3", "name": "RIM Mapping" } ], "kind": "complex-type", "abstract": false, "type": "TriggerDefinition", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element", "derivation": "specialization", "snapshot": { "element": [ { "id": "TriggerDefinition", "path": "TriggerDefinition", "short": "Defines an expected trigger for a module", "definition": "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.", "comment": "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.", "min": 0, "max": "*", "base": { "path": "TriggerDefinition", "min": 0, "max": "*" }, "condition": [ "ele-1" ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "trd-2", "severity": "error", "human": "A condition only if there is a data requirement", "expression": "condition.exists() implies data.exists()", "xpath": "not(exists(f:condition)) or exists(f:data)" }, { "key": "trd-1", "severity": "error", "human": "Either timing, or a data requirement, but not both", "expression": "data.empty() or timing.empty()", "xpath": "not(exists(f:data)) or not(exists(*[starts-with(local-name(.), 'timing')]))" } ], "isModifier": false, "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TriggerDefinition.id", "path": "TriggerDefinition.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "isModifier": false, "isSummary": false, "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TriggerDefinition.extension", "path": "TriggerDefinition.extension", "slicing": { "discriminator": [ { "type": "value", "path": "url" } ], "description": "Extensions are always sliced by (at least) url", "rules": "open" }, "short": "Additional content defined by implementations", "definition": "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 manageable, 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.", "comment": "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.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": false, "isSummary": false, "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TriggerDefinition.type", "path": "TriggerDefinition.type", "short": "named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended", "definition": "The type of triggering event.", "min": 1, "max": "1", "base": { "path": "TriggerDefinition.type", "min": 1, "max": "1" }, "type": [ { "code": "code" } ], "isModifier": false, "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TriggerType" } ], "strength": "required", "description": "The type of trigger", "valueSetCanonical": "http://hl7.org/fhir/ValueSet/trigger-type" } }, { "id": "TriggerDefinition.name", "path": "TriggerDefinition.name", "short": "Name or URI that identifies the event", "definition": "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.", "comment": "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.", "min": 0, "max": "1", "base": { "path": "TriggerDefinition.name", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "isModifier": false, "isSummary": true }, { "id": "TriggerDefinition.timing[x]", "path": "TriggerDefinition.timing[x]", "short": "Timing of the event", "definition": "The timing of the event (if this is a periodic trigger).", "min": 0, "max": "1", "base": { "path": "TriggerDefinition.timing[x]", "min": 0, "max": "1" }, "type": [ { "code": "Timing" }, { "code": "Reference", "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Schedule" ] }, { "code": "date" }, { "code": "dateTime" } ], "isModifier": false, "isSummary": true }, { "id": "TriggerDefinition.data", "path": "TriggerDefinition.data", "short": "Triggering data of the event", "definition": "The triggering data of the event (if this is a data trigger).", "comment": "This element shall be present for any data type trigger.", "min": 0, "max": "1", "base": { "path": "TriggerDefinition.data", "min": 0, "max": "1" }, "type": [ { "code": "DataRequirement" } ], "isModifier": false, "isSummary": true }, { "id": "TriggerDefinition.condition", "path": "TriggerDefinition.condition", "short": "Whether the event triggers", "definition": "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.", "comment": "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.", "requirements": "Need to be able to formally describe the triggering criteria.", "min": 0, "max": "1", "base": { "path": "TriggerDefinition.condition", "min": 0, "max": "1" }, "type": [ { "code": "Element" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ], "isModifier": false, "isSummary": true }, { "id": "TriggerDefinition.condition.id", "path": "TriggerDefinition.condition.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "isModifier": false, "isSummary": false, "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TriggerDefinition.condition.extension", "path": "TriggerDefinition.condition.extension", "slicing": { "discriminator": [ { "type": "value", "path": "url" } ], "description": "Extensions are always sliced by (at least) url", "rules": "open" }, "short": "Additional content defined by implementations", "definition": "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 manageable, 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.", "comment": "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.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": false, "isSummary": false, "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TriggerDefinition.condition.description", "path": "TriggerDefinition.condition.description", "short": "Natural language description of the condition", "definition": "A brief, natural language description of the condition that effectively communicates the intended semantics.", "min": 0, "max": "1", "base": { "path": "TriggerDefinition.condition.description", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "isModifier": false, "isSummary": true }, { "id": "TriggerDefinition.condition.language", "path": "TriggerDefinition.condition.language", "short": "text/cql | text/fhirpath | etc.", "definition": "The media type of the language for the expression.", "min": 1, "max": "1", "base": { "path": "TriggerDefinition.condition.language", "min": 1, "max": "1" }, "type": [ { "code": "code" } ], "isModifier": false, "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", "valueReference": { "reference": "http://www.rfc-editor.org/bcp/bcp13.txt" } }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ExpressionLanguage" } ], "strength": "extensible", "description": "The media type of the expression language", "valueSetCanonical": "http://hl7.org/fhir/ValueSet/expression-language" } }, { "id": "TriggerDefinition.condition.expression", "path": "TriggerDefinition.condition.expression", "short": "Boolean-valued expression", "definition": "An expression that returns true or false, indicating whether or not the condition is satisfied.", "comment": "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.", "min": 1, "max": "1", "base": { "path": "TriggerDefinition.condition.expression", "min": 1, "max": "1" }, "type": [ { "code": "string" } ], "isModifier": false, "isSummary": true } ] }, "differential": { "element": [ { "id": "TriggerDefinition", "path": "TriggerDefinition", "short": "Defines an expected trigger for a module", "definition": "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.", "comment": "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.", "min": 0, "max": "*", "constraint": [ { "key": "trd-2", "severity": "error", "human": "A condition only if there is a data requirement", "expression": "condition.exists() implies data.exists()", "xpath": "not(exists(f:condition)) or exists(f:data)" }, { "key": "trd-1", "severity": "error", "human": "Either timing, or a data requirement, but not both", "expression": "data.empty() or timing.empty()", "xpath": "not(exists(f:data)) or not(exists(*[starts-with(local-name(.), 'timing')]))" } ] }, { "id": "TriggerDefinition.type", "path": "TriggerDefinition.type", "short": "named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended", "definition": "The type of triggering event.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TriggerType" } ], "strength": "required", "description": "The type of trigger", "valueSetCanonical": "http://hl7.org/fhir/ValueSet/trigger-type" } }, { "id": "TriggerDefinition.name", "path": "TriggerDefinition.name", "short": "Name or URI that identifies the event", "definition": "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.", "comment": "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.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TriggerDefinition.timing[x]", "path": "TriggerDefinition.timing[x]", "short": "Timing of the event", "definition": "The timing of the event (if this is a periodic trigger).", "min": 0, "max": "1", "type": [ { "code": "Timing" }, { "code": "Reference", "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Schedule" ] }, { "code": "date" }, { "code": "dateTime" } ], "isSummary": true }, { "id": "TriggerDefinition.data", "path": "TriggerDefinition.data", "short": "Triggering data of the event", "definition": "The triggering data of the event (if this is a data trigger).", "comment": "This element shall be present for any data type trigger.", "min": 0, "max": "1", "type": [ { "code": "DataRequirement" } ], "isSummary": true }, { "id": "TriggerDefinition.condition", "path": "TriggerDefinition.condition", "short": "Whether the event triggers", "definition": "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.", "comment": "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.", "requirements": "Need to be able to formally describe the triggering criteria.", "min": 0, "max": "1", "type": [ { "code": "Element" } ], "isSummary": true }, { "id": "TriggerDefinition.condition.description", "path": "TriggerDefinition.condition.description", "short": "Natural language description of the condition", "definition": "A brief, natural language description of the condition that effectively communicates the intended semantics.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TriggerDefinition.condition.language", "path": "TriggerDefinition.condition.language", "short": "text/cql | text/fhirpath | etc.", "definition": "The media type of the language for the expression.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", "valueReference": { "reference": "http://www.rfc-editor.org/bcp/bcp13.txt" } }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ExpressionLanguage" } ], "strength": "extensible", "description": "The media type of the expression language", "valueSetCanonical": "http://hl7.org/fhir/ValueSet/expression-language" } }, { "id": "TriggerDefinition.condition.expression", "path": "TriggerDefinition.condition.expression", "short": "Boolean-valued expression", "definition": "An expression that returns true or false, indicating whether or not the condition is satisfied.", "comment": "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.", "min": 1, "max": "1", "type": [ { "code": "string" } ], "isSummary": true } ] } }
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.