<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Consent" />
  <meta>
    <lastUpdated value="2019-11-01T09:29:23.356+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Foundation.Security" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="2" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="patient" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cbcc" />
  </extension>
  <url value="https://fhir.kemkes.go.id/r4/StructureDefinition/Consent" />
  <version value="4.0.1" />
  <name value="Consent" />
  <status value="draft" />
  <date value="2022-07-08T15:10:50.6856647+00:00" />
  <publisher value="Health Level Seven International (Community Based Collaborative Care)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/homehealth/index.cfm" />
    </telecom>
  </contact>
  <description value="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." />
  <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/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="Consent">
      <path value="Consent" />
      <short value="A healthcare consumer's  choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time" />
      <definition value="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." />
      <comment value="Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives." />
      <constraint>
        <key value="ppc-4" />
        <severity value="error" />
        <human value="IF Scope=adr, there must be a patient" />
        <expression value="patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()" />
        <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Consent" />
      </constraint>
      <constraint>
        <key value="ppc-5" />
        <severity value="error" />
        <human value="IF Scope=treatment, there must be a patient" />
        <expression value="patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()" />
        <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Consent" />
      </constraint>
      <constraint>
        <key value="ppc-2" />
        <severity value="error" />
        <human value="IF Scope=privacy, there must be a patient" />
        <expression value="patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()" />
        <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Consent" />
      </constraint>
      <constraint>
        <key value="ppc-3" />
        <severity value="error" />
        <human value="IF Scope=research, there must be a patient" />
        <expression value="patient.exists() or scope.coding.where(system='something' and code='research').exists().not()" />
        <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Consent" />
      </constraint>
      <constraint>
        <key value="ppc-1" />
        <severity value="error" />
        <human value="Either a Policy or PolicyRule" />
        <expression value="policy.exists() or policyRule.exists()" />
        <xpath value="exists(f:policy) or exists(f:policyRule)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Consent" />
      </constraint>
      <mapping>
        <identity value="workflow" />
        <map value="Event" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CON" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="FinancialConsent" />
      </mapping>
    </element>
    <element id="Consent.identifier">
      <path value="Consent.identifier" />
      <short value="Identifier for this record (external references)" />
      <definition value="Unique identifier for this copy of the Consent Statement." />
      <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." />
      <type>
        <code value="Identifier" />
      </type>
      <example>
        <label value="General" />
        <valueIdentifier>
          <system value="urn:ietf:rfc:3986" />
          <value value="Local eCMS identifier" />
        </valueIdentifier>
      </example>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.identifier" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <short value="draft | proposed | active | rejected | inactive | entered-in-error" />
      <definition value="Indicates the current state of this consent." />
      <comment value="This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid." />
      <requirements value="The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentState" />
        </extension>
        <strength value="required" />
        <description value="Indicates the state of the consent." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Event.status" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="HL7 Table 0498 - Consent Status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <short value="Which of the four areas this resource covers (extensible)" />
      <definition value="A selector of the type of consent being presented: ADR, Privacy, Treatment, Research.  This list is now extensible." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="Allows changes to codes based on scope selection" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentScope" />
        </extension>
        <strength value="extensible" />
        <description value="The four anticipated uses for the Consent Resource." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-scope" />
      </binding>
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <short value="Classification of the consent statement - for indexing/retrieval" />
      <definition value="A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements." />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentCategory" />
        </extension>
        <strength value="extensible" />
        <description value="A classification of the type of consents found in a consent statement." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-category" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Event.code" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="HL7 Table 0497 - Consent Type" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CNTRCT" />
      </mapping>
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <short value="Who the consent applies to" />
      <definition value="The patient/healthcare consumer to whom this consent applies." />
      <comment value="Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.subject" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Role" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject" />
      </mapping>
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <short value="When this Consent was created or indexed" />
      <definition value="When this  Consent was issued / created / indexed." />
      <comment value="This is not the time of the original consent, but the time that this statement was made or derived." />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.occurrence[x]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.recorded" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="Field 13/ Consent Decision Date" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="FinancialConsent effectiveTime" />
      </mapping>
    </element>
    <element id="Consent.performer">
      <path value="Consent.performer" />
      <short value="Who is agreeing to the policy and rules" />
      <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." />
      <comment value="Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian." />
      <alias value="consentor" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.performer" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.actor" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="Field 24/ ConsenterID" />
      </mapping>
    </element>
    <element id="Consent.organization">
      <path value="Consent.organization" />
      <short value="Custodian of the consent" />
      <definition value="The organization that manages the consent, and the framework within which it is executed." />
      <alias value="custodian" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.performer" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.witness" />
      </mapping>
    </element>
    <element id="Consent.source[x]">
      <path value="Consent.source[x]" />
      <short value="Source from which this consent is taken" />
      <definition value="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." />
      <comment value="The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id." />
      <max value="1" />
      <type>
        <code value="Attachment" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Consent" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Contract" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="Field 19 Informational Material Supplied Indicator" />
      </mapping>
    </element>
    <element id="Consent.policy">
      <path value="Consent.policy" />
      <short value="Policies covered by this consent" />
      <definition value="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="Consent.policy.authority">
      <path value="Consent.policy.authority" />
      <short value="Enforcement source for policy" />
      <definition value="Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives." />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <condition value="ppc-1" />
    </element>
    <element id="Consent.policy.uri">
      <path value="Consent.policy.uri" />
      <short value="Specific policy covered by this consent" />
      <definition value="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." />
      <comment value="This element is for discoverability / documentation and does not modify or qualify the policy rules." />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <condition value="ppc-1" />
    </element>
    <element id="Consent.policyRule">
      <path value="Consent.policyRule" />
      <short value="Regulation that this consents to" />
      <definition value="A reference to the specific base computable regulation or policy." />
      <comment value="If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource." />
      <requirements value="Might be a unique identifier of a policy set in XACML, or other rules engine." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <condition value="ppc-1" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentPolicyRule" />
        </extension>
        <strength value="extensible" />
        <description value="Regulatory policy examples." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-policy" />
      </binding>
    </element>
    <element id="Consent.verification">
      <path value="Consent.verification" />
      <short value="Consent Verified by patient or family" />
      <definition value="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person." />
      <type>
        <code value="BackboneElement" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.verification.verified">
      <path value="Consent.verification.verified" />
      <short value="Has been verified" />
      <definition value="Has the instruction been verified." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.verification.verifiedWith">
      <path value="Consent.verification.verifiedWith" />
      <short value="Person who verified" />
      <definition value="Who verified the instruction (Patient, Relative or other Authorized Person)." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
      </type>
    </element>
    <element id="Consent.verification.verificationDate">
      <path value="Consent.verification.verificationDate" />
      <short value="When consent verified" />
      <definition value="Date verification was collected." />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Consent.provision">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="provision" />
      </extension>
      <path value="Consent.provision" />
      <short value="Constraints to the base Consent.policyRule" />
      <definition value="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.provision.type">
      <path value="Consent.provision.type" />
      <short value="deny | permit" />
      <definition value="Action  to take - permit or deny - when the rule conditions are met.  Not permitted in root rule, required in all nested rules." />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentProvisionType" />
        </extension>
        <strength value="required" />
        <description value="How a rule statement is applied, such as adding additional consent or removing consent." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1" />
      </binding>
    </element>
    <element id="Consent.provision.period">
      <path value="Consent.provision.period" />
      <short value="Timeframe for this rule" />
      <definition value="The timeframe in this rule is valid." />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.provision.actor">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="provisionActor" />
      </extension>
      <path value="Consent.provision.actor" />
      <short value="Who|what controlled by this rule (or group, by role)" />
      <definition value="Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')." />
      <type>
        <code value="BackboneElement" />
      </type>
      <meaningWhenMissing value="There is no specific actor associated with the exception" />
    </element>
    <element id="Consent.provision.actor.role">
      <path value="Consent.provision.actor.role" />
      <short value="How the actor is involved" />
      <definition value="How the individual is involved in the resources content that is described in the exception." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentActorRole" />
        </extension>
        <strength value="extensible" />
        <description value="How an actor is involved in the consent considerations." />
        <valueSet value="http://hl7.org/fhir/ValueSet/security-role-type" />
      </binding>
    </element>
    <element id="Consent.provision.actor.reference">
      <path value="Consent.provision.actor.reference" />
      <short value="Resource for the actor (or group, by role)" />
      <definition value="The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers')." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </type>
    </element>
    <element id="Consent.provision.action">
      <path value="Consent.provision.action" />
      <short value="Actions controlled by this rule" />
      <definition value="Actions controlled by this Rule." />
      <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'." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <meaningWhenMissing value="all actions" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentAction" />
        </extension>
        <strength value="example" />
        <description value="Detailed codes for the consent action." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-action" />
      </binding>
    </element>
    <element id="Consent.provision.securityLabel">
      <path value="Consent.provision.securityLabel" />
      <short value="Security Labels that define affected resources" />
      <definition value="A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception." />
      <comment value="If the consent specifies a security label of &quot;R&quot; then it applies to all resources that are labeled &quot;R&quot; or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict." />
      <type>
        <code value="Coding" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="SecurityLabels" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true" />
        </extension>
        <strength value="extensible" />
        <description value="Security Labels from the Healthcare Privacy and Security Classification System." />
        <valueSet value="http://hl7.org/fhir/ValueSet/security-labels" />
      </binding>
    </element>
    <element id="Consent.provision.purpose">
      <path value="Consent.provision.purpose" />
      <short value="Context of activities covered by this rule" />
      <definition value="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule." />
      <comment value="When the purpose of use tag is on the data, access request purpose of use shall not conflict." />
      <type>
        <code value="Coding" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="PurposeOfUse" />
        </extension>
        <strength value="extensible" />
        <description value="What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse" />
      </binding>
    </element>
    <element id="Consent.provision.class">
      <path value="Consent.provision.class" />
      <short value="e.g. Resource Type, Profile, CDA, etc." />
      <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." />
      <comment value="Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere." />
      <type>
        <code value="Coding" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentContentClass" />
        </extension>
        <strength value="extensible" />
        <description value="The class (type) of information a consent rule covers." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-content-class" />
      </binding>
    </element>
    <element id="Consent.provision.code">
      <path value="Consent.provision.code" />
      <short value="e.g. LOINC or SNOMED CT code, etc. in the content" />
      <definition value="If this code is found in an instance, then the rule applies." />
      <comment value="Typical use of this is a Document code with class = CDA." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentContentCode" />
        </extension>
        <strength value="example" />
        <description value="If this code is found in an instance, then the exception applies." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-content-code" />
      </binding>
    </element>
    <element id="Consent.provision.dataPeriod">
      <path value="Consent.provision.dataPeriod" />
      <short value="Timeframe for data controlled by this rule" />
      <definition value="Clinical or Operational Relevant period of time that bounds the data controlled by this rule." />
      <comment value="This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement." />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.provision.data">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="provisionData" />
      </extension>
      <path value="Consent.provision.data" />
      <short value="Data controlled by this rule" />
      <definition value="The resources controlled by this rule if specific resources are referenced." />
      <type>
        <code value="BackboneElement" />
      </type>
      <meaningWhenMissing value="all data" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Role" />
      </mapping>
    </element>
    <element id="Consent.provision.data.meaning">
      <path value="Consent.provision.data.meaning" />
      <short value="instance | related | dependents | authoredby" />
      <definition value="How the resource reference is interpreted when testing consent restrictions." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentDataMeaning" />
        </extension>
        <strength value="required" />
        <description value="How a resource reference is interpreted when testing consent restrictions." />
        <valueSet value="http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1" />
      </binding>
    </element>
    <element id="Consent.provision.data.reference">
      <path value="Consent.provision.data.reference" />
      <short value="The actual data reference" />
      <definition value="A reference to a specific resource that defines which resources are covered by this consent." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="Consent.provision.provision">
      <path value="Consent.provision.provision" />
      <short value="Nested Exception Rules" />
      <definition value="Rules which provide exceptions to the base rule or subrules." />
      <min value="0" />
      <max value="*" />
      <contentReference value="#Consent.provision" />
    </element>
  </differential>
</StructureDefinition>