Expression.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="Expression" />
  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/Expression" />
 11   <version value="5.0.0" />
 12   <name value="Expression" />
 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="Expression Type: A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used." />
 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="Expression" />
 40   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DataType" />
 41   <derivation value="specialization" />
 42   <snapshot>
 43     <element id="Expression">
 44       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 45         <valueCode value="trial-use" />
 46       </extension>
 47       <path value="Expression" />
 48       <short value="An expression that can be used to generate a value" />
 49       <definition value="A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used." />
 50       <min value="0" />
 51       <max value="*" />
 52       <base>
 53         <path value="Expression" />
 54         <min value="0" />
 55         <max value="*" />
 56       </base>
 57       <constraint>
 58         <key value="ele-1" />
 59         <severity value="error" />
 60         <human value="All FHIR elements must have a @value or children" />
 61         <expression value="hasValue() or (children().count() > id.count())" />
 62         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 63       </constraint>
 64       <constraint>
 65         <key value="exp-1" />
 66         <severity value="error" />
 67         <human value="An expression or a reference must be provided" />
 68         <expression value="expression.exists() or reference.exists()" />
 69         <source value="http://hl7.org/fhir/StructureDefinition/Expression" />
 70       </constraint>
 71       <constraint>
 72         <key value="exp-2" />
 73         <severity value="error" />
 74         <human value="The name must be a valid variable name in most computer languages" />
 75         <expression value="name.hasValue() implies name.matches('[A-Za-z][A-Za-z0-9\\_]{0,63}')" />
 76         <source value="http://hl7.org/fhir/StructureDefinition/Expression" />
 77       </constraint>
 78       <isModifier value="false" />
 79       <mapping>
 80         <identity value="rim" />
 81         <map value="n/a" />
 82       </mapping>
 83     </element>
 84     <element id="Expression.id">
 85       <path value="Expression.id" />
 86       <representation value="xmlAttr" />
 87       <short value="Unique id for inter-element referencing" />
 88       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
 89       <min value="0" />
 90       <max value="1" />
 91       <base>
 92         <path value="Element.id" />
 93         <min value="0" />
 94         <max value="1" />
 95       </base>
 96       <type>
 97         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
 98           <valueUrl value="id" />
 99         </extension>
