TriggerDefinition.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="TriggerDefinition" />
  4   <meta>
  5     <lastUpdated value="2023-03-26T06:21:02.749+02:00" />
  6   </meta>
  7   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
  8     <valueCode value="trial-use" />
  9   </extension>
 10   <url value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
 11   <version value="5.0.0" />
 12   <name value="TriggerDefinition" />
 13   <status value="draft" />
 14   <experimental value="false" />
 15   <date value="2023-03-26T06:21:02.0000000+02:00" />
 16   <publisher value="HL7 FHIR Standard" />
 17   <contact>
 18     <telecom>
 19       <system value="url" />
 20       <value value="http://hl7.org/fhir" />
 21     </telecom>
 22   </contact>
 23   <description value="TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element." />
 24   <jurisdiction>
 25     <coding>
 26       <system value="http://unstats.un.org/unsd/methods/m49/m49.htm" />
 27       <code value="001" />
 28       <display value="World" />
 29     </coding>
 30   </jurisdiction>
 31   <fhirVersion value="5.0.0" />
 32   <mapping>
 33     <identity value="rim" />
 34     <uri value="http://hl7.org/v3" />
 35     <name value="RIM Mapping" />
 36   </mapping>
 37   <kind value="complex-type" />
 38   <abstract value="false" />
 39   <type value="TriggerDefinition" />
 40   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DataType" />
 41   <derivation value="specialization" />
 42   <snapshot>
 43     <element id="TriggerDefinition">
 44       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 45         <valueCode value="trial-use" />
 46       </extension>
 47       <path value="TriggerDefinition" />
 48       <short value="Defines an expected trigger for a module" />
 49       <definition value="A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element." />
 50       <comment value="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." />
 51       <min value="0" />
 52       <max value="*" />
 53       <base>
 54         <path value="TriggerDefinition" />
 55         <min value="0" />
 56         <max value="*" />
 57       </base>
 58       <constraint>
 59         <key value="ele-1" />
 60         <severity value="error" />
 61         <human value="All FHIR elements must have a @value or children" />
 62         <expression value="hasValue() or (children().count() > id.count())" />
 63         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 64       </constraint>
 65       <constraint>
 66         <key value="trd-1" />
 67         <severity value="error" />
 68         <human value="Either timing, or a data requirement, but not both" />
 69         <expression value="data.empty() or timing.empty()" />
 70         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
 71       </constraint>
 72       <constraint>
 73         <key value="trd-2" />
 74         <severity value="error" />
 75         <human value="A condition only if there is a data requirement" />
 76         <expression value="condition.exists() implies data.exists()" />
 77         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
 78       </constraint>
 79       <constraint>
 80         <key value="trd-3" />
 81         <severity value="error" />
 82         <human value="A named event requires a name, a periodic event requires timing, and a data event requires data" />
 83         <expression value="(type = 'named-event' implies name.exists()) and (type = 'periodic' implies timing.exists()) and (type.startsWith('data-') implies data.exists())" />
 84         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
 85       </constraint>
 86       <isModifier value="false" />
 87       <mapping>
 88         <identity value="rim" />
 89         <map value="n/a" />
 90       </mapping>
 91     </element>
 92     <element id="TriggerDefinition.id">
 93       <path value="TriggerDefinition.id" />
 94       <representation value="xmlAttr" />
 95       <short value="Unique id for inter-element referencing" />
 96       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
 97       <min value="0" />
 98       <max value="1" />
 99       <base>
