<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="zd-consent" />
  <url value="http://zorgdomein.nl/fhir/StructureDefinition/zd-consent" />
  <name value="ZD Consent" />
  <status value="draft" />
  <date value="2018-10-12T12:00:00+01:00" />
  <publisher value="ZorgDomein" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="https://zorgdomein.nl" />
    </telecom>
    <telecom>
      <system value="email" />
      <value value="io@zorgdomein.nl" />
    </telecom>
  </contact>
  <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" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.text">
      <path value="Consent.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Consent.category:typeOfLivingWill">
      <path value="Consent.category" />
      <sliceName value="typeOfLivingWill" />
      <min value="1" />
      <max value="1" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ConsentCategory" />
        </extension>
        <strength value="extensible" />
        <description value="List of the different types of living wills." />
        <valueSetReference>
          <reference value="http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.7.15.1--20171231000000" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Consent.category:typeOfLivingWill.coding">
      <path value="Consent.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.category:typeOfLivingWill.coding.system">
      <path value="Consent.category.coding.system" />
      <min value="1" />
    </element>
    <element id="Consent.category:typeOfLivingWill.coding.code">
      <path value="Consent.category.coding.code" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>