<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="mitz-consent-request" />
  <language value="nl-NL" />
  <url value="http://vzvz.nl/fhir/otv/StructureDefinition/mitz-consent-request" />
  <version value="4.0.0-beta.1" />
  <name value="MitzConsentRequest" />
  <status value="draft" />
  <publisher value="VZVZ" />
  <contact>
    <name value="VZVZ" />
    <telecom>
      <system value="email" />
      <value value="standaardisatie@vzvz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Profile to request if consent is given for the exchange of information between the provided care providers &#xA;or to request which care providers are allowed to exchange information for this paient" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="NL" />
      <display value="Netherlands" />
    </coding>
  </jurisdiction>
  <copyright value="VZVZ" />
  <fhirVersion value="4.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.meta">
      <path value="Consent.meta" />
      <min value="1" />
    </element>
    <element id="Consent.meta.profile">
      <path value="Consent.meta.profile" />
      <comment value="The profile is required" />
      <min value="1" />
    </element>
    <element id="Consent.extension">
      <path value="Consent.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Consent.extension:regulatoryBasis">
      <path value="Consent.extension" />
      <sliceName value="regulatoryBasis" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://vzvz.nl/fhir/otv/StructureDefinition/regulatoryBasis" />
      </type>
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <fixedCode value="proposed" />
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <short value="Consent type" />
      <definition value="Type of consent given" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/consentscope" />
          <code value="patient-privacy" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <comment value="Category is required but actual data category is defined in provision.code. Therefore fixed value INFA." />
      <max value="1" />
    </element>
    <element id="Consent.category.coding">
      <path value="Consent.category.coding" />
      <fixedCoding>
        <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
        <code value="INFA" />
      </fixedCoding>
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient" />
      </type>
    </element>
    <element id="Consent.patient.reference">
      <path value="Consent.patient.reference" />
      <max value="0" />
    </element>
    <element id="Consent.patient.identifier">
      <path value="Consent.patient.identifier" />
      <min value="1" />
    </element>
    <element id="Consent.patient.identifier.system">
      <path value="Consent.patient.identifier.system" />
      <binding>
        <strength value="required" />
        <valueSet value="http://vzvz.nl/fhir/otv/ValueSet/patientidentifiers" />
      </binding>
    </element>
    <element id="Consent.policyRule">
      <path value="Consent.policyRule" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://vzvz.nl/fhir/otv/CodeSystem/toestemmingbron" />
          <code value="MITZ" />
        </coding>
      </fixedCodeableConcept>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://vzvz.nl/fhir/otv/ValueSet/policyrule-codes" />
      </binding>
    </element>
    <element id="Consent.provision.actor">
      <path value="Consent.provision.actor" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="role" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Consent.provision.actor:raadplegend">
      <path value="Consent.provision.actor" />
      <sliceName value="raadplegend" />
      <short value="Person and Organization or application requesting information" />
      <definition value="A reference to the person and organization requesting consent information in case of a care provider.&#xA;If the person requesting the consent information is the patient itself, &#xA;then the reference points to a device which contains the identifier of the application of the person.&#xA;In turn the device points to the id of the patient, with an id that is appropriate for the context." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.provision.actor:raadplegend.role">
      <path value="Consent.provision.actor.role" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://dicom.nema.org/resources/ontology/DCM" />
          <code value="110152" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Consent.provision.actor:raadplegend.reference">
      <path value="Consent.provision.actor.reference" />
      <short value="Responsible practitioner or organization" />
      <definition value="A practitionerRole containing the reference to the practitioner and the organization.&#xA;Or a reference to a device acting on behalf of a patient performing the request." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
        <targetProfile value="http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-Device" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="Consent.provision.actor:dossierhoudend">
      <path value="Consent.provision.actor" />
      <sliceName value="dossierhoudend" />
      <short value="Organization providing the information" />
      <definition value="Organization resource referring to a specific organization or specific type of organization that has the requested information.&#xA;If the request is closed, there should be an URA identifying the organization.&#xA;If the request is open, there is only a role type if the request is for a specific role type, otherwise there is no reference to an organization" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.provision.actor:dossierhoudend.role">
      <path value="Consent.provision.actor.role" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://dicom.nema.org/resources/ontology/DCM" />
          <code value="110153" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Consent.provision.actor:dossierhoudend.reference">
      <path value="Consent.provision.actor.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="Consent.provision.code">
      <path value="Consent.provision.code" />
      <definition value="Classification of the consent statement" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://vzvz.nl/fhir/otv/ValueSet/gegevenscategorie" />
      </binding>
    </element>
  </differential>
</StructureDefinition>