100         <code value="http://hl7.org/fhirpath/System.String" />
101       </type>
102       <condition value="ele-1" />
103       <isModifier value="false" />
104       <isSummary value="false" />
105       <mapping>
106         <identity value="rim" />
107         <map value="n/a" />
108       </mapping>
109     </element>
110     <element id="Expression.extension">
111       <path value="Expression.extension" />
112       <slicing>
113         <discriminator>
114           <type value="value" />
115           <path value="url" />
116         </discriminator>
117         <description value="Extensions are always sliced by (at least) url" />
118         <rules value="open" />
119       </slicing>
120       <short value="Additional content defined by implementations" />
121       <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." />
122       <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." />
123       <alias value="extensions" />
124       <alias value="user content" />
125       <min value="0" />
126       <max value="*" />
127       <base>
128         <path value="Element.extension" />
129         <min value="0" />
130         <max value="*" />
131       </base>
132       <type>
133         <code value="Extension" />
134       </type>
135       <constraint>
136         <key value="ele-1" />
137         <severity value="error" />
138         <human value="All FHIR elements must have a @value or children" />
139         <expression value="hasValue() or (children().count() > id.count())" />
140         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
141       </constraint>
142       <constraint>
143         <key value="ext-1" />
144         <severity value="error" />
145         <human value="Must have either extensions or value[x], not both" />
146         <expression value="extension.exists() != value.exists()" />
147         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
148       </constraint>
149       <isModifier value="false" />
150       <isSummary value="false" />
151       <mapping>
152         <identity value="rim" />
153         <map value="n/a" />
154       </mapping>
155     </element>
156     <element id="Expression.description">
157       <path value="Expression.description" />
158       <short value="Natural language description of the condition" />
159       <definition value="A brief, natural language description of the condition that effectively communicates the intended semantics." />
160       <min value="0" />
161       <max value="1" />
162       <base>
163         <path value="Expression.description" />
164         <min value="0" />
165         <max value="1" />
166       </base>
167       <type>
168         <code value="string" />
169       </type>
170       <constraint>
171         <key value="ele-1" />
172         <severity value="error" />
173         <human value="All FHIR elements must have a @value or children" />
174         <expression value="hasValue() or (children().count() > id.count())" />
175         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
176       </constraint>
177       <isModifier value="false" />
178       <isSummary value="true" />
179     </element>
180     <element id="Expression.name">
181       <extension url="http://hl7.org/fhir/tools/StructureDefinition/no-binding">
182         <valueBoolean value="true" />
183       </extension>
184       <path value="Expression.name" />
185       <short value="Short name assigned to expression for reuse" />
186       <definition value="A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined." />
187       <min value="0" />
188       <max value="1" />
189       <base>
190         <path value="Expression.name" />
191         <min value="0" />
192         <max value="1" />
193       </base>
194       <type>
195         <code value="code" />
196       </type>
197       <condition value="exp-2" />
198       <constraint>
199         <key value="ele-1" />
200         <severity value="error" />
201         <human value="All FHIR elements must have a @value or children" />
202         <expression value="hasValue() or (children().count() > id.count())" />
203         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
204       </constraint>
205       <isModifier value="false" />
206       <isSummary value="true" />
207     </element>
208     <element id="Expression.language">
209       <path value="Expression.language" />
210       <short value="text/cql | text/fhirpath | application/x-fhir-query | etc." />
211       <definition value="The media type of the language for the expression." />
212       <requirements value="The cardinality of this element is optional to allow text only as part of the authoring process.  However, in order to be executable, the expression element must be specified." />
213       <min value="0" />
214       <max value="1" />
215       <base>
216         <path value="Expression.language" />
217         <min value="0" />
218         <max value="1" />
219       </base>
220       <type>
221         <code value="code" />
222       </type>
223       <constraint>
224         <key value="ele-1" />
225         <severity value="error" />
226         <human value="All FHIR elements must have a @value or children" />
227         <expression value="hasValue() or (children().count() > id.count())" />
228         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
229       </constraint>
230       <isModifier value="false" />
231       <isSummary value="true" />
232       <binding>
233         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
234           <valueString value="The media type of the expression language." />
235         </extension>
236         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
237           <valueString value="ExpressionLanguage" />
238         </extension>
239         <strength value="extensible" />
240         <description value="The media type of the expression language." />
241         <valueSet value="http://hl7.org/fhir/ValueSet/expression-language" />
242       </binding>
243     </element>
244     <element id="Expression.expression">
245       <path value="Expression.expression" />
246       <short value="Expression in specified language" />
247       <definition value="An expression in the specified language that returns a value." />
248       <comment value="If Expression.expression and Expression.reference are both present, the Expression.expression might just be a name pointing something within the referenced content." />
249       <min value="0" />
250       <max value="1" />
251       <base>
252         <path value="Expression.expression" />
253         <min value="0" />
254         <max value="1" />
255       </base>
256       <type>
257         <code value="string" />
258       </type>
259       <condition value="exp-1" />
260       <constraint>
261         <key value="ele-1" />
262         <severity value="error" />
263         <human value="All FHIR elements must have a @value or children" />
264         <expression value="hasValue() or (children().count() > id.count())" />
265         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
266       </constraint>
267       <isModifier value="false" />
268       <isSummary value="true" />
269     </element>
270     <element id="Expression.reference">
271       <path value="Expression.reference" />
272       <short value="Where the expression is found" />
273       <definition value="A URI that defines where the expression is found." />
274       <comment value="If both a reference and an expression is found, the reference SHALL point to the same expression." />
275       <min value="0" />
276       <max value="1" />
277       <base>
278         <path value="Expression.reference" />
279         <min value="0" />
280         <max value="1" />
281       </base>
282       <type>
283         <code value="uri" />
284       </type>
285       <condition value="exp-1" />
286       <constraint>
287         <key value="ele-1" />
288         <severity value="error" />
289         <human value="All FHIR elements must have a @value or children" />
290         <expression value="hasValue() or (children().count() > id.count())" />
291         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
292       </constraint>
293       <isModifier value="false" />
294       <isSummary value="true" />
295     </element>
296   </snapshot>
297   <differential>
298     <element id="Expression">
299       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
300         <valueCode value="trial-use" />
301       </extension>
302       <path value="Expression" />
303       <short value="An expression that can be used to generate a value" />
304       <definition value="A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used." />
305       <min value="0" />
306       <max value="*" />
307       <constraint>
308         <key value="exp-2" />
309         <severity value="error" />
310         <human value="The name must be a valid variable name in most computer languages" />
311         <expression value="name.hasValue() implies name.matches('[A-Za-z][A-Za-z0-9\\_]{0,63}')" />
312         <source value="http://hl7.org/fhir/StructureDefinition/Expression" />
313       </constraint>
314       <constraint>
315         <key value="exp-1" />
316         <severity value="error" />
317         <human value="An expression or a reference must be provided" />
318         <expression value="expression.exists() or reference.exists()" />
319         <source value="http://hl7.org/fhir/StructureDefinition/Expression" />
320       </constraint>
321     </element>
322     <element id="Expression.description">
323       <path value="Expression.description" />
324       <short value="Natural language description of the condition" />
325       <definition value="A brief, natural language description of the condition that effectively communicates the intended semantics." />
326       <min value="0" />
327       <max value="1" />
328       <type>
329         <code value="string" />
330       </type>
331       <isSummary value="true" />
332     </element>
333     <element id="Expression.name">
334       <extension url="http://hl7.org/fhir/tools/StructureDefinition/no-binding">
335         <valueBoolean value="true" />
336       </extension>
337       <path value="Expression.name" />
338       <short value="Short name assigned to expression for reuse" />
339       <definition value="A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined." />
340       <min value="0" />
341       <max value="1" />
342       <type>
343         <code value="code" />
344       </type>
345       <condition value="exp-2" />
346       <isSummary value="true" />
347     </element>
348     <element id="Expression.language">
349       <path value="Expression.language" />
350       <short value="text/cql | text/fhirpath | application/x-fhir-query | etc." />
351       <definition value="The media type of the language for the expression." />
352       <requirements value="The cardinality of this element is optional to allow text only as part of the authoring process.  However, in order to be executable, the expression element must be specified." />
353       <min value="0" />
354       <max value="1" />
355       <type>
356         <code value="code" />
357       </type>
358       <isSummary value="true" />
359       <binding>
360         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
361           <valueString value="The media type of the expression language." />
362         </extension>
363         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
364           <valueString value="ExpressionLanguage" />
365         </extension>
366         <strength value="extensible" />
367         <description value="The media type of the expression language." />
368         <valueSet value="http://hl7.org/fhir/ValueSet/expression-language" />
369       </binding>
370     </element>
371     <element id="Expression.expression">
372       <path value="Expression.expression" />
373       <short value="Expression in specified language" />
374       <definition value="An expression in the specified language that returns a value." />
375       <comment value="If Expression.expression and Expression.reference are both present, the Expression.expression might just be a name pointing something within the referenced content." />
376       <min value="0" />
377       <max value="1" />
378       <type>
379         <code value="string" />
380       </type>
381       <condition value="exp-1" />
382       <isSummary value="true" />
383     </element>
384     <element id="Expression.reference">
385       <path value="Expression.reference" />
386       <short value="Where the expression is found" />
387       <definition value="A URI that defines where the expression is found." />
388       <comment value="If both a reference and an expression is found, the reference SHALL point to the same expression." />
389       <min value="0" />
390       <max value="1" />
391       <type>
392         <code value="uri" />
393       </type>
394       <condition value="exp-1" />
395       <isSummary value="true" />
396     </element>
397   </differential>
398 </StructureDefinition>