This page is part of the FHIR Specification (v1.8.0: STU 3 Draft). 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
{ "resourceType": "StructureDefinition", "id": "Narrative", "meta": { "lastUpdated": "2016-12-06T12:22:34.981+11:00" }, "text": { "status": "generated", "div": "<div>!-- Snipped for Brevity --></div>" }, "url": "http://hl7.org/fhir/StructureDefinition/Narrative", "name": "Narrative", "status": "draft", "publisher": "HL7 FHIR Standard", "contact": [ { "telecom": [ { "system": "url", "value": "http://hl7.org/fhir" } ] } ], "date": "2016-12-06T12:22:34+11:00", "description": "Base StructureDefinition for Narrative Type", "fhirVersion": "1.8.0", "mapping": [ { "identity": "rim", "uri": "http://hl7.org/v3", "name": "RIM Mapping" } ], "kind": "complex-type", "abstract": false, "type": "Narrative", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element", "derivation": "specialization", "snapshot": { "element": [ { "id": "Narrative", "path": "Narrative", "short": "A human-readable formatted text, including images", "definition": "A human-readable formatted text, including images.", "min": 0, "max": "*", "condition": [ "ele-1" ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "children().count() > id.count()", "xpath": "@value|f:*|h:div", "source": "Element" } ], "mapping": [ { "identity": "rim", "map": "n/a" }, { "identity": "rim", "map": "N/A" } ] }, { "id": "Narrative.id", "path": "Narrative.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "Narrative.extension", "path": "Narrative.extension", "short": "Additional Content defined by implementations", "definition": "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": "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": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "Narrative.status", "path": "Narrative.status", "short": "generated | extensions | additional | empty", "definition": "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": 1, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The status of a resource narrative", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/narrative-status" } }, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "id": "Narrative.div", "path": "Narrative.div", "short": "Limited xhtml content", "definition": "The actual narrative content, a stripped down version of XHTML.", "comments": "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": 1, "max": "1", "type": [ { "code": "xhtml" } ], "constraint": [ { "key": "txt-1", "severity": "error", "human": "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", "expression": "htmlchecks()", "xpath": "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'))])" }, { "key": "txt-2", "severity": "error", "human": "The narrative SHALL have some non-whitespace content", "expression": "htmlchecks()", "xpath": "descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]" } ], "mapping": [ { "identity": "rim", "map": "N/A" } ] } ] }, "differential": { "element": [ { "id": "Narrative", "path": "Narrative", "short": "A human-readable formatted text, including images", "definition": "A human-readable formatted text, including images.", "min": 0, "max": "*", "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "id": "Narrative.status", "path": "Narrative.status", "short": "generated | extensions | additional | empty", "definition": "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": 1, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The status of a resource narrative", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/narrative-status" } }, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "id": "Narrative.div", "path": "Narrative.div", "short": "Limited xhtml content", "definition": "The actual narrative content, a stripped down version of XHTML.", "comments": "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": 1, "max": "1", "type": [ { "code": "xhtml" } ], "constraint": [ { "key": "txt-1", "severity": "error", "human": "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", "expression": "htmlchecks()", "xpath": "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'))])" }, { "key": "txt-2", "severity": "error", "human": "The narrative SHALL have some non-whitespace content", "expression": "htmlchecks()", "xpath": "descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]" } ], "mapping": [ { "identity": "rim", "map": "N/A" } ] } ] } }
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.