StructureDefinition-sdc-questionnaire-calculatedExpression.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="sdc-questionnaire-calculatedExpression" />
  4   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
  5     <valueCode value="fhir" />
  6   </extension>
  7   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
  8     <valueInteger value="4">
  9       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
 10         <valueCanonical value="http://hl7.org/fhir/uv/sdc/ImplementationGuide/hl7.fhir.uv.sdc" />
 11       </extension>
 12     </valueInteger>
 13   </extension>
 14   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 15     <valueCode value="trial-use">
 16       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
 17         <valueCanonical value="http://hl7.org/fhir/uv/sdc/ImplementationGuide/hl7.fhir.uv.sdc" />
 18       </extension>
 19     </valueCode>
 20   </extension>
 21   <url value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression" />
 22   <identifier>
 23     <system value="urn:ietf:rfc:3986" />
 24     <value value="urn:oid:2.16.840.1.113883.4.642.40.17.42.17" />
 25   </identifier>
 26   <version value="4.0.0-ballot" />
 27   <name value="CalculatedExpressionExtension" />
 28   <title value="Calculated Expression" />
 29   <status value="active" />
 30   <date value="2024-12-22T04:48:38.0000000+01:00" />
 31   <publisher value="HL7 International / FHIR Infrastructure" />
 32   <contact>
 33     <name value="HL7 International / FHIR Infrastructure" />
 34     <telecom>
 35       <system value="url" />
 36       <value value="http://www.hl7.org/Special/committees/fiwg" />
 37     </telecom>
 38   </contact>
 39   <contact>
 40     <telecom>
 41       <system value="url" />
 42       <value value="http://www.hl7.org/Special/committees/fiwg" />
 43     </telecom>
 44   </contact>
 45   <description value="Calculated value for a question answer as determined by an evaluated expression." />
 46   <jurisdiction>
 47     <coding>
 48       <system value="http://unstats.un.org/unsd/methods/m49/m49.htm" />
 49       <code value="001" />
 50       <display value="World" />
 51     </coding>
 52   </jurisdiction>
 53   <fhirVersion value="4.0.1" />
 54   <mapping>
 55     <identity value="rim" />
 56     <uri value="http://hl7.org/v3" />
 57     <name value="RIM Mapping" />
 58   </mapping>
 59   <kind value="complex-type" />
 60   <abstract value="false" />
 61   <context>
 62     <type value="element" />
 63     <expression value="Questionnaire.item" />
 64   </context>
 65   <context>
 66     <type value="element" />
 67     <expression value="ElementDefinition" />
 68   </context>
 69   <contextInvariant value="initial.exists().not()" />
 70   <type value="Extension" />
 71   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
 72   <derivation value="constraint" />
 73   <snapshot>
 74     <element id="Extension">
 75       <path value="Extension" />
 76       <short value="Expression-determined initial value" />
 77       <definition value="Calculated value for a question answer as determined by an evaluated expression." />
 78       <comment value="Calculated value is updated  as other answers in the QuestionnaireResponse are filled in." />
 79       <min value="0" />
 80       <max value="1" />
 81       <base>
 82         <path value="Extension" />
 83         <min value="0" />
 84         <max value="*" />
 85       </base>
 86       <condition value="ele-1" />
 87       <constraint>
 88         <key value="ele-1" />
 89         <severity value="error" />
 90         <human value="All FHIR elements must have a @value or children" />
 91         <expression value="hasValue() or (children().count() > id.count())" />
 92         <xpath value="@value|f:*|h:div" />
 93         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 94       </constraint>
 95       <constraint>
 96         <key value="ext-1" />
 97         <severity value="error" />
 98         <human value="Must have either extensions or value[x], not both" />
 99         <expression value="extension.exists() != value.exists()" />
