{ "description": "This constrained Binary resource can carry any pure binary content., whether this is text, image, pdf, zip archive, etc... This resource is generally used as the target of a Document Reference or an Attachment.", "_filename": "ITK-Attachment-Binary-1.json", "package_name": "rs/NHSD.Assets.STU3", "date": "2018-01-19", "derivation": "constraint", "meta": { "lastUpdated": "2018-10-19T13:19:51.043+01:00" }, "publisher": "NHS Digital", "fhirVersion": "3.0.1", "purpose": "The Binary resource is need to carry image files.", "name": "ITK-Attachment-Binary-1", "abstract": false, "copyright": "Copyright © 2018 NHS Digital", "type": "Binary", "experimental": null, "resourceType": "StructureDefinition", "title": "ITK-Attachment-Binary", "package_version": "1.5.0", "snapshot": { "element": [ { "path": "Binary", "min": 0, "definition": "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.", "short": "Pure binary content defined by a format other than FHIR", "mapping": [ { "map": "Entity. Role, or Act", "identity": "rim" }, { "map": "N/A", "identity": "rim" }, { "map": "infrastructure.structure", "identity": "w5" } ], "max": "*", "id": "Binary", "comment": "Typically, Binary resources are used for handling content such as: * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS).", "base": { "max": "*", "min": 0, "path": "Resource" } }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.id", "min": 0, "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", "short": "Logical id of this artifact", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "id" } ], "max": "1", "id": "Binary.id", "condition": [ "ele-1" ], "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", "base": { "max": "1", "min": 0, "path": "Resource.id" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.meta", "min": 0, "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.", "short": "Metadata about the resource", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "N/A", "identity": "rim" } ], "type": [ { "code": "Meta" } ], "max": "1", "id": "Binary.meta", "condition": [ "ele-1" ], "base": { "max": "1", "min": 0, "path": "Resource.meta" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.implicitRules", "min": 0, "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.", "isModifier": true, "short": "A set of rules under which this content was created", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "uri" } ], "max": "1", "id": "Binary.implicitRules", "condition": [ "ele-1" ], "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.", "base": { "max": "1", "min": 0, "path": "Resource.implicitRules" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.language", "min": 0, "definition": "The base language in which the resource is written.", "short": "Language of the resource content", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "code" } ], "binding": { "strength": "extensible", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", "valueReference": { "reference": "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 } ], "description": "A human language.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/languages" } }, "max": "1", "id": "Binary.language", "condition": [ "ele-1" ], "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", "base": { "max": "1", "min": 0, "path": "Resource.language" } }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.contentType", "min": 1, "definition": "MimeType of the binary content represented as a standard MimeType (BCP 13).", "short": "MimeType of the binary content", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "code" } ], "binding": { "strength": "required", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "MimeType" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "description": "The mime type of an attachment. Any valid mime type is allowed.", "valueSetUri": "http://www.rfc-editor.org/bcp/bcp13.txt" }, "max": "1", "id": "Binary.contentType", "condition": [ "ele-1" ], "comment": "Note that FHIR strings may not exceed 1MB in size", "base": { "max": "1", "min": 1, "path": "Binary.contentType" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" }, { "key": "ref-1", "human": "SHALL have a contained resource if a local reference is provided", "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", "severity": "error", "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" } ], "path": "Binary.securityContext", "min": 0, "definition": "Treat this binary as if it was this other resource for access control purposes.", "short": "Access Control Management", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)", "identity": "rim" } ], "type": [ { "code": "Reference", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ], "max": "0", "id": "Binary.securityContext", "condition": [ "ele-1" ], "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", "base": { "max": "1", "min": 0, "path": "Binary.securityContext" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.securityContext.id", "min": 0, "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", "short": "xml:id (or equivalent in JSON)", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "string" } ], "representation": [ "xmlAttr" ], "max": "1", "id": "Binary.securityContext.id", "condition": [ "ele-1" ], "comment": "Note that FHIR strings may not exceed 1MB in size", "base": { "max": "1", "min": 0, "path": "Element.id" } }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" }, { "key": "ext-1", "human": "Must have either extensions or value[x], not both", "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", "severity": "error", "expression": "extension.exists() != value.exists()" } ], "path": "Binary.securityContext.extension", "min": 0, "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.", "short": "Additional Content defined by implementations", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "N/A", "identity": "rim" } ], "slicing": { "rules": "open", "description": "Extensions are always sliced by (at least) url", "discriminator": [ { "path": "url", "type": "value" } ] }, "type": [ { "code": "Extension" } ], "alias": [ "extensions", "user content" ], "max": "*", "id": "Binary.securityContext.extension", "condition": [ "ele-1" ], "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.", "base": { "max": "*", "min": 0, "path": "Element.extension" } }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.securityContext.reference", "min": 0, "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", "short": "Literal reference, Relative, internal or absolute URL", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "N/A", "identity": "rim" } ], "type": [ { "code": "string" } ], "max": "1", "id": "Binary.securityContext.reference", "condition": [ "ele-1", "ref-1" ], "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", "base": { "max": "1", "min": 0, "path": "Reference.reference" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.securityContext.identifier", "min": 0, "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", "short": "Logical reference, when literal reference is not known", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)", "identity": "v2" }, { "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]", "identity": "rim" }, { "map": "Identifier", "identity": "servd" }, { "map": ".identifier", "identity": "rim" } ], "type": [ { "code": "Identifier" } ], "max": "1", "id": "Binary.securityContext.identifier", "condition": [ "ele-1" ], "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", "base": { "max": "1", "min": 0, "path": "Reference.identifier" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.securityContext.display", "min": 0, "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", "short": "Text alternative for the resource", "mapping": [ { "map": "n/a", "identity": "rim" }, { "map": "N/A", "identity": "rim" } ], "type": [ { "code": "string" } ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", "valueBoolean": true } ], "max": "1", "id": "Binary.securityContext.display", "condition": [ "ele-1" ], "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", "base": { "max": "1", "min": 0, "path": "Reference.display" }, "isSummary": true }, { "constraint": [ { "key": "ele-1", "human": "All FHIR elements must have a @value or children", "xpath": "@value|f:*|h:div", "severity": "error", "expression": "hasValue() | (children().count() > id.count())" } ], "path": "Binary.content", "min": 1, "definition": "The actual content, base64 encoded", "short": "The actual content", "mapping": [ { "map": "n/a", "identity": "rim" } ], "type": [ { "code": "base64Binary" } ], "max": "1", "id": "Binary.content", "condition": [ "ele-1" ], "comment": "If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type.", "base": { "max": "1", "min": 1, "path": "Binary.content" } } ] }, "status": "active", "id": "28bda34b-3b02-402e-992a-9404e0c9c2b6", "kind": "resource", "url": "https://fhir.nhs.uk/STU3/StructureDefinition/ITK-Attachment-Binary-1", "version": "1.1.0", "differential": { "element": [ { "id": "Binary.securityContext", "max": "0", "path": "Binary.securityContext" }, { "id": "Binary.content", "path": "Binary.content", "definition": "The actual content, base64 encoded" } ] }, "contact": [ { "name": "Interoperability Team", "telecom": [ { "use": "work", "value": "interoperabilityteam@nhs.net", "system": "email" } ] } ], "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Binary" }