request-relevantHistory.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="request-relevantHistory" />
  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/request-relevantHistory" />
 11   <version value="4.0.1" />
 12   <name value="relevantHistory" />
 13   <title value="Relevant History" />
 14   <status value="draft" />
 15   <date value="2017-12-06" />
 16   <publisher value="Health Level Seven, Inc. - FHIR WG" />
 17   <contact>
 18     <telecom>
 19       <system value="url" />
 20       <value value="http://hl7.org/special/committees/fwg" />
 21     </telecom>
 22   </contact>
 23   <description value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource." />
 24   <fhirVersion value="4.0.1" />
 25   <mapping>
 26     <identity value="v2" />
 27     <uri value="http://hl7.org/v2" />
 28     <name value="HL7 v2 Mapping" />
 29   </mapping>
 30   <mapping>
 31     <identity value="rim" />
 32     <uri value="http://hl7.org/v3" />
 33     <name value="RIM Mapping" />
 34   </mapping>
 35   <kind value="complex-type" />
 36   <abstract value="false" />
 37   <context>
 38     <type value="element" />
 39     <expression value="NutritionOrder" />
 40   </context>
 41   <context>
 42     <type value="element" />
 43     <expression value="CommunicationRequest" />
 44   </context>
 45   <type value="Extension" />
 46   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
 47   <derivation value="constraint" />
 48   <snapshot>
 49     <element id="Extension">
 50       <path value="Extension" />
 51       <short value="Key events in history of request" />
 52       <definition value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource." />
 53       <comment value="This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed.  The Provenance for the current version can be retrieved with a _revinclude.  Referenced provenances should adhere to the provenance-relevant-history profile." />
 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="v2" />
 81         <map value="N/A" />
 82       </mapping>
 83       <mapping>
 84         <identity value="rim" />
 85         <map value=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]" />
 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://hl7.org/fhir/StructureDefinition/request-relevantHistory" />
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="Value of extension" />
184       <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)." />
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="Reference" />
194         <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance" />
195       </type>
196       <constraint>
197         <key value="ele-1" />
198         <severity value="error" />
199         <human value="All FHIR elements must have a @value or children" />
200         <expression value="hasValue() or (children().count() > id.count())" />
201         <xpath value="@value|f:*|h:div" />
202         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
203       </constraint>
204       <isModifier value="false" />
205       <isSummary value="false" />
206       <mapping>
207         <identity value="rim" />
208         <map value="N/A" />
209       </mapping>
210     </element>
211   </snapshot>
212   <differential>
213     <element id="Extension">
214       <path value="Extension" />
215       <short value="Key events in history of request" />
216       <definition value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource." />
217       <comment value="This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed.  The Provenance for the current version can be retrieved with a _revinclude.  Referenced provenances should adhere to the provenance-relevant-history profile." />
218       <min value="0" />
219       <max value="*" />
220       <mapping>
221         <identity value="v2" />
222         <map value="N/A" />
223       </mapping>
224       <mapping>
225         <identity value="rim" />
226         <map value=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]" />
227       </mapping>
228     </element>
229     <element id="Extension.extension">
230       <path value="Extension.extension" />
231       <max value="0" />
232     </element>
233     <element id="Extension.url">
234       <path value="Extension.url" />
235       <fixedUri value="http://hl7.org/fhir/StructureDefinition/request-relevantHistory" />
236     </element>
237     <element id="Extension.value[x]">
238       <path value="Extension.value[x]" />
239       <min value="1" />
240       <type>
241         <code value="Reference" />
242         <targetProfile value="http://hl7.org/fhir/StructureDefinition/Provenance" />
243       </type>
244     </element>
245   </differential>
246 </StructureDefinition>