100         <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
101         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
102       </constraint>
103       <isModifier value="false" />
104     </element>
105     <element id="Extension.id">
106       <path value="Extension.id" />
107       <representation value="xmlAttr" />
108       <short value="Unique id for inter-element referencing" />
109       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
110       <min value="0" />
111       <max value="1" />
112       <base>
113         <path value="Element.id" />
114         <min value="0" />
115         <max value="1" />
116       </base>
117       <type>
118         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
119           <valueUrl value="string" />
120         </extension>
121         <code value="http://hl7.org/fhirpath/System.String" />
122       </type>
123       <isModifier value="false" />
124       <isSummary value="false" />
125       <mapping>
126         <identity value="rim" />
127         <map value="n/a" />
128       </mapping>
129     </element>
130     <element id="Extension.extension">
131       <path value="Extension.extension" />
132       <slicing>
133         <discriminator>
134           <type value="value" />
135           <path value="url" />
136         </discriminator>
137         <description value="Extensions are always sliced by (at least) url" />
138         <rules value="open" />
139       </slicing>
140       <short value="Extension" />
141       <definition value="An Extension" />
142       <min value="0" />
143       <max value="0" />
144       <base>
145         <path value="Element.extension" />
146         <min value="0" />
147         <max value="*" />
148       </base>
149       <type>
150         <code value="Extension" />
151       </type>
152       <constraint>
153         <key value="ele-1" />
154         <severity value="error" />
155         <human value="All FHIR elements must have a @value or children" />
156         <expression value="hasValue() or (children().count() > id.count())" />
157         <xpath value="@value|f:*|h:div" />
158         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
159       </constraint>
160       <constraint>
161         <key value="ext-1" />
162         <severity value="error" />
163         <human value="Must have either extensions or value[x], not both" />
164         <expression value="extension.exists() != value.exists()" />
165         <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" />
166         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
167       </constraint>
168       <isModifier value="false" />
169       <isSummary value="false" />
170     </element>
171     <element id="Extension.url">
172       <path value="Extension.url" />
173       <representation value="xmlAttr" />
174       <short value="identifies the meaning of the extension" />
175       <definition value="Source of the definition for the extension code - a logical name or a URL." />
176       <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension." />
177       <min value="1" />
178       <max value="1" />
179       <base>
180         <path value="Extension.url" />
181         <min value="1" />
182         <max value="1" />
183       </base>
184       <type>
185         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
186           <valueUrl value="uri" />
187         </extension>
188         <code value="http://hl7.org/fhirpath/System.String" />
189       </type>
190       <fixedUri value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression" />
191       <isModifier value="false" />
192       <isSummary value="false" />
193       <mapping>
194         <identity value="rim" />
195         <map value="N/A" />
196       </mapping>
197     </element>
198     <element id="Extension.value[x]">
199       <path value="Extension.value[x]" />
200       <short value="Value of extension" />
201       <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list)." />
202       <min value="1" />
203       <max value="1" />
204       <base>
205         <path value="Extension.value[x]" />
206         <min value="0" />
207         <max value="1" />
208       </base>
209       <type>
210         <code value="Expression" />
211       </type>
212       <constraint>
213         <key value="ele-1" />
214         <severity value="error" />
215         <human value="All FHIR elements must have a @value or children" />
216         <expression value="hasValue() or (children().count() > id.count())" />
217         <xpath value="@value|f:*|h:div" />
218         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
219       </constraint>
220       <isModifier value="false" />
221       <isSummary value="false" />
222       <mapping>
223         <identity value="rim" />
224         <map value="N/A" />
225       </mapping>
226     </element>
227   </snapshot>
228   <differential>
229     <element id="Extension">
230       <path value="Extension" />
231       <short value="Expression-determined initial value" />
232       <definition value="Calculated value for a question answer as determined by an evaluated expression." />
233       <comment value="Calculated value is updated  as other answers in the QuestionnaireResponse are filled in." />
234       <max value="1" />
235     </element>
236     <element id="Extension.extension">
237       <path value="Extension.extension" />
238       <max value="0" />
239     </element>
240     <element id="Extension.url">
241       <path value="Extension.url" />
242       <fixedUri value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression" />
243     </element>
244     <element id="Extension.value[x]">
245       <path value="Extension.value[x]" />
246       <min value="1" />
247       <type>
248         <code value="Expression" />
249       </type>
250     </element>
251   </differential>
252 </StructureDefinition>