<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Attachment" />
  <name value="Attachment" />
  <title value="API Framework Attachment" />
  <status value="active" />
  <experimental value="false" />
  <description value="Core API Framework Profile for Attachment" />
  <fhirVersion value="3.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Attachment" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Attachment" />
  <derivation value="constraint" />
  <differential>
    <element id="Attachment.extension">
      <path value="Attachment.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Attachment.extension:documentReferenceMasterIdentifier">
      <path value="Attachment.extension" />
      <sliceName value="documentReferenceMasterIdentifier" />
      <requirements value="Allows to provide a unique identifier representing a logical connection to a DocumentReference.MasterIdentifier element. Consumers of the attachment can use this identifier to retrieve the related DocumentReference instance or the document bytestream." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-attachment-documentReferenceMasterIdentifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:documentReferenceMasterIdentifier.valueIdentifier:valueIdentifier">
      <path value="Attachment.extension.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:documentReferenceMasterIdentifier.valueIdentifier:valueIdentifier.system">
      <path value="Attachment.extension.valueIdentifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:documentReferenceMasterIdentifier.valueIdentifier:valueIdentifier.value">
      <path value="Attachment.extension.valueIdentifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:documentReferenceContentFormat">
      <path value="Attachment.extension" />
      <sliceName value="documentReferenceContentFormat" />
      <requirements value="Allows to provide information about the content format of the target document. This information is actually a redundancy of DocumentReference.content.format, it is copied also on the attachment resource to allow consumers to know the document format code without retrieving the DocumentReference instance." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-attachment-documentReferenceContentFormat" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:relatedTo">
      <path value="Attachment.extension" />
      <sliceName value="relatedTo" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-attachment-relatedTo" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Attachment.extension:thumbnail">
      <path value="Attachment.extension" />
      <sliceName value="thumbnail" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-attachment-thumbnail" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Attachment.contentType">
      <path value="Attachment.contentType" />
      <mustSupport value="true" />
    </element>
    <element id="Attachment.size">
      <path value="Attachment.size" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>