Narrative.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="Narrative" />
  4   <meta>
  5     <lastUpdated value="2019-10-31T23:29:23.356+01:00" />
  6   </meta>
  7   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
  8     <valueCode value="normative" />
  9   </extension>
 10   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 11     <valueCode value="4.0.0" />
 12   </extension>
 13   <url value="http://hl7.org/fhir/StructureDefinition/Narrative" />
 14   <version value="4.0.1" />
 15   <name value="Narrative" />
 16   <status value="active" />
 17   <date value="2019-10-31T23:29:23.0000000+01:00" />
 18   <publisher value="HL7 FHIR Standard" />
 19   <contact>
 20     <telecom>
 21       <system value="url" />
 22       <value value="http://hl7.org/fhir" />
 23     </telecom>
 24   </contact>
 25   <description value="Base StructureDefinition for Narrative Type: A human-readable summary of the resource conveying the essential clinical and business information for the resource." />
 26   <fhirVersion value="4.0.1" />
 27   <mapping>
 28     <identity value="rim" />
 29     <uri value="http://hl7.org/v3" />
 30     <name value="RIM Mapping" />
 31   </mapping>
 32   <kind value="complex-type" />
 33   <abstract value="false" />
 34   <type value="Narrative" />
 35   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
 36   <derivation value="specialization" />
 37   <snapshot>
 38     <element id="Narrative">
 39       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 40         <valueCode value="normative" />
 41       </extension>
 42       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 43         <valueCode value="4.0.0" />
 44       </extension>
 45       <path value="Narrative" />
 46       <short value="Human-readable summary of the resource (essential clinical and business information)" />
 47       <definition value="A human-readable summary of the resource conveying the essential clinical and business information for the resource." />
 48       <min value="0" />
 49       <max value="*" />
 50       <base>
 51         <path value="Narrative" />
 52         <min value="0" />
 53         <max value="*" />
 54       </base>
 55       <condition value="ele-1" />
 56       <constraint>
 57         <key value="ele-1" />
 58         <severity value="error" />
 59         <human value="All FHIR elements must have a @value or children" />
 60         <expression value="hasValue() or (children().count() > id.count())" />
 61         <xpath value="@value|f:*|h:div" />
 62         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 63       </constraint>
 64       <isModifier value="false" />
 65       <mapping>
 66         <identity value="rim" />
 67         <map value="n/a" />
 68       </mapping>
 69       <mapping>
 70         <identity value="rim" />
 71         <map value="N/A" />
 72       </mapping>
 73     </element>
 74     <element id="Narrative.id">
 75       <path value="Narrative.id" />
 76       <representation value="xmlAttr" />
 77       <short value="Unique id for inter-element referencing" />
 78       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
 79       <min value="0" />
 80       <max value="1" />
 81       <base>
 82         <path value="Element.id" />
 83         <min value="0" />
 84         <max value="1" />
 85       </base>
 86       <type>
 87         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
 88           <valueUrl value="string" />
 89         </extension>
 90         <code value="http://hl7.org/fhirpath/System.String" />
 91       </type>
 92       <isModifier value="false" />
 93       <isSummary value="false" />
 94       <mapping>
 95         <identity value="rim" />
 96         <map value="n/a" />
 97       </mapping>
 98     </element>
 99     <element id="Narrative.extension">
