<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="spark1695" />
  <meta>
    <versionId value="spark2134" />
    <lastUpdated value="2015-12-22T17:22:20.547+00:00" />
  </meta>
  <url value="http://premierinc.com/fhir/StructureDefinition/tdaf-encounter" />
  <name value="TheraDoc Data Access Framework (DAF) Encounter profile" />
  <display value="TDAF-Encounter" />
  <status value="draft" />
  <publisher value="Health Level Seven International (Infrastructure and Messaging - Data Access Framework)" />
  <contact>
    <telecom>
      <system value="other" />
      <value value="http://www.healthit.gov" />
    </telecom>
  </contact>
  <date value="2014-08-21" />
  <description value="Defines constraints and extensions on the Encounter resource for use in querying and retrieving a patient's encounter related information." />
  <fhirVersion value="1.0.1" />
  <kind value="resource" />
  <constrainedType value="Encounter" />
  <abstract value="false" />
  <base value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <differential>
    <element>
      <path value="Encounter" />
      <name value="DAF-Encounter" />
      <short value="An interaction during which services are provided to the patient" />
      <definition value="An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient." />
      <alias value="Visit" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Encounter" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="Encounter[moodCode=EVN]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="workflow.encounter" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.identifier" />
      <short value="Identifier(s) by which this encounter is known" />
      <definition value="Identifier(s) by which this encounter is known." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PV1-19" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="id" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.status" />
      <short value="planned | in-progress | onleave | finished | cancelled" />
      <definition value="planned | in-progress | onleave | finished | cancelled." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="No clear equivalent in HL7 v2; active/finished could be inferred from PV1-44, PV1-45, PV2-24; inactive could be inferred from PV2-16" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="status" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.class" />
      <short value="I | O | E" />
      <definition value="inpatient | outpatient |  emergency " />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PV1-2" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=LIST].code" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="class" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.type" />
      <short value="Specific type of encounter" />
      <definition value="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." />
      <comments value="Since there are many ways to further classify encounters, this element is 0..*." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PV1-4 / PV1-18" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".code" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="class" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.patient" />
      <short value="Patient present at encounter" />
      <definition value="Patient present at encounter." />
      <comments value="While the encounter is always about the patient, the patient may not actually be known in all contexts of use." />
      <alias value="patient" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PID-3" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=SBJ]/role[classCode=PAT]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="who.focus" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.type" />
      <short value="Role of participant in encounter" />
      <definition value="Role of participant in encounter." />
      <comments value="The participant type indicates how an individual partitipates in an encounter. It includes non-practitioner participants, and for practitioners this is to describe the action type in the context of this encounter (e.g. Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to the practitioner roles which are functional roles, derived from terms of employment, education, licensing, etc." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
      <isSummary value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Role of participant in encounter" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-participant-type" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2" />
        <map value="ROL-3 (or maybe PRT-4)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".functionCode" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.individual" />
      <short value="Persons involved in the encounter other than the patient" />
      <definition value="Persons involved in the encounter other than the patient." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/daf-pract" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/daf-relatedperson" />
      </type>
      <mustSupport value="false" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="ROL-4" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".role" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="who" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.period" />
      <short value="The start and end time of the encounter" />
      <definition value="The start and end time of the encounter." />
      <comments value="If not (yet) known, the end of the Period may be omitted." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PV1-44, PV1-45" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime (low &amp; high)" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="when.done" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.period.start" />
      <short value="Starting time with inclusive boundary" />
      <definition value="The start of the period. The boundary is inclusive." />
      <comments value="If the low element is missing, the meaning is that the low boundary is not known." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <condition value="per-1" />
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="DR.1" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./low" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.period.end" />
      <short value="End time with inclusive boundary, if not ongoing" />
      <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." />
      <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" />
      <condition value="per-1" />
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="DR.2" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./high" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.reason" />
      <short value="Reason the encounter takes place (code)" />
      <definition value="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." />
      <comments value="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." />
      <alias value="Indication" />
      <alias value="Admission diagnosis" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".reasonCode" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="why" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.dischargeDisposition" />
      <short value="Category or kind of location after discharge" />
      <definition value="Category or kind of location after discharge." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="preferred" />
        <description value="Value set to describe kind of location or category of discharge." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-encounter-dischargedisposition" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2" />
        <map value="PV1-36" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".dischargeDispositionCode" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.location" />
      <short value="List of locations where the patient has been" />
      <definition value="List of locations where  the patient has been during this encounter." />
      <comments value="Virtual encounters can be recorded in the Encounter by specifying a location reference to a location of type &quot;kind&quot; such as &quot;client's home&quot; and an encounter.class = &quot;virtual&quot;." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=LOC]" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.location" />
      <short value="Location the encounter takes place" />
      <definition value="The location where the encounter takes place." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/daf-location" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PV1-3 / PV1-6 / PV1-11 / PV1-42 / PV1-43" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".role" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="where" />
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.status" />
      <short value="planned | active | reserved | completed" />
      <definition value="The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time." />
      <comments value="When the patient is no longer active at a location, then the period end date is entered, and the status may be changed to completed." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="The status of the location." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-location-status" />
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.location.period" />
      <short value="Time period during which the patient was present at the location" />
      <definition value="Time period during which the patient was present at the location." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".time" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>