<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="HdBe-Encounter" />
  <url value="https://fhir.healthdata.be/StructureDefinition/HdBe-Encounter" />
  <name value="HdBeEncounter" />
  <title value="HdBe Encounter" />
  <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="A contact is any interaction, regardless of the situation, between a patient and the healthcare professional, in which the healthcare professional has primary responsibility for diagnosing, evaluating and treating the patient’s condition and informing the patient. These can be visits, appointments or non face-to-face interactions.&#xD;&#xA;&#xD;&#xA;Contacts can be visits to the general practitioner or other practices, home visits, admissions (in hospitals, nursing homes or care homes, psychiatric institutions or convalescent homes) or other relevant contacts. This includes past and future contacts." />
  <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="HdBe-Encounter" />
    <uri value="https://fhir.healthdata.be/StructureDefinition/LogicalModel/HdBe-Encounter" />
    <name value="HdBe logical model Encounter" />
  </mapping>
  <mapping>
    <identity value="zib-encounter-v4.0.1-2020EN" />
    <uri value="https://zibs.nl/wiki/Encounter-v4.0.1(2020EN)" />
    <name value="zib Encounter-v4.0.1(2020EN)" />
  </mapping>
  <mapping>
    <identity value="HdBe-HealthProfessional" />
    <uri value="https://fhir.healthdata.be/StructureDefinition/LogicalModel/HdBe-HealthProfessional" />
    <name value="HdBe logical model HealthProfessional" />
  </mapping>
  <mapping>
    <identity value="zib-healthprofessional-v3.5-2020EN" />
    <uri value="https://zibs.nl/wiki/HealthProfessional-v3.5(2020EN)" />
    <name value="zib HealthProfessional-v3.5(2020EN)" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter">
      <path value="Encounter" />
      <short value="Encounter" />
      <alias value="Contact" />
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.1" />
        <comment value="Encounter" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter" />
      </mapping>
    </element>
    <element id="Encounter.status">
      <path value="Encounter.status" />
      <comment value="This element is implictly mapped to the concepts StartDateTime and EndDateTime. Unless the status is explicitly recorded, the following guidance applies:&#xD;&#xA;&#xD;&#xA;* When StartDateTime is in the future, `.status` will usually be set to _planned_.&#xD;&#xA;* When StartDateTime is in the past and EndDateTime is present and in the future, `.status` will usually be set to _in-progress_.&#xD;&#xA;* When EndDateTime is present and in the past, `.status` will usually be set to _finished_.&#xD;&#xA;* When EndDateTime is not present, this means it was a point-in-time encounter and `.status` will usually be set to _finished_.&#xD;&#xA;* When a system is unable to infer the status from the StartDateTime and EndDateTime, `.status` will be set to _unknown_.&#xD;&#xA;&#xD;&#xA;The _unknown_ code is not to be used to convey other statuses.  The _unknown_ code should be used when one of the statuses applies, but the authoring system doesn't know the current state of the procedure.&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.3" />
        <comment value="StartDateTime (implicit, main mapping is on `Encounter.period`)" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.StartDateTime" />
        <comment value="implicit, main mapping is on `Encounter.period`" />
      </mapping>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.4" />
        <comment value="EndDateTime (implicit, main mapping is on `Encounter.period`)" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.EndDateTime" />
        <comment value="implicit, main mapping is on `Encounter.period`" />
      </mapping>
    </element>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <short value="ContactType" />
      <definition value="The type of contact." />
      <alias value="ContactType" />
      <binding>
        <strength value="extensible" />
        <description value="Use ConceptMap ContactType-to-ActEncounterCode to translate CBB terminology to profile terminology in ValueSet ActEncounterCode." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActEncounterCode">
          <extension url="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap">
            <valueCanonical value="https://fhir.healthdata.be/ConceptMap/ContactType-to-ActEncounterCode" />
          </extension>
        </valueSet>
      </binding>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.2" />
        <comment value="ContactType" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactType" />
      </mapping>
    </element>
    <element id="Encounter.participant">
      <path value="Encounter.participant" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="individual.resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Encounter.participant:healthProfessional">
      <path value="Encounter.participant" />
      <sliceName value="healthProfessional" />
    </element>
    <element id="Encounter.participant:healthProfessional.type">
      <path value="Encounter.participant.type" />
      <short value="HealthProfessionalRole" />
      <definition value="The role the health professional fulfils in the healthcare process. For health professionals, this could be for example attender, referrer or performer." />
      <alias value="ZorgverlenerRol" />
      <max value="1" />
      <mapping>
        <identity value="zib-healthprofessional-v3.5-2020EN" />
        <map value="NL-CM:17.1.5" />
        <comment value="HealthProfessionalRole" />
      </mapping>
      <mapping>
        <identity value="HdBe-HealthProfessional" />
        <map value="HealthProfessional.HealthProfessionalRole" />
      </mapping>
    </element>
    <element id="Encounter.participant:healthProfessional.individual">
      <path value="Encounter.participant.individual" />
      <short value="ContactWith" />
      <definition value="The health professional with whom the contact took or will take place. The specialty and role of the health professional can be entered in the HealthProfessional information model." />
      <alias value="ContactMet" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.healthdata.be/StructureDefinition/pattern-HealthProfessionalReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-HealthProfessional-PractitionerRole" />
      </type>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.7" />
        <comment value="ContactWith" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactWith" />
      </mapping>
    </element>
    <element id="Encounter.period">
      <path value="Encounter.period" />
      <comment value="If only a single point in time is known for the encounter rather than a period, both `period.start` and `period.end` are populated with this value (populating just `period.start` would indicate an ongoing period)." />
    </element>
    <element id="Encounter.period.start">
      <path value="Encounter.period.start" />
      <short value="StartDateTime" />
      <definition value="The date and time at which the contact took or will take place." />
      <alias value="BeginDatumTijd" />
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.3" />
        <comment value="StartDateTime" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.StartDateTime" />
      </mapping>
    </element>
    <element id="Encounter.period.end">
      <path value="Encounter.period.end" />
      <short value="EndDateTime" />
      <definition value="The date and time at which the contact ended or will end. If the contact takes place over a period of time, this indicates the end of the period, in the case of an admission, for example." />
      <alias value="EindDatumTijd" />
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.4" />
        <comment value="EndDateTime" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.EndDateTime" />
      </mapping>
    </element>
    <element id="Encounter.reasonReference">
      <path value="Encounter.reasonReference" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Encounter.reasonReference.extension">
      <path value="Encounter.reasonReference.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Encounter.reasonReference.extension:comment">
      <path value="Encounter.reasonReference.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="Encounter.reasonReference.extension:comment.value[x]">
      <path value="Encounter.reasonReference.extension.value[x]" />
      <short value="CommentContactReason" />
      <definition value="Explanation of the reason for the contact" />
      <alias value="ToelichtingRedenContact" />
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.17" />
        <comment value="CommentContactReason" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactReason.CommentContactReason" />
      </mapping>
    </element>
    <element id="Encounter.reasonReference:problem">
      <path value="Encounter.reasonReference" />
      <sliceName value="problem" />
      <short value="Problem" />
      <definition value="The problem that is the reason for the contact." />
      <alias value="Probleem" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-Problem" />
      </type>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.6" />
        <comment value="Problem" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactReason.Problem" />
      </mapping>
    </element>
    <element id="Encounter.reasonReference:procedure">
      <path value="Encounter.reasonReference" />
      <sliceName value="procedure" />
      <short value="Procedure" />
      <definition value="The procedure carried out or will be carried out during the contact." />
      <alias value="Verrichting" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-Procedure-event" />
      </type>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.11" />
        <comment value="Procedure" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactReason.Procedure" />
      </mapping>
    </element>
    <element id="Encounter.reasonReference:deviatingResult">
      <path value="Encounter.reasonReference" />
      <sliceName value="deviatingResult" />
      <short value="DeviatingResult" />
      <definition value="A deviating result which serves as the reason for the contact." />
      <comment value="DeviatingResult is captured with a reference to the CBB LaboratoryTestResult instead of a string value as the CBB 2020 incorrectly states. This will be fixed in a future version of the CBB. At time of writing (November 2021), the proposed change can be followed in this BITS ticket: &lt;https://bits.nictiz.nl/browse/ZIB-1427&gt;." />
      <alias value="AfwijkendeUitslag" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-LaboratoryTestResult" />
      </type>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.12" />
        <comment value="DeviatingResult" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.ContactReason.DeviatingResult" />
      </mapping>
    </element>
    <element id="Encounter.hospitalization.admitSource">
      <path value="Encounter.hospitalization.admitSource" />
      <short value="Origin" />
      <definition value="Location from which the patient comes before the encounter. In most cases this will only be used when the patient is admitted." />
      <alias value="Herkomst" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://fhir.healthdata.be/ValueSet/Origin" />
      </binding>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.14" />
        <comment value="Origin" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.Origin" />
      </mapping>
    </element>
    <element id="Encounter.hospitalization.dischargeDisposition">
      <path value="Encounter.hospitalization.dischargeDisposition" />
      <short value="Destination" />
      <definition value="Location to which the patient will go after the encounter. In most cases this will only be used when the patient is discharged." />
      <alias value="Bestemming" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://fhir.healthdata.be/ValueSet/Destination" />
      </binding>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.16" />
        <comment value="Destination" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.Destination" />
      </mapping>
    </element>
    <element id="Encounter.location">
      <path value="Encounter.location" />
      <comment value="The CBB has a restricted cardinality of 0..1 for the Location concept. However, this cardianlity is propably too restricted (see &lt;https://bits.nictiz.nl/browse/ZIB-1632&gt; for discussion) and would prevent some practical use cases. Therefore, the cardinality has been left on 0..* in this profile." />
    </element>
    <element id="Encounter.location.location">
      <path value="Encounter.location.location" />
      <short value="Location" />
      <definition value="The physical location at which the contact took or will take place." />
      <alias value="Locatie" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="https://fhir.healthdata.be/StructureDefinition/HdBe-HealthcareOrganization" />
      </type>
      <mapping>
        <identity value="zib-encounter-v4.0.1-2020EN" />
        <map value="NL-CM:15.1.8" />
        <comment value="Location" />
      </mapping>
      <mapping>
        <identity value="HdBe-Encounter" />
        <map value="Encounter.Location" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>