This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2
StructureDefinition for Narrative
<StructureDefinition xmlns="http://hl7.org/fhir"> <id value="Narrative"/> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div> </text> <url value="http://hl7.org/fhir/StructureDefinition/Narrative"/> <name value="Narrative"/> <publisher value="HL7 FHIR Standard"/> <contact> <telecom> <system value="url"/> <value value="http://hl7.org/fhir"/> </telecom> </contact> <description value="Base StructureDefinition for Narrative Resource"/> <status value="draft"/> <date value="2015-03-27T00:13:00+11:00"/> <mapping> <identity value="rim"/> <uri value="http://hl7.org/v3"/> <name value="RIM"/> </mapping> <type value="type"/> <abstract value="false"/> <base value="http://hl7.org/fhir/StructureDefinition/Element"/> <snapshot> <element> <path value="Narrative"/> <short value="A human-readable formatted text, including images"/> <definition value="A human-readable formatted text, including images."/> <min value="1"/> <max value="1"/> <type> <code value="Narrative"/> </type> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> <element> <path value="Narrative.id"/> <representation value="xmlAttr"/> <short value="xml:id (or equivalent in JSON)"/> <definition value="unique id for the element within a resource (for internal references)."/> <min value="0"/> <max value="1"/> <type> <code value="id"/> </type> <mapping> <identity value="rim"/> <map value="n/a"/> </mapping> </element> <element> <path value="Narrative.extension"/> <short value="Additional Content defined by implementations"/> <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/> <comments 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."/> <alias value="extensions"/> <alias value="user content"/> <min value="0"/> <max value="*"/> <type> <code value="Extension"/> </type> <mapping> <identity value="rim"/> <map value="n/a"/> </mapping> </element> <element> <path value="Narrative.status"/> <short value="generated | extensions | additional | empty"/> <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."/> <min value="1"/> <max value="1"/> <type> <code value="code"/> </type> <binding> <name value="NarrativeStatus"/> <strength value="required"/> <description value="The status of a resource narrative"/> <valueSetReference> <reference value="http://hl7.org/fhir/vs/narrative-status"/> </valueSetReference> </binding> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> <element> <path value="Narrative.div"/> <short value="Limited xhtml content"/> <definition value="The actual narrative content, a stripped down version of XHTML."/> <comments 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 may not contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects."/> <min value="1"/> <max value="1"/> <type> <code value="xhtml"/> </type> <constraint> <key value="txt-2"/> <severity value="error"/> <human value="The narrative SHALL have some non-whitespace content"/> <xpath value="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]"/> </constraint> <constraint> <key value="txt-1"/> <severity value="error"/> <human value="The narrative SHALL contain only the basic html formatting elements 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"/> <xpath value="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', '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', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])"/> </constraint> <constraint> <key value="txt-3"/> <severity value="error"/> <human value="The narrative SHALL contain only the basic html formatting 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"/> <xpath value="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'))])"/> </constraint> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> </snapshot> <differential> <element> <path value="Narrative"/> <short value="A human-readable formatted text, including images"/> <definition value="A human-readable formatted text, including images."/> <min value="1"/> <max value="1"/> <type> <code value="Element"/> </type> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> <element> <path value="Narrative.status"/> <short value="generated | extensions | additional | empty"/> <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."/> <min value="1"/> <max value="1"/> <type> <code value="code"/> </type> <binding> <name value="NarrativeStatus"/> <strength value="required"/> <description value="The status of a resource narrative"/> <valueSetReference> <reference value="http://hl7.org/fhir/vs/narrative-status"/> </valueSetReference> </binding> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> <element> <path value="Narrative.div"/> <short value="Limited xhtml content"/> <definition value="The actual narrative content, a stripped down version of XHTML."/> <comments 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 may not contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects."/> <min value="1"/> <max value="1"/> <type> <code value="xhtml"/> </type> <constraint> <key value="txt-2"/> <severity value="error"/> <human value="The narrative SHALL have some non-whitespace content"/> <xpath value="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]"/> </constraint> <constraint> <key value="txt-1"/> <severity value="error"/> <human value="The narrative SHALL contain only the basic html formatting elements 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"/> <xpath value="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', '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', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])"/> </constraint> <constraint> <key value="txt-3"/> <severity value="error"/> <human value="The narrative SHALL contain only the basic html formatting 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"/> <xpath value="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'))])"/> </constraint> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> </differential> </StructureDefinition>
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.