<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="HdBe-AdvanceDirective" />
  <url value="https://fhir.healthdata.be/StructureDefinition/HdBe-AdvanceDirective" />
  <name value="HdBeAdvanceDirective" />
  <title value="HdBe AdvanceDirective" />
  <status value="draft" />
  <date value="2022-10-17T09:09:13.9562003+00:00" />
  <publisher value="Healthdata.be (Sciensano)" />
  <contact>
    <name value="Service portal – healthdata.be" />
    <telecom>
      <system value="url" />
      <value value="https://sciensano.service-now.com/sp" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="An AdvanceDirective is a verbal or written description of the patient’s wishes with regard to future medical action or end of their life. An advanceDirective is mainly used for situations in which the patient is no longer able to speak about these decisions with their healthcare professional." />
  <copyright value="Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="zib-advancedirective-v3.1.1-2020EN" />
    <uri value="https://zibs.nl/wiki/AdvanceDirective-v3.1.1(2020EN)" />
    <name value="zib AdvanceDirective-v3.1.1(2020EN)" />
  </mapping>
  <mapping>
    <identity value="HdBe-AdvanceDirective" />
    <uri value="https://fhir.healthdata.be/StructureDefinition/LogicalModel/HdBe-AdvanceDirective" />
    <name value="HdBe logical model AdvanceDirective" />
  </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" />
      <short value="AdvanceDirective" />
      <alias value="Wilsverklaring" />
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.1" />
        <comment value="AdvanceDirective" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective" />
      </mapping>
    </element>
    <element id="Consent.extension">
      <path value="Consent.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Consent.extension:disorder">
      <path value="Consent.extension" />
      <sliceName value="disorder" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.healthdata.be/StructureDefinition/ext-AdvanceDirective.Disorder" />
      </type>
    </element>
    <element id="Consent.extension:disorder.value[x]">
      <path value="Consent.extension.value[x]" />
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.Disorder" />
      </mapping>
    </element>
    <element id="Consent.extension:comment">
      <path value="Consent.extension" />
      <sliceName value="comment" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.healthdata.be/StructureDefinition/ext-Comment" />
      </type>
    </element>
    <element id="Consent.extension:comment.value[x]">
      <path value="Consent.extension.value[x]" />
      <short value="Comment" />
      <definition value="Comment on the living will: the form, such as a medallion, tattoo, etc., or where the living will can be found." />
      <alias value="Toelichting" />
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.6" />
        <comment value="Comment" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.Comment" />
      </mapping>
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <comment value="This element has no functional counterpart in the CBB and cannot be implicitly mapped to other concepts. Unless a more appropriate status is recorded, it is assumed that only _active_ Consent resources will be exchanged." />
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <comment value="At the moment of writing (02-11-2021) the _adr_ code is incorrectly removed from the ConsentScopeCodes CodeSystem (http://terminology.hl7.org/CodeSystem/consentscope). This will be corrected within the R4 release of FHIR based on this tracker item: &lt;https://jira.hl7.org/browse/FHIR-34215&gt;." />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/consentscope" />
          <code value="adr" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/consentcategorycodes" />
          <code value="acd" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <short value="LivingWillDate" />
      <definition value="The date on which the living will was recorded." />
      <alias value="WilsverklaringDatum" />
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.7" />
        <comment value="LivingWillDate" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.LivingWillDate" />
      </mapping>
    </element>
    <element id="Consent.source[x]">
      <path value="Consent.source[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Consent.source[x]:sourceAttachment">
      <path value="Consent.source[x]" />
      <sliceName value="sourceAttachment" />
      <type>
        <code value="Attachment" />
      </type>
    </element>
    <element id="Consent.source[x]:sourceAttachment.data">
      <path value="Consent.source[x].data" />
      <short value="LivingWillDocument" />
      <definition value="Scanned source document with the living will and the patient's signature, such as a PDF." />
      <alias value="WilsverklaringDocument" />
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.5" />
        <comment value="LivingWillDocument" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.LivingWillDocument" />
      </mapping>
    </element>
    <element id="Consent.policy.uri">
      <path value="Consent.policy.uri" />
      <comment value="Either `.policy` or `.policyRule` should exist following core constraint ppc-1. If no explicit value is recorded, a fallback is to populate `.policy.uri` with &lt;https://www.belgielex.be/&gt; if the advance directive is recorded following Belgian law and regulations." />
    </element>
    <element id="Consent.provision.actor">
      <path value="Consent.provision.actor" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="role" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Consent.provision.actor:representative">
      <path value="Consent.provision.actor" />
      <sliceName value="representative" />
    </element>
    <element id="Consent.provision.actor:representative.role">
      <path value="Consent.provision.actor.role" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-RoleCode" />
          <code value="RESPRSN" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Consent.provision.actor:representative.reference">
      <path value="Consent.provision.actor.reference" />
      <short value="Representative" />
      <definition value="The person who is the legal representative or is appointed as the authorized representative in the signed authorization." />
      <alias value="Vertegenwoordiger" />
      <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" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-ContactPerson" />
      </type>
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.3" />
        <comment value="Representative" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.Representative" />
      </mapping>
    </element>
    <element id="Consent.provision.code">
      <path value="Consent.provision.code" />
      <short value="LivingWillType" />
      <definition value="The type of living will." />
      <alias value="WilsverklaringType" />
      <max value="1" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://fhir.healthdata.be/ValueSet/TypeOfLivingWill" />
      </binding>
      <mapping>
        <identity value="zib-advancedirective-v3.1.1-2020EN" />
        <map value="NL-CM:7.15.2" />
        <comment value="LivingWillType" />
      </mapping>
      <mapping>
        <identity value="HdBe-AdvanceDirective" />
        <map value="AdvanceDirective.LivingWillType" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>