StructureDefinition-ch-emed-ext-substitution.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <StructureDefinition xmlns="http://hl7.org/fhir">
3 <id value="ch-emed-ext-substitution" />
4 <url value="http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-substitution" />
5 <version value="6.0.0-ballot-ci-build" />
6 <name value="CHEMEDExtSubstitution" />
7 <title value="Substitution" />
8 <status value="active" />
9 <date value="2025-01-29T14:29:51.0000000+01:00" />
10 <publisher value="HL7 Switzerland" />
11 <contact>
12 <name value="HL7 Switzerland" />
13 <telecom>
14 <system value="url" />
15 <value value="https://www.hl7.ch/" />
16 </telecom>
17 </contact>
18 <contact>
19 <name value="HL7 Switzerland" />
20 <telecom>
21 <system value="url" />
22 <value value="https://www.hl7.ch/" />
23 <use value="work" />
24 </telecom>
25 </contact>
26 <description value="This extension is used to indicate whether the medication can be substituted for this patient, i.e. whether it is allowed.
(For a prescription, MedicationRequest.substitution is used to record whether a substitution is allowed or not.
When dispensing, a performed substitution is recorded in MedicationDispense.substitution.)" />
27 <jurisdiction>
28 <coding>
29 <system value="urn:iso:std:iso:3166" />
30 <code value="CH" />
31 </coding>
32 </jurisdiction>
33 <copyright value="CC0-1.0" />
34 <fhirVersion value="4.0.1" />
35 <mapping>
36 <identity value="rim" />
37 <uri value="http://hl7.org/v3" />
38 <name value="RIM Mapping" />
39 </mapping>
40 <kind value="complex-type" />
41 <abstract value="false" />
42 <context>
43 <type value="element" />
44 <expression value="MedicationStatement" />
45 </context>
46 <type value="Extension" />
47 <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
48 <derivation value="constraint" />
49 <snapshot>
50 <element id="Extension">
51 <path value="Extension" />
52 <short value="Optional Extensions Element" />
53 <definition value="Optional Extension Element - found in all resources." />
54 <min value="0" />
55 <max value="*" />
56 <base>
57 <path value="Extension" />
58 <min value="0" />
59 <max value="*" />
60 </base>
61 <condition value="ele-1" />
62 <constraint>
63 <key value="ele-1" />
64 <severity value="error" />
65 <human value="All FHIR elements must have a @value or children" />
66 <expression value="hasValue() or (children().count() > id.count())" />
67 <xpath value="@value|f:*|h:div" />
68 <source value="http://hl7.org/fhir/StructureDefinition/Element" />
69 </constraint>
70 <constraint>
71 <key value="ext-1" />
72 <severity value="error" />
73 <human value="Must have either extensions or value[x], not both" />
74 <expression value="extension.exists() != value.exists()" />
75 <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
76 <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
77 </constraint>
78 <isModifier value="false" />
79 <mapping>
80 <identity value="rim" />
81 <map value="n/a" />
82 </mapping>
83 <mapping>
84 <identity value="rim" />
85 <map value="N/A" />
86 </mapping>
87 </element>
88 <element id="Extension.id">
89 <path value="Extension.id" />
90 <representation value="xmlAttr" />
91 <short value="Unique id for inter-element referencing" />
92 <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
93 <min value="0" />
94 <max value="1" />
95 <base>
96 <path value="Element.id" />
97 <min value="0" />
98 <max value="1" />
99 </base>
100 <type>
101 <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
102 <valueUrl value="string" />
103 </extension>
104 <code value="http://hl7.org/fhirpath/System.String" />
105 </type>
106 <isModifier value="false" />
107 <isSummary value="false" />
108 <mapping>
109 <identity value="rim" />
110 <map value="n/a" />
111 </mapping>
112 </element>
113 <element id="Extension.extension">
114 <path value="Extension.extension" />
115 <slicing>
116 <discriminator>
117 <type value="value" />
118 <path value="url" />
119 </discriminator>
120 <description value="Extensions are always sliced by (at least) url" />
121 <rules value="open" />
122 </slicing>
123 <short value="Extension" />
124 <definition value="An Extension" />
125 <min value="0" />
126 <max value="0" />
127 <base>
128 <path value="Element.extension" />
129 <min value="0" />
130 <max value="*" />
131 </base>
132 <type>
133 <code value="Extension" />
134 </type>
135 <constraint>
136 <key value="ele-1" />
137 <severity value="error" />
138 <human value="All FHIR elements must have a @value or children" />
139 <expression value="hasValue() or (children().count() > id.count())" />
140 <xpath value="@value|f:*|h:div" />
141 <source value="http://hl7.org/fhir/StructureDefinition/Element" />
142 </constraint>
143 <constraint>
144 <key value="ext-1" />
145 <severity value="error" />
146 <human value="Must have either extensions or value[x], not both" />
147 <expression value="extension.exists() != value.exists()" />
148 <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" />
149 <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
150 </constraint>
151 <isModifier value="false" />
152 <isSummary value="false" />
153 </element>
154 <element id="Extension.url">
155 <path value="Extension.url" />
156 <representation value="xmlAttr" />
157 <short value="identifies the meaning of the extension" />
158 <definition value="Source of the definition for the extension code - a logical name or a URL." />
159 <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." />
160 <min value="1" />
161 <max value="1" />
162 <base>
163 <path value="Extension.url" />
164 <min value="1" />
165 <max value="1" />
166 </base>
167 <type>
168 <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
169 <valueUrl value="uri" />
170 </extension>
171 <code value="http://hl7.org/fhirpath/System.String" />
172 </type>
173 <fixedUri value="http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-substitution" />
174 <isModifier value="false" />
175 <isSummary value="false" />
176 <mapping>
177 <identity value="rim" />
178 <map value="N/A" />
179 </mapping>
180 </element>
181 <element id="Extension.value[x]">
182 <path value="Extension.value[x]" />
183 <short value="Whether substitution is allowed or not" />
184 <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)." />
185 <min value="1" />
186 <max value="1" />
187 <base>
188 <path value="Extension.value[x]" />
189 <min value="0" />
190 <max value="1" />
191 </base>
192 <type>
193 <code value="CodeableConcept" />
194 </type>
195 <constraint>
196 <key value="ele-1" />
197 <severity value="error" />
198 <human value="All FHIR elements must have a @value or children" />
199 <expression value="hasValue() or (children().count() > id.count())" />
200 <xpath value="@value|f:*|h:div" />
201 <source value="http://hl7.org/fhir/StructureDefinition/Element" />
202 </constraint>
203 <isModifier value="false" />
204 <isSummary value="false" />
205 <binding>
206 <strength value="preferred" />
207 <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode" />
208 </binding>
209 <mapping>
210 <identity value="rim" />
211 <map value="N/A" />
212 </mapping>
213 </element>
214 </snapshot>
215 <differential>
216 <element id="Extension.extension">
217 <path value="Extension.extension" />
218 <max value="0" />
219 </element>
220 <element id="Extension.url">
221 <path value="Extension.url" />
222 <fixedUri value="http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-substitution" />
223 </element>
224 <element id="Extension.value[x]">
225 <path value="Extension.value[x]" />
226 <short value="Whether substitution is allowed or not" />
227 <min value="1" />
228 <type>
229 <code value="CodeableConcept" />
230 </type>
231 <binding>
232 <strength value="preferred" />
233 <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode" />
234 </binding>
235 </element>
236 </differential>
237 </StructureDefinition>