<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="2beb1d6c-5933-4f31-acc0-d3336b907493" />
  <text>
    <status value="empty" />
    <div xmlns="http://www.w3.org/1999/xhtml">No human-readable text provided in this case.</div>
  </text>
  <url value="http://health.gov.on.ca/sadie/fhir/StructureDefinition/TermsOfUseConsent" />
  <version value="1.0.0" />
  <name value="TermsOfUseConsent" />
  <title value="TermsOfUseConsent" />
  <status value="active" />
  <description value="This captures the user agreeing to the Program Area's Terms of Use." />
  <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" />
      <definition value="#### **_`FOR SADIE USE:  This stores the fact a user agreed to the Terms of Use policy for a Program Area`_**&#xA;&#xA;&#xA;A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time." />
    </element>
    <element id="Consent.identifier">
      <path value="Consent.identifier" />
      <max value="0" />
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <definition value="#### **_`FOR SADIE USE:  We are only capturing when they agree to the TermsOfUse so this is always active.`_**&#xA;&#xA;Indicates the current state of this consent." />
      <fixedCode value="active" />
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <definition value="#### **_`FOR SADIE USE:  This is a FHIR mandatory field.`_**&#xA;&#xA;A selector of the type of consent being presented: ADR, Privacy, Treatment, Research.  This list is now extensible." />
    </element>
    <element id="Consent.scope.coding">
      <path value="Consent.scope.coding" />
      <max value="1" />
    </element>
    <element id="Consent.scope.coding.system">
      <path value="Consent.scope.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/consentscope" />
    </element>
    <element id="Consent.scope.coding.version">
      <path value="Consent.scope.coding.version" />
      <max value="0" />
    </element>
    <element id="Consent.scope.coding.code">
      <path value="Consent.scope.coding.code" />
      <fixedCode value="patient-privacy" />
    </element>
    <element id="Consent.scope.coding.display">
      <path value="Consent.scope.coding.display" />
      <max value="0" />
    </element>
    <element id="Consent.scope.coding.userSelected">
      <path value="Consent.scope.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Consent.scope.text">
      <path value="Consent.scope.text" />
      <max value="0" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <definition value="#### **_`FOR SADIE USE:  In FHIR this is mandatory,  Fixed values have been picked for the Code and System.`_**" />
    </element>
    <element id="Consent.category.coding.system">
      <path value="Consent.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
    </element>
    <element id="Consent.category.coding.version">
      <path value="Consent.category.coding.version" />
      <max value="0" />
    </element>
    <element id="Consent.category.coding.code">
      <path value="Consent.category.coding.code" />
      <fixedCode value="INFASO" />
    </element>
    <element id="Consent.category.coding.display">
      <path value="Consent.category.coding.display" />
      <max value="0" />
    </element>
    <element id="Consent.category.coding.userSelected">
      <path value="Consent.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Consent.category.text">
      <path value="Consent.category.text" />
      <max value="0" />
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <max value="0" />
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <definition value="#### **_`FOR SADIE USE:  This is the date and time the user agreed to the terms of use.`_**&#xA;&#xA;When this  Consent was issued / created / indexed." />
      <min value="1" />
    </element>
    <element id="Consent.performer">
      <path value="Consent.performer" />
      <definition value="#### **_`FOR SADIE USE:  This is the user role that agreed to the terms of use.`_**&#xA;&#xA;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." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/FlexFormsRole" />
      </type>
    </element>
    <element id="Consent.organization">
      <path value="Consent.organization" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea" />
      </type>
    </element>
    <element id="Consent.source[x]">
      <path value="Consent.source[x]" />
      <definition value="#### **_`FOR SADIE USE:  This is the Terms of Use document they are consenting to.`_**&#xA;&#xA;The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document." />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://health.gov.on.ca/sadie/fhir/StructureDefinition/TermsOfUse" />
      </type>
    </element>
    <element id="Consent.policy">
      <path value="Consent.policy" />
      <definition value="#### **_`FOR SADIE USE:  This is a link to the Program Area's terms of use.  This refers to the a specific version of the TOU.`_**&#xA;&#xA;The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.policy.authority">
      <path value="Consent.policy.authority" />
      <max value="0" />
    </element>
    <element id="Consent.policy.uri">
      <path value="Consent.policy.uri" />
      <definition value="#### **_`FOR SADIE USE:  This is a link to the terms of use.`_**&#xA;&#xA;The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." />
      <min value="1" />
    </element>
    <element id="Consent.policyRule">
      <path value="Consent.policyRule" />
      <max value="0" />
    </element>
    <element id="Consent.verification">
      <path value="Consent.verification" />
      <max value="0" />
    </element>
    <element id="Consent.provision">
      <path value="Consent.provision" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>