<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="zib-LegalSituation-LegalStatus" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/zib-LegalSituation-LegalStatus" />
  <name value="ZibLegalSituationLegalStatus" />
  <title value="HCIM LegalSituation LegalStatus" />
  <status value="draft" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="email" />
      <value value="info@nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="A Condition resource as defined by the Dutch Health and Care Information models (Dutch: Zorginformatiebouwsteen or ZIB) LegalSituation 2.0(2020), implementing the LegalStatus concept of the HCIM.&#xD;&#xA;&#xD;&#xA;A legal situation can concern a legal status and/or representation.&#xD;&#xA;&#xD;&#xA;The legal status indicates the basis on which the patient is staying in a healthcare organization. This can be either voluntary or involuntary, however the legal status is always determined by a judge.&#xD;&#xA;&#xD;&#xA;Representation is important in situations where a person is legally not competent to give permission and/or factually (partly) incapable of doing so. A representative supports and takes decisions in the interest of the representee when they cannot do so themselves (temporarily or permanently)." />
  <purpose value="Health professionals must be aware of the existence of a legal status or representation because this in part determines what type of care can be provided to the patient. For example, a supporting legal status can be required for using freedom restricting interventions. For a mentally incompetent patient, it must be clear that there is a representative for further decision-making: in this case, the health professional should follow the decision of the representative of the mentally incompetent patient, unless this is incompatible with the care of a good health professional." />
  <copyright value="CC0" />
  <fhirVersion value="3.0.2" />
  <mapping>
    <identity value="zib-legalsituation-v2.0-2020EN" />
    <uri value="https://zibs.nl/wiki/LegalSituation-v2.0(2020EN)" />
    <name value="HCIM LegalSituation-v2.0(2020EN)" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Condition" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Condition" />
  <derivation value="constraint" />
  <differential>
    <element id="Condition">
      <path value="Condition" />
      <short value="LegalSituation" />
      <comment value="HCIM LegalSituation is implemented using two profiles: this profile implements the LegalStatus concept of the HCIM, while &lt;http://nictiz.nl/fhir/StructureDefinition/zib-LegalSituation-Representation&gt; represents the Representation concept of the HCIM." />
      <alias value="JuridischeSituatie" />
      <mapping>
        <identity value="zib-legalsituation-v2.0-2020EN" />
        <map value="NL-CM:7.17.1" />
        <comment value="LegalSituation" />
      </mapping>
    </element>
    <element id="Condition.clinicalStatus">
      <path value="Condition.clinicalStatus" />
      <comment value="HCIM concept DateStop (NL-CM:7.17.4) is partially represented by this element (together with `Condition.abatementDateTime`). When DateStop is populated and in the past, this element is expected to be _inactive_, otherwise it is expected to be _active_." />
      <mapping>
        <identity value="zib-legalsituation-v2.0-2020EN" />
        <map value="NL-CM:7.17.4" />
        <comment value="DateStop (partial representation)" />
      </mapping>
    </element>
    <element id="Condition.category">
      <path value="Condition.category" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Condition.category:legalStatusCode">
      <path value="Condition.category" />
      <sliceName value="legalStatusCode" />
      <min value="1" />
      <max value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://snomed.info/sct" />
          <code value="303186005" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Condition.code">
      <path value="Condition.code" />
      <definition value="The legal status that applies to the patient. The legal status indicates the basis on which the patient is staying in a healthcare organization. This can be either voluntary or involuntary, however the legal status is always determined by a judge. A patient can also receive healthcare based on a forensic status." />
      <alias value="JuridischeStatus" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="JuridischeStatusCodelijst" />
        <valueSetReference>
          <reference value="http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.7.17.1--20200901000000" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="zib-legalsituation-v2.0-2020EN" />
        <map value="NL-CM:7.17.2" />
        <comment value="LegalStatus" />
      </mapping>
    </element>
    <element id="Condition.subject">
      <path value="Condition.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
      </type>
    </element>
    <element id="Condition.onset[x]:onsetDateTime">
      <path value="Condition.onsetDateTime" />
      <sliceName value="onsetDateTime" />
      <short value="DateStart" />
      <definition value="The date on which the legal situation of the patient starts." />
      <alias value="DatumAanvang" />
      <type>
        <code value="dateTime" />
      </type>
      <mapping>
        <identity value="zib-legalsituation-v2.0-2020EN" />
        <map value="NL-CM:7.17.3" />
        <comment value="DateStart" />
      </mapping>
    </element>
    <element id="Condition.abatement[x]:abatementDateTime">
      <path value="Condition.abatementDateTime" />
      <sliceName value="abatementDateTime" />
      <short value="DateStop" />
      <definition value="The date on which the legal situation of the patient ends." />
      <alias value="DatumEinde" />
      <type>
        <code value="dateTime" />
      </type>
      <mapping>
        <identity value="zib-legalsituation-v2.0-2020EN" />
        <map value="NL-CM:7.17.4" />
        <comment value="DateStop" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>