This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). 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 Attachment
{ "resourceType": "StructureDefinition", "id": "Attachment", "meta": { "lastUpdated": "2016-03-31T08:01:25.570+11:00" }, "text": { "status": "generated", "div": "<div>!-- Snipped for Brevity --></div>" }, "url": "http://hl7.org/fhir/StructureDefinition/Attachment", "name": "Attachment", "status": "draft", "publisher": "HL7 FHIR Standard", "contact": [ { "telecom": [ { "system": "other", "value": "http://hl7.org/fhir" } ] } ], "date": "2016-03-31T08:01:25+11:00", "description": "Base StructureDefinition for Attachment Type", "requirements": "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": "1.4.0", "mapping": [ { "identity": "v2", "uri": "http://hl7.org/v2", "name": "HL7 v2" }, { "identity": "rim", "uri": "http://hl7.org/v3", "name": "RIM" } ], "kind": "datatype", "abstract": false, "baseType": "Element", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element", "derivation": "specialization", "snapshot": { "element": [ { "path": "Attachment", "short": "Content in a format defined elsewhere", "definition": "For referring to data content defined in other formats.", "comments": "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Attachment\".", "min": 0, "max": "*", "type": [ { "code": "Element" } ], "constraint": [ { "key": "att-1", "severity": "error", "human": "It the Attachment has data, it SHALL have a contentType", "expression": "data.empty() or contentType", "xpath": "not(exists(f:data)) or exists(f:contentType)" } ], "mapping": [ { "identity": "v2", "map": "ED/RP" }, { "identity": "rim", "map": "ED" } ] }, { "path": "Attachment.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "Attachment.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" } ] }, { "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" } ], "exampleCode": "text/plain; charset=UTF-8, image/png", "isSummary": true, "binding": { "strength": "required", "description": "The mime type of an attachment. Any valid mime type is allowed.", "valueSetUri": "http://www.rfc-editor.org/bcp/bcp13.txt" }, "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" } ] }, { "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" } ], "exampleCode": "en-AU", "isSummary": true, "binding": { "strength": "required", "description": "A human language.", "valueSetUri": "http://tools.ietf.org/html/bcp47" }, "mapping": [ { "identity": "rim", "map": "./language" } ] }, { "path": "Attachment.data", "short": "Data inline, base64ed", "definition": "The actual data of the attachment - a sequence of bytes. In XML, represented using base64.", "comments": "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" } ] }, { "path": "Attachment.url", "short": "Uri where the data can be found", "definition": "An alternative location where the data can be accessed.", "comments": "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": "uri" } ], "exampleUri": "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" } ] }, { "path": "Attachment.size", "short": "Number of bytes of content (if url provided)", "definition": "The number of bytes of data that make up this attachment.", "comments": "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": "unsignedInt" } ], "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A (needs data type R3 proposal)" } ] }, { "path": "Attachment.hash", "short": "Hash of the data (sha-1, base64ed)", "definition": "The calculated hash of the data using SHA-1. Represented using base64.", "requirements": "Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature.", "min": 0, "max": "1", "type": [ { "code": "base64Binary" } ], "isSummary": true, "mapping": [ { "identity": "rim", "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]" } ] }, { "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" } ], "exampleString": "Official Corporate Logo", "isSummary": true, "mapping": [ { "identity": "rim", "map": "./title/data" } ] }, { "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)" } ] } ] }, "differential": { "element": [ { "path": "Attachment", "short": "Content in a format defined elsewhere", "definition": "For referring to data content defined in other formats.", "comments": "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Attachment\".", "min": 0, "max": "*", "type": [ { "code": "Element" } ], "constraint": [ { "key": "att-1", "severity": "error", "human": "It the Attachment has data, it SHALL have a contentType", "expression": "data.empty() or contentType", "xpath": "not(exists(f:data)) or exists(f:contentType)" } ], "mapping": [ { "identity": "v2", "map": "ED/RP" }, { "identity": "rim", "map": "ED" } ] }, { "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" } ], "exampleCode": "text/plain; charset=UTF-8, image/png", "isSummary": true, "binding": { "strength": "required", "description": "The mime type of an attachment. Any valid mime type is allowed.", "valueSetUri": "http://www.rfc-editor.org/bcp/bcp13.txt" }, "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" } ] }, { "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" } ], "exampleCode": "en-AU", "isSummary": true, "binding": { "strength": "required", "description": "A human language.", "valueSetUri": "http://tools.ietf.org/html/bcp47" }, "mapping": [ { "identity": "rim", "map": "./language" } ] }, { "path": "Attachment.data", "short": "Data inline, base64ed", "definition": "The actual data of the attachment - a sequence of bytes. In XML, represented using base64.", "comments": "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" } ] }, { "path": "Attachment.url", "short": "Uri where the data can be found", "definition": "An alternative location where the data can be accessed.", "comments": "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": "uri" } ], "exampleUri": "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" } ] }, { "path": "Attachment.size", "short": "Number of bytes of content (if url provided)", "definition": "The number of bytes of data that make up this attachment.", "comments": "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": "unsignedInt" } ], "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A (needs data type R3 proposal)" } ] }, { "path": "Attachment.hash", "short": "Hash of the data (sha-1, base64ed)", "definition": "The calculated hash of the data using SHA-1. Represented using base64.", "requirements": "Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature.", "min": 0, "max": "1", "type": [ { "code": "base64Binary" } ], "isSummary": true, "mapping": [ { "identity": "rim", "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]" } ] }, { "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" } ], "exampleString": "Official Corporate Logo", "isSummary": true, "mapping": [ { "identity": "rim", "map": "./title/data" } ] }, { "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)" } ] } ] } }
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.