questionnaire-maxOccurs.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="questionnaire-maxOccurs" />
  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-maxOccurs" />
 11   <version value="4.0.1" />
 12   <name value="maxOccurs" />
 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="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited." />
 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!='display' and (repeats=true or %extension.valueInteger=1)" />
 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="Maximum repetitions" />
 47       <definition value="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited." />
 48       <comment value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions." />
 49       <min value="0" />
 50       <max value="1" />
 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-maxOccurs" />
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="integer" />
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       <mapping>
197         <identity value="rim" />
198         <map value="N/A" />
199       </mapping>
200     </element>
201   </snapshot>
202   <differential>
203     <element id="Extension">
204       <path value="Extension" />
205       <short value="Maximum repetitions" />
206       <definition value="The maximum number of times the group must appear, or the maximum number of answers for a question - when greater than 1 and not unlimited." />
207       <comment value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions." />
208       <min value="0" />
209       <max value="1" />
210       <mapping>
211         <identity value="rim" />
212         <map value="N/A - MIF rather than RIM level" />
213       </mapping>
214     </element>
215     <element id="Extension.extension">
216       <path value="Extension.extension" />
217       <max value="0" />
218     </element>
219     <element id="Extension.url">
220       <path value="Extension.url" />
221       <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs" />
222     </element>
223     <element id="Extension.value[x]">
224       <path value="Extension.value[x]" />
225       <min value="1" />
226       <type>
227         <code value="integer" />
228       </type>
229     </element>
230   </differential>
231 </StructureDefinition>