<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="0175c4e8-6286-4a98-a433-7dfa28b04214" />
  <meta>
    <lastUpdated value="2025-10-30T18:10:21.4346106+00:00" />
  </meta>
  <url value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Consent" />
  <version value="2.0.0" />
  <name value="ConsentV2" />
  <status value="active" />
  <date value="2024-04-30T16:33:59.6728098+00:00" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Consent" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent">
      <path value="Consent" />
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="If consent performer is relatedPerson, provision purpose code MUST be &quot;SUPNWK&quot;" />
        <expression value="performer.resolve().meta.profile.contains('RelatedPerson') implies provision.purpose[0].code='SUPNWK'" />
      </constraint>
    </element>
    <element id="Consent.meta">
      <path value="Consent.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.meta.profile">
      <path value="Consent.meta.profile" />
      <comment value="#### **_` FOR PCOI USAGE: The meta.profile = http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Consent|2.0.0 `_** &#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.identifier">
      <path value="Consent.identifier" />
      <definition value="Unique identifier for this copy of the Consent Statement.&#xD;&#xA;eHealth Ontario and Implementers will work together to define the value passed in this field, if any." />
      <comment value="This identifier 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.&#xD;&#xA;TBD if an identifier is necessary; this field can be used to store an identifier from the submitting system for reconciliation. DICS requires a msid from the Message Header (this value can come from the client, or could be HIAL/Gateway-assigned). CDR uses msgid from the SOAP Header &lt;wsa:MessageID&gt; from the SOAP request msg. CMTA or the gateway would need to turn/store this ID for future retrieval/reference." />
      <mustSupport value="false" />
    </element>
    <element id="Consent.identifier.use">
      <path value="Consent.identifier.use" />
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/identifier-use" />
      </binding>
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <definition value="Indicates the current state of this consent.&#xD;&#xA;For consent overrides, this value will be fixed to &quot;active&quot;." />
      <fixedCode value="active" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1" />
      </binding>
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.scope.coding">
      <path value="Consent.scope.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.scope.coding.system">
      <path value="Consent.scope.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/consentscope" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.scope.coding.code">
      <path value="Consent.scope.coding.code" />
      <min value="1" />
      <fixedCode value="patient-privacy" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.scope.coding.display">
      <path value="Consent.scope.coding.display" />
      <min value="1" />
      <fixedString value="Privacy Consent" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <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" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
      <mustSupport value="true" />
    </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">
      <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" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Patient" />
      </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.performer">
      <path value="Consent.performer" />
      <definition value="Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.&#xD;&#xA;Only Patient and RelatedPerson are in the scope of the current release. Practitioner-initiated Consent Override" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Patient" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-RelatedPerson" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Practitioner" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.performer.reference">
      <path value="Consent.performer.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.organization">
      <path value="Consent.organization" />
      <definition value="The organization that manages the consent, and the framework within which it is executed.&#xD;&#xA;For PCOI, this captures the facility name and identifier of the &quot;Under Authority Of&quot; organization." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Organization" />
      </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="http://www.ontario.ca" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision">
      <path value="Consent.provision" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.type">
      <path value="Consent.provision.type" />
      <min value="1" />
      <fixedCode value="permit" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-provision-type" />
      </binding>
    </element>
    <element id="Consent.provision.period">
      <path value="Consent.provision.period" />
      <definition value="The timeframe in this rule is valid.&#xD;&#xA;&#xD;&#xA;This field is optional and will be ignored for processing in the current PCOI implementation. The consent override duration will be processed based on the time of receipt of the FHIR Consent resource, and not based on the payload's Consent.dateTime value (to prevent unintended behaviour based on incorrect payload dateTime)." />
    </element>
    <element id="Consent.provision.actor">
      <path value="Consent.provision.actor" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.role">
      <path value="Consent.provision.actor.role" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.role.coding">
      <path value="Consent.provision.actor.role.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.role.coding.system">
      <path value="Consent.provision.actor.role.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.role.coding.code">
      <path value="Consent.provision.actor.role.coding.code" />
      <min value="1" />
      <fixedCode value="IRCP" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.role.coding.display">
      <path value="Consent.provision.actor.role.coding.display" />
      <min value="1" />
      <fixedString value="information recipient" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.reference">
      <path value="Consent.provision.actor.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-consent-pcoi-profile-Practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.actor.reference.reference">
      <path value="Consent.provision.actor.reference.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.action">
      <path value="Consent.provision.action" />
      <definition value="Actions controlled by this Rule.&#xD;&#xA;&#xD;&#xA;While this element may be used by some underlying lines of business (e.g. DHDR), the PCOI currently is not using this optional element. If sent, this element will not be processed by the PCOI.&#xD;&#xA;&#xD;&#xA;See comments." />
      <comment value="Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.&#xD;&#xA;&#xD;&#xA;As of FHIR R4, HL7 notes that &quot;At present, the only action in the understood and tested scope of this resource is 'read'&quot;. (yet &quot;read&quot; is not one of the sample Consent Action Codes).&#xD;&#xA;&#xD;&#xA;This element may be populated with the value &quot;use&quot;, to align with the example binding and with the current DHDR implementation, but may require additional discussion. Note that DHDR V1 and V2 used value &quot;access&quot;, while DHDR V3 used &quot;use&quot;." />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
      </binding>
    </element>
    <element id="Consent.provision.action.coding">
      <path value="Consent.provision.action.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.action.coding.system">
      <path value="Consent.provision.action.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/consentaction" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.action.coding.code">
      <path value="Consent.provision.action.coding.code" />
      <min value="1" />
      <fixedCode value="use" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.action.coding.display">
      <path value="Consent.provision.action.coding.display" />
      <min value="1" />
      <fixedString value="Use" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.purpose">
      <path value="Consent.provision.purpose" />
      <definition value="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.&#xD;&#xA;This element captures the &quot;reason for override&quot;. Ontario legislation currently allows for:&#xD;&#xA;* Express Patient Consent [PATRQT]&#xD;&#xA;* Express Substitute Decision Maker Consent [SUPNWK}&#xD;&#xA;* Risk to Safety of Patient [OVRER]&#xD;&#xA;* Risk to Safety of Third Parites [OVRTPS]&#xD;&#xA;Not all systems will allow all three reasons for override, however. Please see additional documentation for details." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/consent-pcoi-override-reason" />
      </binding>
    </element>
    <element id="Consent.provision.purpose.system">
      <path value="Consent.provision.purpose.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ActReason" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.purpose.code">
      <path value="Consent.provision.purpose.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.purpose.display">
      <path value="Consent.provision.purpose.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.class">
      <path value="Consent.provision.class" />
      <definition value="The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.&#xD;&#xA;The classes identified will indicate the Ontario EHR repository for which the Consent Override is being requested. As additional Ontario EHR respositories are onboarded to the Provincial Consent Override Interface service, the bound ValueSet will be updated to include those repositories." />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Codes representing data domains for PCOI including OH Clinical Data Foundation, and legacy repositories" />
        <valueSet value="http://ontariohealth.ca/fhir/pcoi/ValueSet/consent-content-class" />
      </binding>
    </element>
    <element id="Consent.provision.class.system">
      <path value="Consent.provision.class.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.class.code">
      <path value="Consent.provision.class.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).&#xD;&#xA;This will contain the gateway URI identifying the provincial EHR assets as a target for the consent override request" />
      <comment value="#### **_`For this release, the supported values are http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationDispense for DHDR consent override or http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-profile-DiagnosticReport for OLIS consent override`_**" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.provision.class.display">
      <path value="Consent.provision.class.display" />
      <comment value="#### **_`For this release, the supported values are &quot;DHDR&quot; for DHDR consent override or &quot;OLIS&quot; for OLIS consent override`_**" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>