<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="mitz-consent-migrate" />
  <language value="nl-NL" />
  <url value="http://vzvz.nl/fhir/otv/StructureDefinition/mitz-consent-migrate" />
  <version value="4.0.0-beta.1" />
  <name value="MitzConsentMigrate" />
  <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="This profile is used to migrate local consents to the Mitz registry" />
  <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://vzvz.nl/fhir/otv/StructureDefinition/mitz-base-consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent.status">
      <path value="Consent.status" />
      <fixedCode value="active" />
    </element>
    <element id="Consent.policyRule">
      <path value="Consent.policyRule" />
      <comment value="PolicyRule is required therefore a fixed value to indicate the Mitz connector as provider of these consents" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://vzvz.nl/fhir/otv/CodeSystem/toestemmingbron" />
          <code value="MC" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Consent.provision.actor:raadplegend">
      <path value="Consent.provision.actor" />
      <sliceName value="raadplegend" />
      <definition value="Consulting providers. Only applicable in migrations where consent is explicitly limited to a specific group of providers." />
      <comment value="Add a contained organization with a type set to the category of providers that is allowed" />
    </element>
    <element id="Consent.provision.purpose">
      <path value="Consent.provision.purpose" />
      <short value="Kind of treatment" />
      <comment value="Fixed value TREAT, because a migration is never in case of emergency" />
      <fixedCoding>
        <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason" />
        <code value="TREAT" />
      </fixedCoding>
    </element>
    <element id="Consent.provision.code">
      <path value="Consent.provision.code" />
      <binding>
        <strength value="required" />
        <valueSet value="http://vzvz.nl/fhir/otv/ValueSet/gegevenscategorie" />
      </binding>
    </element>
  </differential>
</StructureDefinition>