100       <path value="Narrative.extension" />
101       <slicing>
102         <discriminator>
103           <type value="value" />
104           <path value="url" />
105         </discriminator>
106         <description value="Extensions are always sliced by (at least) url" />
107         <rules value="open" />
108       </slicing>
109       <short value="Additional content defined by implementations" />
110       <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
111       <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
112       <alias value="extensions" />
113       <alias value="user content" />
114       <min value="0" />
115       <max value="*" />
116       <base>
117         <path value="Element.extension" />
118         <min value="0" />
119         <max value="*" />
120       </base>
121       <type>
122         <code value="Extension" />
123       </type>
124       <constraint>
125         <key value="ele-1" />
126         <severity value="error" />
127         <human value="All FHIR elements must have a @value or children" />
128         <expression value="hasValue() or (children().count() > id.count())" />
129         <xpath value="@value|f:*|h:div" />
130         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
131       </constraint>
132       <constraint>
133         <key value="ext-1" />
134         <severity value="error" />
135         <human value="Must have either extensions or value[x], not both" />
136         <expression value="extension.exists() != value.exists()" />
137         <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" />
138         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
139       </constraint>
140       <isModifier value="false" />
141       <isSummary value="false" />
142       <mapping>
143         <identity value="rim" />
144         <map value="n/a" />
145       </mapping>
146     </element>
147     <element id="Narrative.status">
148       <path value="Narrative.status" />
149       <short value="generated | extensions | additional | empty" />
150       <definition value="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." />
151       <min value="1" />
152       <max value="1" />
153       <base>
154         <path value="Narrative.status" />
155         <min value="1" />
156         <max value="1" />
157       </base>
158       <type>
159         <code value="code" />
160       </type>
161       <constraint>
162         <key value="ele-1" />
163         <severity value="error" />
164         <human value="All FHIR elements must have a @value or children" />
165         <expression value="hasValue() or (children().count() > id.count())" />
166         <xpath value="@value|f:*|h:div" />
167         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
168       </constraint>
169       <isModifier value="false" />
170       <isSummary value="false" />
171       <binding>
172         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
173           <valueString value="NarrativeStatus" />
174         </extension>
175         <strength value="required" />
176         <description value="The status of a resource narrative." />
177         <valueSet value="http://hl7.org/fhir/ValueSet/narrative-status|4.0.1" />
178       </binding>
179       <mapping>
180         <identity value="rim" />
181         <map value="N/A" />
182       </mapping>
183     </element>
184     <element id="Narrative.div">
185       <path value="Narrative.div" />
186       <short value="Limited xhtml content" />
187       <definition value="The actual narrative content, a stripped down version of XHTML." />
188       <comment value="The contents of the html element are an XHTML fragment containing only the basic html formatting elements described in chapters 7-11 and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained stylesheets. The XHTML content SHALL NOT contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects." />
189       <min value="1" />
190       <max value="1" />
191       <base>
192         <path value="Narrative.div" />
193         <min value="1" />
194         <max value="1" />
195       </base>
196       <type>
197         <code value="xhtml" />
198       </type>
199       <constraint>
200         <key value="ele-1" />
201         <severity value="error" />
202         <human value="All FHIR elements must have a @value or children" />
203         <expression value="hasValue() or (children().count() > id.count())" />
204         <xpath value="@value|f:*|h:div" />
205         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
206       </constraint>
207       <constraint>
208         <key value="txt-1" />
209         <severity value="error" />
210         <human value="The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes" />
211         <expression value="htmlChecks()" />
212         <xpath value="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])" />
213       </constraint>
214       <constraint>
215         <key value="txt-2" />
216         <severity value="error" />
217         <human value="The narrative SHALL have some non-whitespace content" />
218         <expression value="htmlChecks()" />
219         <xpath value="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]" />
220       </constraint>
221       <isModifier value="false" />
222       <isSummary value="false" />
223       <mapping>
224         <identity value="rim" />
225         <map value="N/A" />
226       </mapping>
227     </element>
228   </snapshot>
229   <differential>
230     <element id="Narrative">
231       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
232         <valueCode value="normative" />
233       </extension>
234       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
235         <valueCode value="4.0.0" />
236       </extension>
237       <path value="Narrative" />
238       <short value="Human-readable summary of the resource (essential clinical and business information)" />
239       <definition value="A human-readable summary of the resource conveying the essential clinical and business information for the resource." />
240       <min value="0" />
241       <max value="*" />
242       <mapping>
243         <identity value="rim" />
244         <map value="N/A" />
245       </mapping>
246     </element>
247     <element id="Narrative.status">
248       <path value="Narrative.status" />
249       <short value="generated | extensions | additional | empty" />
250       <definition value="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." />
251       <min value="1" />
252       <max value="1" />
253       <type>
254         <code value="code" />
255       </type>
256       <binding>
257         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
258           <valueString value="NarrativeStatus" />
259         </extension>
260         <strength value="required" />
261         <description value="The status of a resource narrative." />
262         <valueSet value="http://hl7.org/fhir/ValueSet/narrative-status|4.0.1" />
263       </binding>
264       <mapping>
265         <identity value="rim" />
266         <map value="N/A" />
267       </mapping>
268     </element>
269     <element id="Narrative.div">
270       <path value="Narrative.div" />
271       <short value="Limited xhtml content" />
272       <definition value="The actual narrative content, a stripped down version of XHTML." />
273       <comment value="The contents of the html element are an XHTML fragment containing only the basic html formatting elements described in chapters 7-11 and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained stylesheets. The XHTML content SHALL NOT contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects." />
274       <min value="1" />
275       <max value="1" />
276       <type>
277         <code value="xhtml" />
278       </type>
279       <constraint>
280         <key value="txt-1" />
281         <severity value="error" />
282         <human value="The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes" />
283         <expression value="htmlChecks()" />
284         <xpath value="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])" />
285       </constraint>
286       <constraint>
287         <key value="txt-2" />
288         <severity value="error" />
289         <human value="The narrative SHALL have some non-whitespace content" />
290         <expression value="htmlChecks()" />
291         <xpath value="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]" />
292       </constraint>
293       <mapping>
294         <identity value="rim" />
295         <map value="N/A" />
296       </mapping>
297     </element>
298   </differential>
299 </StructureDefinition>