<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="4122c217-8e94-40e9-a371-889fe73ada19" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2023-09-28T11:54:38.549+00:00" />
    <source value="#MOElY7Hade1GTWvW" />
  </meta>
  <url value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-Binary" />
  <version value="1.0.0" />
  <name value="IDMSBinary" />
  <title value="IDMS_Binary" />
  <status value="draft" />
  <date value="2021-09-26" />
  <description value="IDMS's profile for storing binary data,  this is either questionnaire response attachments or generated PDFs" />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Binary" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Binary" />
  <derivation value="constraint" />
  <differential>
    <element id="Binary.contentType">
      <path value="Binary.contentType" />
      <definition value="#### **_`IDMS:  This is the document format.`_**&#xA;&#xA;MimeType of the binary content represented as a standard MimeType (BCP 13)." />
    </element>
    <element id="Binary.securityContext">
      <path value="Binary.securityContext" />
      <definition value="#### **_`IDMS:  This is a reference to the Requestor Role for the related request.  This is needed to enforce security so that users cannot view each other's attachments.`_**&#xA;&#xA;&#xA;This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/FlexFormsRole" />
      </type>
    </element>
    <element id="Binary.data">
      <path value="Binary.data" />
      <definition value="#### **_`IDMS:  This is the document in base64 format.`_**&#xA;&#xA;The actual content, base64 encoded." />
    </element>
  </differential>
</StructureDefinition>