<?xml version=“1.0” encoding=“UTF-8”?><Encounter xmlns=“hl7.org/fhir”>

<id value="emerg"/>
<text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml">Emergency visit that escalated into inpatient patient @example</div>
</text>
<status value="in-progress"/>
<statusHistory>
        <status value="arrived"/>
        <period>
                <start value="2017-02-01T07:15:00+10:00"/>
                <end value="2017-02-01T07:35:00+10:00"/>
        </period>
</statusHistory>
<statusHistory>
        <status value="triaged"/>
        <period>
                <start value="2017-02-01T07:35:00+10:00"/>
                <end value="2017-02-01T08:45:00+10:00"/>
        </period>
</statusHistory>
<statusHistory>
        <status value="in-progress"/>
        <period>
                <start value="2017-02-01T08:45:00+10:00"/>
                <end value="2017-02-01T12:15:00+10:00"/>
        </period>
</statusHistory>
<statusHistory>
        <status value="onleave"/>
        <period>
                <start value="2017-02-01T12:15:00+10:00"/>
                <end value="2017-02-01T12:45:00+10:00"/>
        </period>
</statusHistory>
<statusHistory>
        <status value="in-progress"/>
        <period>
                <start value="2017-02-01T12:45:00+10:00"/>
        </period>
</statusHistory>
<class>
        <system value="http://hl7.org/fhir/v3/ActCode"/>
        <code value="IMP"/>
        <display value="inpatient encounter"/>
</class>
<classHistory>
        <class>
                <system value="http://hl7.org/fhir/v3/ActCode"/>
                <code value="EMER"/>
                <display value="emergency"/>
        </class>
        <period>
                <start value="2017-02-01T07:15:00+10:00"/>
                <end value="2017-02-01T09:27:00+10:00"/>
        </period>
</classHistory>
<classHistory>
        <class>
                <system value="http://hl7.org/fhir/v3/ActCode"/>
                <code value="IMP"/>
                <display value="inpatient encounter"/>
        </class>
        <period>
                <start value="2017-02-01T09:27:00+10:00"/>
        </period>
</classHistory>
<subject>
        <reference value="Patient/example"/>
</subject>
<period>
        <start value="2017-02-01T07:15:00+10:00"/>
</period>
<hospitalization>
        <admitSource>
                <coding>
                        <system value="http://hl7.org/fhir/admit-source"/>
                        <code value="emd"/>
                        <display value="From accident/emergency department"/>
                </coding>
        </admitSource>
</hospitalization>
<location>
        <location>
                <display value="Emergency Waiting Room"/>
        </location>
        <status value="active"/>
        <period>
                <start value="2017-02-01T07:15:00+10:00"/>
                <end value="2017-02-01T08:45:00+10:00"/>
        </period>
</location>
<location>
        <location>
                <display value="Emergency"/>
        </location>
        <status value="active"/>
        <period>
                <start value="2017-02-01T08:45:00+10:00"/>
                <end value="2017-02-01T09:27:00+10:00"/>
        </period>
</location>
<location>
        <location>
                <display value="Ward 1, Room 42, Bed 1"/>
        </location>
        <status value="active"/>
        <period>
                <start value="2017-02-01T09:27:00+10:00"/>
                <end value="2017-02-01T12:15:00+10:00"/>
        </period>
</location>
<location>
        <location>
                <display value="Ward 1, Room 42, Bed 1"/>
        </location>
        <status value="reserved"/>
        <period>
                <start value="2017-02-01T12:15:00+10:00"/>
                <end value="2017-02-01T12:45:00+10:00"/>
        </period>
</location>
<location>
        <location>
                <display value="Ward 1, Room 42, Bed 1"/>
        </location>
        <status value="active"/>
        <period>
                <start value="2017-02-01T12:45:00+10:00"/>
        </period>
</location>

</Encounter>