<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="d592108c-1bc5-462c-9042-34bf07e43a3f" />
  <meta>
    <versionId value="2" />
    <lastUpdated value="2019-05-06T16:58:33.4736053+00:00" />
  </meta>
  <url value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Consent" />
  <name value="Consent-Consent" />
  <status value="draft" />
  <date value="2019-05-06T16:58:33.2102035Z" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Consent" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent.identifier">
      <path value="Consent.identifier" />
      <comment value="Will be assigned by server or supplied by consumer. This identifier is identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same." />
      <mustSupport value="true" />
    </element>
    <element id="Consent.identifier.system">
      <path value="Consent.identifier.system" />
      <mustSupport value="false" />
    </element>
    <element id="Consent.identifier.value">
      <path value="Consent.identifier.value" />
      <mustSupport value="false" />
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <fixedCode value="active" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category.coding">
      <path value="Consent.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category.coding.system">
      <path value="Consent.category.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="example" />
        <description value="A code specifying the particular kind of Act that the Act-instance represents within its class." />
        <valueSetUri value="http://hl7.org/fhir/v3/ActCode" />
      </binding>
    </element>
    <element id="Consent.category.coding.code">
      <path value="Consent.category.coding.code" />
      <min value="1" />
      <fixedCode value="INFA" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Consent.category.coding.display" />
      <min value="1" />
      <fixedString value="information access" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <comment value="Health card number, First &amp; Last Name of a Patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-Consent" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.patient.reference">
      <path value="Consent.patient.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.consentingParty">
      <path value="Consent.consentingParty" />
      <comment value="Consenting party is either patient or SDM (substitute decision maker)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-Consent" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/NamingSystem/ca-on-medications-profile-RelatedPerson-Consent" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.consentingParty.reference">
      <path value="Consent.consentingParty.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.organization">
      <path value="Consent.organization" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Organization-Consent" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.organization.reference">
      <path value="Consent.organization.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.policy">
      <path value="Consent.policy" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.policy.authority">
      <path value="Consent.policy.authority" />
      <min value="1" />
      <fixedUri value="https://www.ontario.ca" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="Except" />
      </extension>
      <path value="Consent.except" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.type">
      <path value="Consent.except.type" />
      <fixedCode value="permit" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.period">
      <path value="Consent.except.period" />
      <definition value="The timeframe in this exception is valid. (Duration of the unblock)." />
      <comment value="Not used in the current release (see below). &#xD;&#xA;This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;). If duration is required, specify the type as Interval|Duration." />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.period.start">
      <path value="Consent.except.period.start" />
      <comment value="In the current release this will be overridden by the time the server received the message.&#xD;&#xA;If the low element is missing, the meaning is that the low boundary is not known." />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.period.end">
      <path value="Consent.except.period.end" />
      <comment value="Always 4 hours after start. The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="ExceptActor" />
      </extension>
      <path value="Consent.except.actor" />
      <comment value="Only “Consent Obtainer” role is supported in the current release." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor.role">
      <path value="Consent.except.actor.role" />
      <short value="Consent Directive Actor Role" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentActorRole" />
        </extension>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/v3/ParticipationType" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Consent.except.actor.role.coding">
      <path value="Consent.except.actor.role.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor.role.coding.system">
      <path value="Consent.except.actor.role.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Participation Type" />
        <valueSetUri value="http://hl7.org/fhir/v3/ParticipationType" />
      </binding>
    </element>
    <element id="Consent.except.actor.role.coding.code">
      <path value="Consent.except.actor.role.coding.code" />
      <min value="1" />
      <fixedCode value="IRCP" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor.role.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Consent.except.actor.role.coding.display" />
      <min value="1" />
      <fixedString value="information recipient" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor.reference">
      <path value="Consent.except.actor.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Practitioner-Consent" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.actor.reference.reference">
      <path value="Consent.except.actor.reference.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.action">
      <path value="Consent.except.action" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.action.coding">
      <path value="Consent.except.action.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.action.coding.system">
      <path value="Consent.except.action.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/consentaction" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Consent Action" />
        <valueSetUri value="http://hl7.org/fhir/consentaction" />
      </binding>
    </element>
    <element id="Consent.except.action.coding.code">
      <path value="Consent.except.action.coding.code" />
      <min value="1" />
      <fixedCode value="access" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.action.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Consent.except.action.coding.display" />
      <min value="1" />
      <fixedString value="Access" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.purpose">
      <path value="Consent.except.purpose" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.purpose.system">
      <path value="Consent.except.purpose.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/v3/ActReason" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Act Reason" />
        <valueSetUri value="http://hl7.org/fhir/v3/ActReason" />
      </binding>
    </element>
    <element id="Consent.except.purpose.code">
      <path value="Consent.except.purpose.code" />
      <min value="1" />
      <fixedCode value="TREAT" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.purpose.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Consent.except.purpose.display" />
      <min value="1" />
      <fixedString value="treatment" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.class">
      <path value="Consent.except.class" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.class.system">
      <path value="Consent.except.class.system" />
      <min value="1" />
      <fixedUri value="urn:ietf:rfc:3986" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.class.code">
      <path value="Consent.except.class.code" />
      <min value="1" />
      <fixedCode value="https://ehealthontario.ca/API/FHIR/Medications" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.except.class.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Consent.except.class.display" />
      <min value="1" />
      <fixedString value="Ontario Medications" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>