<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://fhir.smart4health.eu/StructureDefinition/s4h-encounter" />
  <name value="S4hEncounter" />
  <status value="draft" />
  <date value="2022-01-12T15:58:22.7244019+00:00" />
  <publisher value="D4L data4life gGmbh" />
  <description value="Encounter profile for the Smart4Health project." />
  <copyright value="2020 D4L data4life gGmbh" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </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.identifier">
      <path value="Encounter.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.status">
      <path value="Encounter.status" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <type>
        <code value="Coding" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Coding-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.type">
      <path value="Encounter.type" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <description value="Discriminate by value set bindings in slices." />
        <rules value="open" />
      </slicing>
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.type:s4hBackPain">
      <path value="Encounter.type" />
      <sliceName value="s4hBackPain" />
      <requirements value="Type codes used for Smart4Health back pain use cases." />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="Type of S4H back pain encounter." />
        <valueSet value="http://fhir.smart4health.eu/ValueSet/s4h-encounter-type-vs" />
      </binding>
    </element>
    <element id="Encounter.subject">
      <path value="Encounter.subject" />
      <requirements value="Ensuring assignability of data and alignment with US Core and Trillium II IGs." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://fhir.smart4health.eu/StructureDefinition/s4h-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.participant">
      <path value="Encounter.participant" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.participant.type">
      <path value="Encounter.participant.type" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Encounter.participant.individual">
      <path value="Encounter.participant.individual" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Practitioner-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/PractitionerRole-uv-ips" />
      </type>
    </element>
    <element id="Encounter.period">
      <path value="Encounter.period" />
      <requirements value="Ensuring the data is relatable to other events and alignment with Trillium II IG." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode">
      <path value="Encounter.reasonCode" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonReference">
      <path value="Encounter.reasonReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
        <targetProfile value="http://fhir.smart4health.eu/StructureDefinition/s4h-observation-base" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis">
      <path value="Encounter.diagnosis" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.use">
      <path value="Encounter.diagnosis.use" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Encounter.location">
      <path value="Encounter.location" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.physicalType">
      <path value="Encounter.location.physicalType" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Encounter.serviceProvider">
      <path value="Encounter.serviceProvider" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.partOf">
      <path value="Encounter.partOf" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.smart4health.eu/StructureDefinition/s4h-encounter" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>