Release 5 Preview #2

This page is part of the FHIR Specification (v4.4.0: R5 Preview #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

Attachment.profile.json

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

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

StructureDefinition for Attachment

{
  "resourceType" : "StructureDefinition",
  "id" : "Attachment",
  "meta" : {
    "lastUpdated" : "2020-05-03T08:43:35.811+10:00"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div>!-- Snipped for Brevity --></div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode" : "normative"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
    "valueCode" : "4.0.0"
  }],
  "url" : "http://hl7.org/fhir/StructureDefinition/Attachment",
  "version" : "4.4.0",
  "name" : "Attachment",
  "status" : "active",
  "date" : "2020-05-03T08:43:35+10:00",
  "publisher" : "HL7 FHIR Standard",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "http://hl7.org/fhir"
    }]
  }],
  "description" : "Base StructureDefinition for Attachment Type: For referring to data content defined in other formats.",
  "purpose" : "Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc.",
  "fhirVersion" : "4.4.0",
  "mapping" : [{
    "identity" : "v2",
    "uri" : "http://hl7.org/v2",
    "name" : "HL7 v2 Mapping"
  },
  {
    "identity" : "rim",
    "uri" : "http://hl7.org/v3",
    "name" : "RIM Mapping"
  }],
  "kind" : "complex-type",
  "abstract" : false,
  "type" : "Attachment",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/DataType",
  "derivation" : "specialization",
  "snapshot" : {
    "element" : [{
      "id" : "Attachment",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "normative"
      },
      {
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode" : "4.0.0"
      }],
      "path" : "Attachment",
      "short" : "Content in a format defined elsewhere",
      "definition" : "For referring to data content defined in other formats.",
      "comment" : "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Signed Procedure Consent\".",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Attachment",
        "min" : 0,
        "max" : "*"
      },
      "constraint" : [{
        "key" : "att-1",
        "severity" : "error",
        "human" : "If the Attachment has data, it SHALL have a contentType",
        "expression" : "data.empty() or contentType.exists()",
        "xpath" : "not(exists(f:data)) or exists(f:contentType)",
        "source" : "http://hl7.org/fhir/StructureDefinition/null"
      },
      {
        "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      },
      {
        "identity" : "v2",
        "map" : "ED/RP"
      },
      {
        "identity" : "rim",
        "map" : "ED"
      }]
    },
    {
      "id" : "Attachment.id",
      "path" : "Attachment.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "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" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUri" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Attachment.extension",
      "path" : "Attachment.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"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Attachment.contentType",
      "path" : "Attachment.contentType",
      "short" : "Mime type of the content, with charset etc.",
      "definition" : "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.",
      "requirements" : "Processors of the data need to be able to know how to interpret the data.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.contentType",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "example" : [{
        "label" : "General",
        "valueCode" : "text/plain; charset=UTF-8, image/png"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MimeType"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "The mime type of an attachment. Any valid mime type is allowed.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/mimetypes|4.4.0"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"
      },
      {
        "identity" : "rim",
        "map" : "./mediaType, ./charset"
      }]
    },
    {
      "id" : "Attachment.language",
      "path" : "Attachment.language",
      "short" : "Human language of the content (BCP-47)",
      "definition" : "The human language of the content. The value can be any valid value according to BCP 47.",
      "requirements" : "Users need to be able to choose between the languages in a set of attachments.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.language",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "example" : [{
        "label" : "General",
        "valueCode" : "en-AU"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical" : "http://hl7.org/fhir/ValueSet/all-languages"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Language"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "preferred",
        "description" : "A human language.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/languages"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "./language"
      }]
    },
    {
      "id" : "Attachment.data",
      "path" : "Attachment.data",
      "short" : "Data inline, base64ed",
      "definition" : "The actual data of the attachment - a sequence of bytes, base64 encoded.",
      "comment" : "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
      "requirements" : "The data needs to able to be transmitted inline.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.data",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "base64Binary"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "v2",
        "map" : "ED.5"
      },
      {
        "identity" : "rim",
        "map" : "./data"
      }]
    },
    {
      "id" : "Attachment.url",
      "path" : "Attachment.url",
      "short" : "Uri where the data can be found",
      "definition" : "A location where the data can be accessed.",
      "comment" : "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.",
      "requirements" : "The data needs to be transmitted by reference.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.url",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "url"
      }],
      "example" : [{
        "label" : "General",
        "valueUrl" : "http://www.acme.com/logo-small.png"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "RP.1+RP.2 - if they refer to a URL (see v2.6)"
      },
      {
        "identity" : "rim",
        "map" : "./reference/literal"
      }]
    },
    {
      "id" : "Attachment.size",
      "path" : "Attachment.size",
      "short" : "Number of bytes of content (if url provided)",
      "definition" : "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
      "comment" : "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.",
      "requirements" : "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.size",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "integer64"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A (needs data type R3 proposal)"
      }]
    },
    {
      "id" : "Attachment.hash",
      "path" : "Attachment.hash",
      "short" : "Hash of the data (sha-1, base64ed)",
      "definition" : "The calculated hash of the data using SHA-1. Represented using base64.",
      "comment" : "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.",
      "requirements" : "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.hash",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "base64Binary"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]"
      }]
    },
    {
      "id" : "Attachment.title",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean" : true
      }],
      "path" : "Attachment.title",
      "short" : "Label to display in place of the data",
      "definition" : "A label or set of text to display in place of the data.",
      "requirements" : "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.title",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "example" : [{
        "label" : "General",
        "valueString" : "Official Corporate Logo"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "./title/data"
      }]
    },
    {
      "id" : "Attachment.creation",
      "path" : "Attachment.creation",
      "short" : "Date attachment was first created",
      "definition" : "The date that the attachment was first created.",
      "requirements" : "This is often tracked as an integrity issue for use of the attachment.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.creation",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "dateTime"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A (needs data type R3 proposal)"
      }]
    },
    {
      "id" : "Attachment.height",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.height",
      "short" : "Height of the image in pixels (photo/video)",
      "definition" : "Height of the image in pixels (photo/video).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.height",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "positiveInt"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.width",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.width",
      "short" : "Width of the image in pixels (photo/video)",
      "definition" : "Width of the image in pixels (photo/video).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.width",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "positiveInt"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.frames",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.frames",
      "short" : "Number of frames if > 1 (photo)",
      "definition" : "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.",
      "comment" : "if the number of frames is not supplied, the value may be unknown. Applications should not assume that there is only one frame unless it is explicitly stated.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.frames",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "positiveInt"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.duration",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.duration",
      "short" : "Length in seconds (audio / video)",
      "definition" : "The duration of the recording in seconds - for audio and video.",
      "comment" : "The duration might differ from occurrencePeriod if recording was paused.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.duration",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "decimal"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.pages",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.pages",
      "short" : "Number of printed pages",
      "definition" : "The number of pages when printed.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Attachment.pages",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "positiveInt"
      }],
      "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" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "Attachment",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "normative"
      },
      {
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode" : "4.0.0"
      }],
      "path" : "Attachment",
      "short" : "Content in a format defined elsewhere",
      "definition" : "For referring to data content defined in other formats.",
      "comment" : "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Signed Procedure Consent\".",
      "min" : 0,
      "max" : "*",
      "constraint" : [{
        "key" : "att-1",
        "severity" : "error",
        "human" : "If the Attachment has data, it SHALL have a contentType",
        "expression" : "data.empty() or contentType.exists()",
        "xpath" : "not(exists(f:data)) or exists(f:contentType)",
        "source" : "http://hl7.org/fhir/StructureDefinition/null"
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "ED/RP"
      },
      {
        "identity" : "rim",
        "map" : "ED"
      }]
    },
    {
      "id" : "Attachment.contentType",
      "path" : "Attachment.contentType",
      "short" : "Mime type of the content, with charset etc.",
      "definition" : "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.",
      "requirements" : "Processors of the data need to be able to know how to interpret the data.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "example" : [{
        "label" : "General",
        "valueCode" : "text/plain; charset=UTF-8, image/png"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MimeType"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "The mime type of an attachment. Any valid mime type is allowed.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/mimetypes|4.4.0"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"
      },
      {
        "identity" : "rim",
        "map" : "./mediaType, ./charset"
      }]
    },
    {
      "id" : "Attachment.language",
      "path" : "Attachment.language",
      "short" : "Human language of the content (BCP-47)",
      "definition" : "The human language of the content. The value can be any valid value according to BCP 47.",
      "requirements" : "Users need to be able to choose between the languages in a set of attachments.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "example" : [{
        "label" : "General",
        "valueCode" : "en-AU"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical" : "http://hl7.org/fhir/ValueSet/all-languages"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Language"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "preferred",
        "description" : "A human language.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/languages"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "./language"
      }]
    },
    {
      "id" : "Attachment.data",
      "path" : "Attachment.data",
      "short" : "Data inline, base64ed",
      "definition" : "The actual data of the attachment - a sequence of bytes, base64 encoded.",
      "comment" : "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
      "requirements" : "The data needs to able to be transmitted inline.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "base64Binary"
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "ED.5"
      },
      {
        "identity" : "rim",
        "map" : "./data"
      }]
    },
    {
      "id" : "Attachment.url",
      "path" : "Attachment.url",
      "short" : "Uri where the data can be found",
      "definition" : "A location where the data can be accessed.",
      "comment" : "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.",
      "requirements" : "The data needs to be transmitted by reference.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "url"
      }],
      "example" : [{
        "label" : "General",
        "valueUrl" : "http://www.acme.com/logo-small.png"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "RP.1+RP.2 - if they refer to a URL (see v2.6)"
      },
      {
        "identity" : "rim",
        "map" : "./reference/literal"
      }]
    },
    {
      "id" : "Attachment.size",
      "path" : "Attachment.size",
      "short" : "Number of bytes of content (if url provided)",
      "definition" : "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
      "comment" : "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.",
      "requirements" : "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "integer64"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A (needs data type R3 proposal)"
      }]
    },
    {
      "id" : "Attachment.hash",
      "path" : "Attachment.hash",
      "short" : "Hash of the data (sha-1, base64ed)",
      "definition" : "The calculated hash of the data using SHA-1. Represented using base64.",
      "comment" : "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.",
      "requirements" : "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "base64Binary"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]"
      }]
    },
    {
      "id" : "Attachment.title",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean" : true
      }],
      "path" : "Attachment.title",
      "short" : "Label to display in place of the data",
      "definition" : "A label or set of text to display in place of the data.",
      "requirements" : "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "example" : [{
        "label" : "General",
        "valueString" : "Official Corporate Logo"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "./title/data"
      }]
    },
    {
      "id" : "Attachment.creation",
      "path" : "Attachment.creation",
      "short" : "Date attachment was first created",
      "definition" : "The date that the attachment was first created.",
      "requirements" : "This is often tracked as an integrity issue for use of the attachment.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A (needs data type R3 proposal)"
      }]
    },
    {
      "id" : "Attachment.height",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.height",
      "short" : "Height of the image in pixels (photo/video)",
      "definition" : "Height of the image in pixels (photo/video).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "positiveInt"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.width",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.width",
      "short" : "Width of the image in pixels (photo/video)",
      "definition" : "Width of the image in pixels (photo/video).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "positiveInt"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.frames",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.frames",
      "short" : "Number of frames if > 1 (photo)",
      "definition" : "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.",
      "comment" : "if the number of frames is not supplied, the value may be unknown. Applications should not assume that there is only one frame unless it is explicitly stated.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "positiveInt"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.duration",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.duration",
      "short" : "Length in seconds (audio / video)",
      "definition" : "The duration of the recording in seconds - for audio and video.",
      "comment" : "The duration might differ from occurrencePeriod if recording was paused.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "decimal"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"COMP].target[classCode=\"OBS\", moodCode=\"EVN\",code=\"<CODE>\"].value"
      }]
    },
    {
      "id" : "Attachment.pages",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode" : "trial-use"
      }],
      "path" : "Attachment.pages",
      "short" : "Number of printed pages",
      "definition" : "The number of pages when printed.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "positiveInt"
      }]
    }]
  }
}

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.