questionnaire-referenceResource.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="questionnaire-referenceResource" />
  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="1" />
  9   </extension>
 10   <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource" />
 11   <version value="4.0.1" />
 12   <name value="referenceResource" />
 13   <status value="draft" />
 14   <date value="2013-07-04" />
 15   <publisher value="HL7" />
 16   <contact>
 17     <telecom>
 18       <system value="url" />
 19       <value value="http://www.hl7.org" />
 20     </telecom>
 21   </contact>
 22   <description value="Where the type for a question is "Reference", indicates a type of resource that is permitted." />
 23   <fhirVersion value="4.0.1" />
 24   <mapping>
 25     <identity value="rim" />
 26     <uri value="http://hl7.org/v3" />
 27     <name value="RIM Mapping" />
 28   </mapping>
 29   <kind value="complex-type" />
 30   <abstract value="false" />
 31   <context>
 32     <type value="element" />
 33     <expression value="Questionnaire.item" />
 34   </context>
 35   <context>
 36     <type value="element" />
 37     <expression value="Questionnaire.item.item" />
 38   </context>
 39   <contextInvariant value="type='reference'" />
 40   <type value="Extension" />
 41   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
 42   <derivation value="constraint" />
 43   <snapshot>
 44     <element id="Extension">
 45       <path value="Extension" />
 46       <short value="Allowed resource for reference" />
 47       <definition value="Where the type for a question is "Reference", indicates a type of resource that is permitted." />
 48       <comment value="This extension only has meaning if the question.type = Reference.  If no allowedResource extensions are present, the presumption is that any type of resource is permitted.  If multiple are present, then any of the specified types are permitted." />
 49       <min value="0" />
 50       <max value="*" />
 51       <base>
 52         <path value="Extension" />
 53         <min value="0" />
 54         <max value="*" />
 55       </base>
 56       <condition value="ele-1" />
 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         <xpath value="@value|f:*|h:div" />
 63         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 64       </constraint>
 65       <constraint>
 66         <key value="ext-1" />
 67         <severity value="error" />
 68         <human value="Must have either extensions or value[x], not both" />
 69         <expression value="extension.exists() != value.exists()" />
 70         <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
 71         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
 72       </constraint>
 73       <isModifier value="false" />
 74       <mapping>
 75         <identity value="rim" />
 76         <map value="N/A - MIF rather than RIM level" />
 77       </mapping>
 78     </element>
 79     <element id="Extension.id">
 80       <path value="Extension.id" />
 81       <representation value="xmlAttr" />
 82       <short value="Unique id for inter-element referencing" />
 83       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
 84       <min value="0" />
 85       <max value="1" />
 86       <base>
 87         <path value="Element.id" />
 88         <min value="0" />
 89         <max value="1" />
 90       </base>
 91       <type>
 92         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
 93           <valueUrl value="string" />
 94         </extension>
 95         <code value="http://hl7.org/fhirpath/System.String" />
 96       </type>
 97       <isModifier value="false" />
 98       <isSummary value="false" />
 99       <mapping>
