R4 Ballot #2 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). 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

Narrative.profile.json

Modeling and Methodology Work GroupMaturity Level: N/ABallot Status: Informative

Raw JSON (canonical form + also see JSON Format Specification)

StructureDefinition for Narrative

{
  "resourceType" : "StructureDefinition",
  "id" : "Narrative",
  "meta" : {
    "lastUpdated" : "2018-08-19T21:48:56.559+10:00"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div>!-- Snipped for Brevity --></div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueString" : "Normative"
  }],
  "url" : "http://hl7.org/fhir/StructureDefinition/Narrative",
  "name" : "Narrative",
  "status" : "draft",
  "date" : "2018-08-19T21:48:56+10:00",
  "publisher" : "HL7 FHIR Standard",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "http://hl7.org/fhir"
    }]
  }],
  "description" : "Base StructureDefinition for Narrative Type: A human-readable formatted text, including images.",
  "fhirVersion" : "3.5.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" : "*",
      "base" : {
        "path" : "Narrative",
        "min" : 0,
        "max" : "*"
      },
      "condition" : ["ele-1"],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "Element"
      }],
      "isModifier" : false,
      "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"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Narrative.extension",
      "path" : "Narrative.extension",
      "slicing" : {
        "discriminator" : [{
          "type" : "value",
          "path" : "url"
        }],
        "description" : "Extensions are always sliced by (at least) url",
        "rules" : "open"
      },
      "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. 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.",
      "comment" : "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"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "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",
      "base" : {
        "path" : "Narrative.status",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "NarrativeStatus"
        }],
        "strength" : "required",
        "description" : "The status of a resource narrative.",
        "valueSet" : "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.",
      "comment" : "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.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Narrative.div",
        "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]"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "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" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "NarrativeStatus"
        }],
        "strength" : "required",
        "description" : "The status of a resource narrative.",
        "valueSet" : "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.",
      "comment" : "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.",
      "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.