PackagesCanonicalsLogsProblems
    Packages
    smart4health.eu.core@0.2.0
    http://fhir.smart4health.eu/StructureDefinition/s4h-attachment
{
  "description": "Attachment profile for use within the Smart4Health project.",
  "_filename": "S4hAttachment.StructureDefinition.json",
  "package_name": "smart4health.eu.core",
  "date": null,
  "derivation": "constraint",
  "publisher": "D4L data4life gGmbh",
  "fhirVersion": "4.0.1",
  "name": "S4hAttachment",
  "mapping": [ {
    "uri": "http://hl7.org/v2",
    "name": "HL7 v2 Mapping",
    "identity": "v2"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  } ],
  "abstract": false,
  "copyright": "2020 D4L data4life gGmbh",
  "type": "Attachment",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "0.2.0",
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "att-1",
        "human": "If the Attachment has data, it SHALL have a contentType",
        "xpath": "not(exists(f:data)) or exists(f:contentType)",
        "source": "http://hl7.org/fhir/StructureDefinition/Attachment",
        "severity": "error",
        "expression": "data.empty() or contentType.exists()"
      } ],
      "path": "Attachment",
      "min": 0,
      "definition": "For referring to data content defined in other formats.",
      "short": "Content in a format defined elsewhere",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "ED/RP",
        "identity": "v2"
      }, {
        "map": "ED",
        "identity": "rim"
      } ],
      "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"
      } ],
      "max": "*",
      "id": "Attachment",
      "condition": [ "ele-1" ],
      "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\".",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Attachment"
      }
    }, {
      "path": "Attachment.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": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Attachment.id",
      "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",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (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')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Attachment.extension",
      "min": 0,
      "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.",
      "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"
      } ],
      "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"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Attachment.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",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.contentType",
      "requirements": "Processors of the data need to be able to know how to interpret the data.",
      "min": 1,
      "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.",
      "short": "Mime type of the content, with charset etc.",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used",
        "identity": "v2"
      }, {
        "map": "./mediaType, ./charset",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1",
        "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."
      },
      "max": "1",
      "id": "Attachment.contentType",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
      "example": [ {
        "label": "General",
        "valueCode": "text/plain; charset=UTF-8, image/png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.contentType"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.language",
      "requirements": "Users need to be able to choose between the languages in a set of attachments.",
      "min": 0,
      "definition": "The human language of the content. The value can be any valid value according to BCP 47.",
      "short": "Human language of the content (BCP-47)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "./language",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "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
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "Attachment.language",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
      "example": [ {
        "label": "General",
        "valueCode": "en-AU"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.language"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.data",
      "requirements": "The data needs to able to be transmitted inline.",
      "min": 0,
      "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.",
      "short": "Data inline, base64ed",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "ED.5",
        "identity": "v2"
      }, {
        "map": "./data",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Attachment.data",
      "condition": [ "ele-1" ],
      "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.data"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.url",
      "requirements": "The data needs to be transmitted by reference. Smart4Health-specific constraint: attachment must declare their content type to allow security-related checks on the content.",
      "min": 0,
      "definition": "A location where the data can be accessed.",
      "short": "Uri where the data can be found",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "RP.1+RP.2 - if they refer to a URL (see v2.6)",
        "identity": "v2"
      }, {
        "map": "./reference/literal",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "url"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Attachment.url",
      "condition": [ "ele-1" ],
      "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.",
      "example": [ {
        "label": "General",
        "valueUrl": "http://www.acme.com/logo-small.png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.url"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.size",
      "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,
      "definition": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
      "short": "Number of bytes of content (if url provided)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "unsignedInt"
      } ],
      "max": "1",
      "id": "Attachment.size",
      "condition": [ "ele-1" ],
      "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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.size"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.hash",
      "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,
      "definition": "The calculated hash of the data using SHA-1. Represented using base64.",
      "short": "Hash of the data (sha-1, base64ed)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Attachment.hash",
      "condition": [ "ele-1" ],
      "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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.hash"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.title",
      "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,
      "definition": "A label or set of text to display in place of the data.",
      "short": "Label to display in place of the data",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "./title/data",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Attachment.title",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
      "example": [ {
        "label": "General",
        "valueString": "Official Corporate Logo"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.title"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Attachment.creation",
      "requirements": "This is often tracked as an integrity issue for use of the attachment.",
      "min": 0,
      "definition": "The date that the attachment was first created.",
      "short": "Date attachment was first created",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Attachment.creation",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.creation"
      },
      "isSummary": true
    } ]
  },
  "status": "draft",
  "id": "1fbf2026-06e9-4432-8031-dcaf6d291f09",
  "kind": "complex-type",
  "url": "http://fhir.smart4health.eu/StructureDefinition/s4h-attachment",
  "version": null,
  "differential": {
    "element": [ {
      "id": "Attachment.contentType",
      "min": 1,
      "path": "Attachment.contentType",
      "mustSupport": true
    }, {
      "id": "Attachment.data",
      "path": "Attachment.data",
      "mustSupport": true
    }, {
      "id": "Attachment.url",
      "path": "Attachment.url",
      "mustSupport": true,
      "requirements": "The data needs to be transmitted by reference. Smart4Health-specific constraint: attachment must declare their content type to allow security-related checks on the content."
    }, {
      "id": "Attachment.hash",
      "path": "Attachment.hash",
      "mustSupport": true
    }, {
      "id": "Attachment.creation",
      "path": "Attachment.creation",
      "mustSupport": true
    } ]
  },
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Attachment"
}