100         <identity value="rim" />
101         <map value="n/a" />
102       </mapping>
103     </element>
104     <element id="Extension.extension">
105       <path value="Extension.extension" />
106       <slicing>
107         <discriminator>
108           <type value="value" />
109           <path value="url" />
110         </discriminator>
111         <description value="Extensions are always sliced by (at least) url" />
112         <rules value="open" />
113       </slicing>
114       <short value="Extension" />
115       <definition value="An Extension" />
116       <min value="0" />
117       <max value="0" />
118       <base>
119         <path value="Element.extension" />
120         <min value="0" />
121         <max value="*" />
122       </base>
123       <type>
124         <code value="Extension" />
125       </type>
126       <constraint>
127         <key value="ele-1" />
128         <severity value="error" />
129         <human value="All FHIR elements must have a @value or children" />
130         <expression value="hasValue() or (children().count() > id.count())" />
131         <xpath value="@value|f:*|h:div" />
132         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
133       </constraint>
134       <constraint>
135         <key value="ext-1" />
136         <severity value="error" />
137         <human value="Must have either extensions or value[x], not both" />
138         <expression value="extension.exists() != value.exists()" />
139         <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" />
140         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
141       </constraint>
142       <isModifier value="false" />
143       <isSummary value="false" />
144     </element>
145     <element id="Extension.url">
146       <path value="Extension.url" />
147       <representation value="xmlAttr" />
148       <short value="identifies the meaning of the extension" />
149       <definition value="Source of the definition for the extension code - a logical name or a URL." />
150       <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." />
151       <min value="1" />
152       <max value="1" />
153       <base>
154         <path value="Extension.url" />
155         <min value="1" />
156         <max value="1" />
157       </base>
158       <type>
159         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
160           <valueUrl value="uri" />
161         </extension>
162         <code value="http://hl7.org/fhirpath/System.String" />
163       </type>
164       <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource" />
165       <isModifier value="false" />
166       <isSummary value="false" />
167       <mapping>
168         <identity value="rim" />
169         <map value="N/A" />
170       </mapping>
171     </element>
172     <element id="Extension.value[x]">
173       <path value="Extension.value[x]" />
174       <short value="Value of extension" />
175       <definition value="Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/extensibility.html) for a list)." />
176       <min value="1" />
177       <max value="1" />
178       <base>
179         <path value="Extension.value[x]" />
180         <min value="0" />
181         <max value="1" />
182       </base>
183       <type>
184         <code value="code" />
185       </type>
186       <constraint>
187         <key value="ele-1" />
188         <severity value="error" />
189         <human value="All FHIR elements must have a @value or children" />
190         <expression value="hasValue() or (children().count() > id.count())" />
191         <xpath value="@value|f:*|h:div" />
192         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
193       </constraint>
194       <isModifier value="false" />
195       <isSummary value="false" />
196       <binding>
197         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
198           <valueString value="ResourceType" />
199         </extension>
200         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
201           <valueBoolean value="true" />
202         </extension>
203         <strength value="required" />
204         <description value="One of the resource types defined as part of this version of FHIR." />
205         <valueSet value="http://hl7.org/fhir/ValueSet/resource-types|4.0.1" />
206       </binding>
207       <mapping>
208         <identity value="rim" />
209         <map value="N/A" />
210       </mapping>
211     </element>
212   </snapshot>
213   <differential>
214     <element id="Extension">
215       <path value="Extension" />
216       <short value="Allowed resource for reference" />
217       <definition value="Where the type for a question is "Reference", indicates a type of resource that is permitted." />
218       <comment value="This extension only has meaning if the question.type = Reference.  If no allowedResource extensions are present, the presumption is that any type of resource is permitted.  If multiple are present, then any of the specified types are permitted." />
219       <min value="0" />
220       <max value="*" />
221       <mapping>
222         <identity value="rim" />
223         <map value="N/A - MIF rather than RIM level" />
224       </mapping>
225     </element>
226     <element id="Extension.extension">
227       <path value="Extension.extension" />
228       <max value="0" />
229     </element>
230     <element id="Extension.url">
231       <path value="Extension.url" />
232       <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource" />
233     </element>
234     <element id="Extension.value[x]">
235       <path value="Extension.value[x]" />
236       <min value="1" />
237       <type>
238         <code value="code" />
239       </type>
240       <binding>
241         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
242           <valueString value="ResourceType" />
243         </extension>
244         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
245           <valueBoolean value="true" />
246         </extension>
247         <strength value="required" />
248         <description value="One of the resource types defined as part of this version of FHIR." />
249         <valueSet value="http://hl7.org/fhir/ValueSet/resource-types|4.0.1" />
250       </binding>
251     </element>
252   </differential>
253 </StructureDefinition>