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