variable.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <StructureDefinition xmlns="http://hl7.org/fhir"> 3 <id value="variable" /> 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/variable" /> 11 <version value="4.0.1" /> 12 <name value="Variable" /> 13 <status value="draft" /> 14 <date value="2013-12-05" /> 15 <publisher value="Health Level Seven International (FHIR Infrastructure)" /> 16 <contact> 17 <telecom> 18 <system value="url" /> 19 <value value="http://www.hl7.org/Special/committees/fiwg" /> 20 </telecom> 21 </contact> 22 <description value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension." /> 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" /> 34 </context> 35 <context> 36 <type value="element" /> 37 <expression value="Questionnaire.item" /> 38 </context> 39 <context> 40 <type value="element" /> 41 <expression value="Questionnaire.item.item" /> 42 </context> 43 <type value="Extension" /> 44 <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" /> 45 <derivation value="constraint" /> 46 <snapshot> 47 <element id="Extension"> 48 <path value="Extension" /> 49 <short value="Variable for processing" /> 50 <definition value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension." /> 51 <comment value="Ordering of variable extension declarations is significant as variables declared in one repetition of this extension might be used in subsequent extension repetitions." /> 52 <min value="0" /> 53 <max value="*" /> 54 <base> 55 <path value="Extension" /> 56 <min value="0" /> 57 <max value="*" /> 58 </base> 59 <condition value="ele-1" /> 60 <constraint> 61 <key value="ele-1" /> 62 <severity value="error" /> 63 <human value="All FHIR elements must have a @value or children" /> 64 <expression value="hasValue() or (children().count() > id.count())" /> 65 <xpath value="@value|f:*|h:div" /> 66 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 67 </constraint> 68 <constraint> 69 <key value="ext-1" /> 70 <severity value="error" /> 71 <human value="Must have either extensions or value[x], not both" /> 72 <expression value="extension.exists() != value.exists()" /> 73 <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> 74 <source value="http://hl7.org/fhir/StructureDefinition/Extension" /> 75 </constraint> 76 <isModifier value="false" /> 77 </element> 78 <element id="Extension.id"> 79 <path value="Extension.id" /> 80 <representation value="xmlAttr" /> 81 <short value="Unique id for inter-element referencing" /> 82 <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> 83 <min value="0" /> 84 <max value="1" /> 85 <base> 86 <path value="Element.id" /> 87 <min value="0" /> 88 <max value="1" /> 89 </base> 90 <type> 91 <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> 92 <valueUrl value="string" /> 93 </extension> 94 <code value="http://hl7.org/fhirpath/System.String" /> 95 </type> 96 <isModifier value="false" /> 97 <isSummary value="false" /> 98 <mapping> 99 <identity value="rim" /> 100 <map value="n/a" /> 101 </mapping> 102 </element> 103 <element id="Extension.extension"> 104 <path value="Extension.extension" /> 105 <slicing> 106 <discriminator> 107 <type value="value" /> 108 <path value="url" /> 109 </discriminator> 110 <description value="Extensions are always sliced by (at least) url" /> 111 <rules value="open" /> 112 </slicing> 113 <short value="Extension" /> 114 <definition value="An Extension" /> 115 <min value="0" /> 116 <max value="0" /> 117 <base> 118 <path value="Element.extension" /> 119 <min value="0" /> 120 <max value="*" /> 121 </base> 122 <type> 123 <code value="Extension" /> 124 </type> 125 <constraint> 126 <key value="ele-1" /> 127 <severity value="error" /> 128 <human value="All FHIR elements must have a @value or children" /> 129 <expression value="hasValue() or (children().count() > id.count())" /> 130 <xpath value="@value|f:*|h:div" /> 131 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 132 </constraint> 133 <constraint> 134 <key value="ext-1" /> 135 <severity value="error" /> 136 <human value="Must have either extensions or value[x], not both" /> 137 <expression value="extension.exists() != value.exists()" /> 138 <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" /> 139 <source value="http://hl7.org/fhir/StructureDefinition/Extension" /> 140 </constraint> 141 <isModifier value="false" /> 142 <isSummary value="false" /> 143 </element> 144 <element id="Extension.url"> 145 <path value="Extension.url" /> 146 <representation value="xmlAttr" /> 147 <short value="identifies the meaning of the extension" /> 148 <definition value="Source of the definition for the extension code - a logical name or a URL." /> 149 <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." /> 150 <min value="1" /> 151 <max value="1" /> 152 <base> 153 <path value="Extension.url" /> 154 <min value="1" /> 155 <max value="1" /> 156 </base> 157 <type> 158 <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> 159 <valueUrl value="uri" /> 160 </extension> 161 <code value="http://hl7.org/fhirpath/System.String" /> 162 </type> 163 <fixedUri value="http://hl7.org/fhir/StructureDefinition/variable" /> 164 <isModifier value="false" /> 165 <isSummary value="false" /> 166 <mapping> 167 <identity value="rim" /> 168 <map value="N/A" /> 169 </mapping> 170 </element> 171 <element id="Extension.value[x]"> 172 <path value="Extension.value[x]" /> 173 <short value="Value of extension" /> 174 <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)." /> 175 <min value="1" /> 176 <max value="1" /> 177 <base> 178 <path value="Extension.value[x]" /> 179 <min value="0" /> 180 <max value="1" /> 181 </base> 182 <type> 183 <code value="Expression" /> 184 </type> 185 <constraint> 186 <key value="ele-1" /> 187 <severity value="error" /> 188 <human value="All FHIR elements must have a @value or children" /> 189 <expression value="hasValue() or (children().count() > id.count())" /> 190 <xpath value="@value|f:*|h:div" /> 191 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 192 </constraint> 193 <isModifier value="false" /> 194 <isSummary value="false" /> 195 <mapping> 196 <identity value="rim" /> 197 <map value="N/A" /> 198 </mapping> 199 </element> 200 </snapshot> 201 <differential> 202 <element id="Extension"> 203 <path value="Extension" /> 204 <short value="Variable for processing" /> 205 <definition value="Variable specifying a logic to generate a variable for use in subsequent logic. The name of the variable will be added to FHIRPath's context when processing descendants of the element that contains this extension." /> 206 <comment value="Ordering of variable extension declarations is significant as variables declared in one repetition of this extension might be used in subsequent extension repetitions." /> 207 <min value="0" /> 208 <max value="*" /> 209 </element> 210 <element id="Extension.extension"> 211 <path value="Extension.extension" /> 212 <max value="0" /> 213 </element> 214 <element id="Extension.url"> 215 <path value="Extension.url" /> 216 <fixedUri value="http://hl7.org/fhir/StructureDefinition/variable" /> 217 </element> 218 <element id="Extension.value[x]"> 219 <path value="Extension.value[x]" /> 220 <min value="1" /> 221 <type> 222 <code value="Expression" /> 223 </type> 224 </element> 225 </differential> 226 </StructureDefinition>