100         <path value="Element.id" />
101         <min value="0" />
102         <max value="1" />
103       </base>
104       <type>
105         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
106           <valueUrl value="id" />
107         </extension>
108         <code value="http://hl7.org/fhirpath/System.String" />
109       </type>
110       <condition value="ele-1" />
111       <isModifier value="false" />
112       <isSummary value="false" />
113       <mapping>
114         <identity value="rim" />
115         <map value="n/a" />
116       </mapping>
117     </element>
118     <element id="TriggerDefinition.extension">
119       <path value="TriggerDefinition.extension" />
120       <slicing>
121         <discriminator>
122           <type value="value" />
123           <path value="url" />
124         </discriminator>
125         <description value="Extensions are always sliced by (at least) url" />
126         <rules value="open" />
127       </slicing>
128       <short value="Additional content defined by implementations" />
129       <definition value="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." />
130       <comment value="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." />
131       <alias value="extensions" />
132       <alias value="user content" />
133       <min value="0" />
134       <max value="*" />
135       <base>
136         <path value="Element.extension" />
137         <min value="0" />
138         <max value="*" />
139       </base>
140       <type>
141         <code value="Extension" />
142       </type>
143       <constraint>
144         <key value="ele-1" />
145         <severity value="error" />
146         <human value="All FHIR elements must have a @value or children" />
147         <expression value="hasValue() or (children().count() > id.count())" />
148         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
149       </constraint>
150       <constraint>
151         <key value="ext-1" />
152         <severity value="error" />
153         <human value="Must have either extensions or value[x], not both" />
154         <expression value="extension.exists() != value.exists()" />
155         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
156       </constraint>
157       <isModifier value="false" />
158       <isSummary value="false" />
159       <mapping>
160         <identity value="rim" />
161         <map value="n/a" />
162       </mapping>
163     </element>
164     <element id="TriggerDefinition.type">
165       <path value="TriggerDefinition.type" />
166       <short value="named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended" />
167       <definition value="The type of triggering event." />
168       <min value="1" />
169       <max value="1" />
170       <base>
171         <path value="TriggerDefinition.type" />
172         <min value="1" />
173         <max value="1" />
174       </base>
175       <type>
176         <code value="code" />
177       </type>
178       <condition value="trd-3" />
179       <constraint>
180         <key value="ele-1" />
181         <severity value="error" />
182         <human value="All FHIR elements must have a @value or children" />
183         <expression value="hasValue() or (children().count() > id.count())" />
184         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
185       </constraint>
186       <isModifier value="false" />
187       <isSummary value="true" />
188       <binding>
189         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
190           <valueString value="The type of trigger." />
191         </extension>
192         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
193           <valueString value="TriggerType" />
194         </extension>
195         <strength value="required" />
196         <description value="The type of trigger." />
197         <valueSet value="http://hl7.org/fhir/ValueSet/trigger-type|5.0.0" />
198       </binding>
199     </element>
200     <element id="TriggerDefinition.name">
201       <path value="TriggerDefinition.name" />
202       <short value="Name or URI that identifies the event" />
203       <definition value="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." />
204       <comment value="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." />
205       <min value="0" />
206       <max value="1" />
207       <base>
208         <path value="TriggerDefinition.name" />
209         <min value="0" />
210         <max value="1" />
211       </base>
212       <type>
213         <code value="string" />
214       </type>
215       <condition value="trd-3" />
216       <constraint>
217         <key value="ele-1" />
218         <severity value="error" />
219         <human value="All FHIR elements must have a @value or children" />
220         <expression value="hasValue() or (children().count() > id.count())" />
221         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
222       </constraint>
223       <isModifier value="false" />
224       <isSummary value="true" />
225     </element>
226     <element id="TriggerDefinition.code">
227       <path value="TriggerDefinition.code" />
228       <short value="Coded definition of the event" />
229       <definition value="A code that identifies the event." />
230       <min value="0" />
231       <max value="1" />
232       <base>
233         <path value="TriggerDefinition.code" />
234         <min value="0" />
235         <max value="1" />
236       </base>
237       <type>
238         <code value="CodeableConcept" />
239       </type>
240       <constraint>
241         <key value="ele-1" />
242         <severity value="error" />
243         <human value="All FHIR elements must have a @value or children" />
244         <expression value="hasValue() or (children().count() > id.count())" />
245         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
246       </constraint>
247       <isModifier value="false" />
248       <isSummary value="true" />
249     </element>
250     <element id="TriggerDefinition.subscriptionTopic">
251       <path value="TriggerDefinition.subscriptionTopic" />
252       <short value="What event" />
253       <definition value="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." />
254       <min value="0" />
255       <max value="1" />
256       <base>
257         <path value="TriggerDefinition.subscriptionTopic" />
258         <min value="0" />
259         <max value="1" />
260       </base>
261       <type>
262         <code value="canonical" />
263         <targetProfile value="http://hl7.org/fhir/StructureDefinition/SubscriptionTopic" />
264       </type>
265       <constraint>
266         <key value="ele-1" />
267         <severity value="error" />
268         <human value="All FHIR elements must have a @value or children" />
269         <expression value="hasValue() or (children().count() > id.count())" />
270         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
271       </constraint>
272       <isModifier value="false" />
273       <isSummary value="true" />
274     </element>
275     <element id="TriggerDefinition.timing[x]">
276       <path value="TriggerDefinition.timing[x]" />
277       <short value="Timing of the event" />
278       <definition value="The timing of the event (if this is a periodic trigger)." />
279       <min value="0" />
280       <max value="1" />
281       <base>
282         <path value="TriggerDefinition.timing[x]" />
283         <min value="0" />
284         <max value="1" />
285       </base>
286       <type>
287         <code value="Timing" />
288       </type>
289       <type>
290         <code value="Reference" />
291         <targetProfile value="http://hl7.org/fhir/StructureDefinition/Schedule" />
292       </type>
293       <type>
294         <code value="date" />
295       </type>
296       <type>
297         <code value="dateTime" />
298       </type>
299       <condition value="trd-3" />
300       <condition value="trd-1" />
301       <constraint>
302         <key value="ele-1" />
303         <severity value="error" />
304         <human value="All FHIR elements must have a @value or children" />
305         <expression value="hasValue() or (children().count() > id.count())" />
306         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
307       </constraint>
308       <isModifier value="false" />
309       <isSummary value="true" />
310     </element>
311     <element id="TriggerDefinition.data">
312       <path value="TriggerDefinition.data" />
313       <short value="Triggering data of the event (multiple = 'and')" />
314       <definition value="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." />
315       <comment value="This element shall be present for any data type trigger." />
316       <min value="0" />
317       <max value="*" />
318       <base>
319         <path value="TriggerDefinition.data" />
320         <min value="0" />
321         <max value="*" />
322       </base>
323       <type>
324         <code value="DataRequirement" />
325       </type>
326       <condition value="trd-3" />
327       <condition value="trd-2" />
328       <condition value="trd-1" />
329       <constraint>
330         <key value="ele-1" />
331         <severity value="error" />
332         <human value="All FHIR elements must have a @value or children" />
333         <expression value="hasValue() or (children().count() > id.count())" />
334         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
335       </constraint>
336       <isModifier value="false" />
337       <isSummary value="true" />
338     </element>
339     <element id="TriggerDefinition.condition">
340       <path value="TriggerDefinition.condition" />
341       <short value="Whether the event triggers (boolean expression)" />
342       <definition value="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." />
343       <comment value="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." />
344       <requirements value="Need to be able to formally describe the triggering criteria." />
345       <min value="0" />
346       <max value="1" />
347       <base>
348         <path value="TriggerDefinition.condition" />
349         <min value="0" />
350         <max value="1" />
351       </base>
352       <type>
353         <code value="Expression" />
354       </type>
355       <condition value="trd-2" />
356       <constraint>
357         <key value="ele-1" />
358         <severity value="error" />
359         <human value="All FHIR elements must have a @value or children" />
360         <expression value="hasValue() or (children().count() > id.count())" />
361         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
362       </constraint>
363       <isModifier value="false" />
364       <isSummary value="true" />
365     </element>
366   </snapshot>
367   <differential>
368     <element id="TriggerDefinition">
369       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
370         <valueCode value="trial-use" />
371       </extension>
372       <path value="TriggerDefinition" />
373       <short value="Defines an expected trigger for a module" />
374       <definition value="A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element." />
375       <comment value="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." />
376       <min value="0" />
377       <max value="*" />
378       <constraint>
379         <key value="trd-3" />
380         <severity value="error" />
381         <human value="A named event requires a name, a periodic event requires timing, and a data event requires data" />
382         <expression value="(type = 'named-event' implies name.exists()) and (type = 'periodic' implies timing.exists()) and (type.startsWith('data-') implies data.exists())" />
383         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
384       </constraint>
385       <constraint>
386         <key value="trd-2" />
387         <severity value="error" />
388         <human value="A condition only if there is a data requirement" />
389         <expression value="condition.exists() implies data.exists()" />
390         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
391       </constraint>
392       <constraint>
393         <key value="trd-1" />
394         <severity value="error" />
395         <human value="Either timing, or a data requirement, but not both" />
396         <expression value="data.empty() or timing.empty()" />
397         <source value="http://hl7.org/fhir/StructureDefinition/TriggerDefinition" />
398       </constraint>
399     </element>
400     <element id="TriggerDefinition.type">
401       <path value="TriggerDefinition.type" />
402       <short value="named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended" />
403       <definition value="The type of triggering event." />
404       <min value="1" />
405       <max value="1" />
406       <type>
407         <code value="code" />
408       </type>
409       <condition value="trd-3" />
410       <isSummary value="true" />
411       <binding>
412         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
413           <valueString value="The type of trigger." />
414         </extension>
415         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
416           <valueString value="TriggerType" />
417         </extension>
418         <strength value="required" />
419         <description value="The type of trigger." />
420         <valueSet value="http://hl7.org/fhir/ValueSet/trigger-type|5.0.0" />
421       </binding>
422     </element>
423     <element id="TriggerDefinition.name">
424       <path value="TriggerDefinition.name" />
425       <short value="Name or URI that identifies the event" />
426       <definition value="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." />
427       <comment value="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." />
428       <min value="0" />
429       <max value="1" />
430       <type>
431         <code value="string" />
432       </type>
433       <condition value="trd-3" />
434       <isSummary value="true" />
435     </element>
436     <element id="TriggerDefinition.code">
437       <path value="TriggerDefinition.code" />
438       <short value="Coded definition of the event" />
439       <definition value="A code that identifies the event." />
440       <min value="0" />
441       <max value="1" />
442       <type>
443         <code value="CodeableConcept" />
444       </type>
445       <isSummary value="true" />
446     </element>
447     <element id="TriggerDefinition.subscriptionTopic">
448       <path value="TriggerDefinition.subscriptionTopic" />
449       <short value="What event" />
450       <definition value="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." />
451       <min value="0" />
452       <max value="1" />
453       <type>
454         <code value="canonical" />
455         <targetProfile value="http://hl7.org/fhir/StructureDefinition/SubscriptionTopic" />
456       </type>
457       <isSummary value="true" />
458     </element>
459     <element id="TriggerDefinition.timing[x]">
460       <path value="TriggerDefinition.timing[x]" />
461       <short value="Timing of the event" />
462       <definition value="The timing of the event (if this is a periodic trigger)." />
463       <min value="0" />
464       <max value="1" />
465       <type>
466         <code value="Timing" />
467       </type>
468       <type>
469         <code value="Reference" />
470         <targetProfile value="http://hl7.org/fhir/StructureDefinition/Schedule" />
471       </type>
472       <type>
473         <code value="date" />
474       </type>
475       <type>
476         <code value="dateTime" />
477       </type>
478       <condition value="trd-3" />
479       <condition value="trd-1" />
480       <isSummary value="true" />
481     </element>
482     <element id="TriggerDefinition.data">
483       <path value="TriggerDefinition.data" />
484       <short value="Triggering data of the event (multiple = 'and')" />
485       <definition value="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." />
486       <comment value="This element shall be present for any data type trigger." />
487       <min value="0" />
488       <max value="*" />
489       <type>
490         <code value="DataRequirement" />
491       </type>
492       <condition value="trd-3" />
493       <condition value="trd-2" />
494       <condition value="trd-1" />
495       <isSummary value="true" />
496     </element>
497     <element id="TriggerDefinition.condition">
498       <path value="TriggerDefinition.condition" />
499       <short value="Whether the event triggers (boolean expression)" />
500       <definition value="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." />
501       <comment value="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." />
502       <requirements value="Need to be able to formally describe the triggering criteria." />
503       <min value="0" />
504       <max value="1" />
505       <type>
506         <code value="Expression" />
507       </type>
508       <condition value="trd-2" />
509       <isSummary value="true" />
510     </element>
511   </differential>
512 </StructureDefinition>