<Encounter xmlns="http://hl7.org/fhir">
  <id value="encounter1" />
  <status value="finished" />
  <class>
    <system value="http://terminology.hl7.org/ValueSet/encounter-class" />
    <version value="2.0.1" />
    <code value="IMP" />
    <display value="inpatient encounter" />
    <userSelected value="false" />
  </class>
  <subject>
    <reference value="Patient/patient1" />
    <display value="John Doe" />
  </subject>
  <participant>
    <type>
      <text value="End-responsible physician" />
    </type>
    <period>
      <start value="2023-12-01T07:00:00Z" />
      <end value="2023-12-02T12:00:00Z" />
    </period>
    <individual>
      <reference value="Practitioner/practitioner1" />
      <display value="Internal Medicine Specialist" />
    </individual>
  </participant>
  <participant>
    <type>
      <text value="End-responsible physician" />
    </type>
    <period>
      <start value="2023-12-02T12:00:00Z" />
      <end value="2023-12-04T10:00:00Z" />
    </period>
    <individual>
      <reference value="Practitioner/practitioner2" />
      <display value="Intensive Care Specialist" />
    </individual>
  </participant>
  <participant>
    <type>
      <text value="End-responsible physician" />
    </type>
    <period>
      <start value="2023-12-04T10:00:00Z" />
      <end value="2023-12-05T18:00:00Z" />
    </period>
    <individual>
      <reference value="Practitioner/practitioner1" />
      <display value="Internal Medicine Specialist" />
    </individual>
  </participant>
  <period>
    <start value="2023-12-01T07:00:00Z" />
    <end value="2023-12-05T18:00:00Z" />
  </period>
  <hospitalization id="hospitalization1">
    <admitSource>
      <coding>
        <system value="http://hl7.org/fhir/ValueSet/encounter-admit-source" />
        <code value="emergency" />
        <display value="Emergency Room" />
      </coding>
    </admitSource>
    <dischargeDisposition>
      <coding>
        <system value="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition" />
        <code value="home" />
        <display value="Home" />
      </coding>
    </dischargeDisposition>
  </hospitalization>
  <location>
    <location>
      <reference value="Location/internal1" />
      <display value="Internal Medicine Ward" />
    </location>
    <physicalType>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/location-physical-type" />
        <code value="wi" />
        <display value="Ward" />
      </coding>
    </physicalType>
    <period>
      <start value="2023-12-01T07:00:00Z" />
      <end value="2023-12-02T12:00:00Z" />
    </period>
  </location>
  <location>
    <location>
      <reference value="Location/icu1" />
      <display value="ICU" />
    </location>
    <physicalType>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/location-physical-type" />
        <code value="wi" />
        <display value="Ward" />
      </coding>
    </physicalType>
    <period>
      <start value="2023-12-02T12:00:00Z" />
      <end value="2023-12-04T10:00:00Z" />
    </period>
  </location>
  <location>
    <location>
      <reference value="Location/internal1" />
      <display value="Internal Medicine Ward" />
    </location>
    <physicalType>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/location-physical-type" />
        <code value="wi" />
        <display value="Ward" />
      </coding>
    </physicalType>
    <period>
      <start value="2023-12-04T10:00:00Z" />
      <end value="2023-12-05T18:00:00Z" />
    </period>
  </location>
</Encounter>