DSTU2

This page is part of the FHIR Specification (v1.0.2: DSTU 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

StructureDefinition: QICore-Encounter - XML

QICore-Encounter

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="qicore-encounter"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">to do</div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/qicore-encounter"/>
  <name value="QICore-Encounter"/>
  <status value="draft"/>
  <publisher value="Health Level Seven International (Clinical Quality Information - QICore)"/>
  <contact>
    <telecom>
      <system value="other"/>
      <value value="http://hl7.org/special/committees/CQI"/>
    </telecom>
  </contact>
  <date value="2015-02-27"/>
  <description value="Profile of Encounter for decision support/quality metrics. Defines the core set of elements
   and extensions for quality rule and measure authors."/>
  <fhirVersion value="1.0.2"/>
  <mapping>
    <identity value="qdm"/>
    <uri value="http://www.healthit.gov/quality-data-model"/>
    <name value="Quality Data Model"/>
  </mapping>
  <kind value="resource"/>
  <constrainedType value="Encounter"/>
  <abstract value="false"/>
  <base value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
  <snapshot>
    <element>
      <path value="Encounter"/>
      <name value="QICore-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="*"/>
      <base>
        <path value="Encounter"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Encounter"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="Encounter[moodCode=EVN]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="workflow.encounter"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="Encounter, Active or Performed"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.id"/>
      <short value="Logical id of this artifact"/>
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this
       value never changes."/>
      <comments value="The only time that a resource does not have an id is when it is being submitted to the
       server using a create operation. Bundles always have an id, though it is usually a generated
       UUID."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.meta"/>
      <short value="Metadata about the resource"/>
      <definition value="The metadata about the resource. This is content that is maintained by the infrastructure.
       Changes to the content may not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition value="A reference to a set of rules that were followed when the resource was constructed, and
       which must be understood when processing the content."/>
      <comments value="Asserting this rule set restricts the content to be only understood by a limited set of
       trading partners. This inherently limits the usefulness of the data in the long term.
       However, the existing health eco-system is highly fractured, and not yet ready to define,
       collect, and exchange data in a generally computable sense. Wherever possible, implementers
       and/or specification writers should avoid using this element as much as possible."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.language"/>
      <short value="Language of the resource content"/>
      <definition value="The base language in which the resource is written."/>
      <comments value="Language is provided to support indexing and accessibility (typically, services such as
       text to speech use the language tag). The html language tag in the narrative applies 
       to the narrative. The language tag on the resource may be used to specify the language
       of other presentations generated from the data in the resource  Not all the content has
       to be in the base language. The Resource.language should not be assumed to apply to the
       narrative automatically. If a language is specified, it should it also be specified on
       the div element in the html (see rules in HTML5 for information about the relationship
       between xml:lang and the html lang attribute)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <strength value="required"/>
        <description value="A human language."/>
        <valueSetUri value="http://tools.ietf.org/html/bcp47"/>
      </binding>
    </element>
    <element>
      <path value="Encounter.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition value="A human-readable narrative that contains a summary of the resource, and may be used to
       represent the content of the resource to a human. The narrative need not encode all the
       structured data, but is required to contain sufficient detail to make it &quot;clinically
       safe&quot; for a human to just read the narrative. Resource definitions may define what
       content should be represented in the narrative to ensure clinical safety."/>
      <comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have
       a narrative."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.contained"/>
      <short value="Contained, inline Resources"/>
      <definition value="These resources do not have an independent existence apart from the resource that contains
       them - they cannot be identified independently, and nor can they have their own independent
       transaction scope."/>
      <comments value="This should never be done when the content can be identified properly, as once identification
       is lost, it is extremely difficult (and context dependent) to restore it again."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the resource. In order to make the use of extensions safe and manageable, there is
       a strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="Encounter.relatedCondition"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition"/>
      </type>
      <mapping>
        <identity value="qdm"/>
        <map value="Encounter.RelatedCondition comes indirectly from Diagnosis, Active: Ordinality in QDM.
         However, ordinality should be in the context of an encounter, which is why we added it
         to Encounter. Instead of ordinality, we added conditionRole, which is more expressive,
         and can take values such as primary, secondary, dischange, admission."/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Extension.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="condition"/>
      <short value="A condition related to this encounter"/>
      <definition value="The reference to conditions related to this encounter, aside from the primary condition."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="role"/>
      <short value="The role of the condition"/>
      <definition value="The role of the condition within this encounter, e.g. chief complaint, admission diagnosis,
       discharge diagnosis, comorbidity."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition#condition"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Extension.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition#role"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The role of the condition within this encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-encounter-condition-role"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.url"/>
      <representation value="xmlAttr"/>
      <short value="identifies the meaning of the extension"/>
      <definition value="Source of the definition for the extension code - a logical name or a URL."/>
      <comments value="The definition may point directly to a computable or human-readable definition of the
       extensibility codes, or it may be a logical URI as declared in some other specification.
       The definition should be version specific.  This will ideally be the URI for the Resource
       Profile defining the extension, with the code for the extension after a #."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Extension.url"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.valueReference"/>
      <short value="Value of extension"/>
      <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see
       Extensibility in the spec for list)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Extension.value[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="Encounter.reasonCancelled"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/>
      </type>
      <binding>
        <strength value="example"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-encounter-canceled-reason"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qdm"/>
        <map value="negation rationale"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the resource, and that modifies the understanding of the element that contains it.
       Usually modifier elements provide negation or qualification. In order to make the use
       of extensions safe and manageable, there is a strict set of governance applied to the
       definition and use of extensions. Though any implementer is allowed to define an extension,
       there is a set of requirements that SHALL be met as part of the definition of the extension.
       Applications processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </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="*"/>
      <base>
        <path value="Encounter.identifier"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <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 | arrived | in-progress | onleave | finished | cancelled"/>
      <definition value="planned | arrived | in-progress | onleave | finished | cancelled."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Encounter.status"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="Current state of the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-state"/>
        </valueSetReference>
      </binding>
      <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.statusHistory"/>
      <short value="List of past encounter statuses"/>
      <definition value="The status history permits the encounter resource to contain the status history without
       needing to read through the historical versions of the resource, or even have the server
       store them."/>
      <comments value="The current status is always found in the current version of the resource, not the status
       history."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.statusHistory"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element>
      <path value="Encounter.statusHistory.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.statusHistory.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.statusHistory.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.statusHistory.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.statusHistory.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.statusHistory.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.statusHistory.status"/>
      <short value="planned | arrived | in-progress | onleave | finished | cancelled"/>
      <definition value="planned | arrived | in-progress | onleave | finished | cancelled."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Encounter.statusHistory.status"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <strength value="required"/>
        <description value="Current state of the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-state"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.statusHistory.period"/>
      <short value="The time that the episode was in the specified status"/>
      <definition value="The time that the episode was in the specified status."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Encounter.statusHistory.period"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Period"/>
      </type>
    </element>
    <element>
      <path value="Encounter.class"/>
      <short value="inpatient | outpatient | ambulatory | emergency +"/>
      <definition value="inpatient | outpatient | ambulatory | emergency +."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.class"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="Classification of the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-class"/>
        </valueSetReference>
      </binding>
      <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="*"/>
      <base>
        <path value="Encounter.type"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="Encounter Type Value set to describe the type of encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-encounter-type"/>
        </valueSetReference>
      </binding>
      <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>
      <mapping>
        <identity value="qdm"/>
        <map value="primary code"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.priority"/>
      <short value="Indicates the urgency of the encounter"/>
      <definition value="Indicates the urgency of the encounter."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.priority"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The priority of the encounter (e.g., Urgent, Normal, etc.)"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-priority"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV2-25"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".priorityCode"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="grade"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.patient"/>
      <short value="The patient present at the encounter"/>
      <definition value="The patient present at the 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="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.patient"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-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.episodeOfCare"/>
      <short value="Episode(s) of care that this encounter should be recorded against"/>
      <definition value="Where a specific encounter should be classified as a part of a specific episode(s) of
       care this field should be used. This association can facilitate grouping of related encounters
       together for a specific purpose, such as government reporting, issue tracking, association
       via a common problem.  The association is recorded on the encounter as these are typically
       created after the episode of care, and grouped on entry rather than editing the episode
       of care to append another encounter to it (the episode of care could span years)."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.episodeOfCare"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-54, PV1-53"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="context"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.incomingReferral"/>
      <short value="The ReferralRequest that initiated this encounter"/>
      <definition value="The referral request this encounter satisfies (incoming referral)."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.incomingReferral"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-referralrequest"/>
      </type>
    </element>
    <element>
      <path value="Encounter.participant"/>
      <short value="List of participants involved in the encounter"/>
      <definition value="The list of people responsible for providing the service."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.participant"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="ROL"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=PFM]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.participant.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.participant.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.participant.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </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="*"/>
      <base>
        <path value="Encounter.participant.type"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <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.period"/>
      <short value="Period of time during the encounter participant was present"/>
      <definition value="The period of time that the specified participant was present during the encounter. These
       can overlap or be sub-sets of the overall encounters period."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.participant.period"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Period"/>
      </type>
      <mapping>
        <identity value="v2"/>
        <map value="ROL-5, ROL-6 (or maybe PRT-5)"/>
      </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"/>
      <base>
        <path value="Encounter.participant.individual"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-relatedperson"/>
      </type>
      <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.appointment"/>
      <short value="The appointment that scheduled this encounter"/>
      <definition value="The appointment that scheduled this encounter."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.appointment"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Appointment"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="SCH-1 / SCH-2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]"/>
      </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"/>
      <base>
        <path value="Encounter.period"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <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.length"/>
      <short value="Quantity of time the encounter lasted (less time absent)"/>
      <definition value="Quantity of time the encounter lasted. This excludes the time during leaves of absence."/>
      <comments value="May differ from the time the Encounter.period lasted because of leave of absence."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.length"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Duration"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="(PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".lengthOfStayQuantity"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="length of stay"/>
      </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="*"/>
      <base>
        <path value="Encounter.reason"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="Encounter Reason Value Set to describe reason for encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-encounter-reason"/>
        </valueSetReference>
      </binding>
      <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>
      <mapping>
        <identity value="qdm"/>
        <map value="reason"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication"/>
      <short value="Reason the encounter takes place (resource)"/>
      <definition value="Reason the encounter takes place, as specified using information from another resource.
       For admissions, this is the admission diagnosis. The indication will typically be a Condition
       (with other resources referenced in the evidence.detail), or a Procedure."/>
      <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="Admission diagnosis"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.indication"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
      </type>
      <mapping>
        <identity value="v2"/>
        <map value="Resources that would commonly referenced at Encounter.indication would be Condition and/or
         Procedure. These most closely align with DG1/PRB and PR1 respectively."/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=RSON].target"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="why"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization"/>
      <short value="Details about the admission to a healthcare service"/>
      <definition value="Details about the admission to a healthcare service."/>
      <comments value="An Encounter may cover more than just the inpatient stay. Contexts such as outpatients,
       community clinics, and aged care facilities are also included.  The duration recorded
       in the period of this encounter covers the entire scope of this hospitalization record."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.preAdmissionIdentifier"/>
      <short value="Pre-admission identifier"/>
      <definition value="Pre-admission identifier."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.preAdmissionIdentifier"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-5"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.origin"/>
      <short value="The location from which the patient came before admission"/>
      <definition value="The location from which the patient came before admission."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.origin"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=ORG].role"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.admitSource"/>
      <short value="From where patient was admitted (physician referral, transfer)"/>
      <definition value="From where patient was admitted (physician referral, transfer)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.admitSource"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="From where the patient was admitted."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-admit-source"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-14"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".admissionReferralSourceCode"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.admittingDiagnosis"/>
      <short value="The admitting diagnosis as reported by admitting practitioner"/>
      <definition value="The admitting diagnosis field is used to record the diagnosis codes as reported by admitting
       practitioner. This could be different or in addition to the conditions reported as reason-condition(
      s) for the encounter."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.admittingDiagnosis"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
      </type>
    </element>
    <element>
      <path value="Encounter.hospitalization.reAdmission"/>
      <short value="The type of hospital re-admission that has occurred (if any). If the value is absent,
       then this is not identified as a readmission"/>
      <definition value="Whether this hospitalization is a readmission and why if known."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.reAdmission"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <strength value="example"/>
        <description value="The reason for re-admission of this hospitalization encounter."/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-13"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="Propose at harmonization"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.dietPreference"/>
      <short value="Diet preferences reported by the patient"/>
      <definition value="Diet preferences reported by the patient."/>
      <comments value="For example a patient may request both a dairy-free and nut-free diet preference (not
       mutually exclusive)."/>
      <requirements value="Used to track patient's diet restrictions and/or preference. For a complete description
       of the nutrition needs of a patient during their stay, one should use the nutritionOrder
       resource which links to Encounter."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.dietPreference"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <strength value="example"/>
        <description value="Medical, cultural or ethical food preferences to help with catering requirements."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-diet"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-38"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=EVN, code=&quot;diet&quot;]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.specialCourtesy"/>
      <short value="Special courtesies (VIP, board member)"/>
      <definition value="Special courtesies (VIP, board member)."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.specialCourtesy"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="Special courtesies"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-special-courtesy"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-16"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".specialCourtesiesCode"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.specialArrangement"/>
      <short value="Wheelchair, translator, stretcher, etc."/>
      <definition value="Wheelchair, translator, stretcher, etc."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.specialArrangement"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="Special arrangements"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-special-arrangements"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-15 / OBR-30 / OBR-43"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".specialArrangementCode"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.destination"/>
      <short value="Location to which the patient is discharged"/>
      <definition value="Location to which the patient is discharged."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.hospitalization.destination"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-37"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=DST]"/>
      </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"/>
      <base>
        <path value="Encounter.hospitalization.dischargeDisposition"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="Discharge Disposition"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-36"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".dischargeDispositionCode"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="discharge status"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.dischargeDiagnosis"/>
      <short value="The final diagnosis given a patient before release from the hospital after all testing,
       surgery, and workup are complete"/>
      <definition value="The final diagnosis given a patient before release from the hospital after all testing,
       surgery, and workup are complete."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.hospitalization.dischargeDiagnosis"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=OUT].target[classCode=OBS, moodCode=EVN, code=ASSERTION].value"/>
      </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="*"/>
      <base>
        <path value="Encounter.location"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=LOC]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.location.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.location.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Encounter.location.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </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"/>
      <base>
        <path value="Encounter.location.location"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
      <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"/>
      <base>
        <path value="Encounter.location.status"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <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"/>
      <base>
        <path value="Encounter.location.period"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Period"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".time"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="start datetime, stop datetime"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.serviceProvider"/>
      <short value="The custodian organization of this Encounter record"/>
      <definition value="An organization that is in charge of maintaining the information of this Encounter (e.g.
       who maintains the report or the master service catalog item, etc.). This MAY be the same
       as the organization on the Patient record, however it could be different. This MAY not
       be not the Service Delivery Location's Organization."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.serviceProvider"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-organization"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-10 / PL.6  &amp; PL.1  (note: HL7 v2 definition is &quot;the treatment or type of
         surgery that the patient is scheduled to receive&quot;; seems slightly out of alignment
         with the concept name 'hospital service'. Would not trust that implementations apply this
         semantic by default)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".particiaption[typeCode=PFM].role"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.partOf"/>
      <short value="Another Encounter this encounter is part of"/>
      <definition value="Another Encounter of which this encounter is a part of (administratively or in time)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Encounter.partOf"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-encounter"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=COMP, moodCode=EVN]"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element>
      <path value="Encounter"/>
      <name value="QICore-Encounter"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Encounter"/>
      </type>
      <mapping>
        <identity value="qdm"/>
        <map value="Encounter, Active or Performed"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="Encounter.relatedCondition"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition"/>
      </type>
      <mapping>
        <identity value="qdm"/>
        <map value="Encounter.RelatedCondition comes indirectly from Diagnosis, Active: Ordinality in QDM.
         However, ordinality should be in the context of an encounter, which is why we added it
         to Encounter. Instead of ordinality, we added conditionRole, which is more expressive,
         and can take values such as primary, secondary, dischange, admission."/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Encounter.relatedCondition.condition"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition#condition"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension.valueReference"/>
      <name value="Encounter.relatedCondition.condition.valueReference"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-condition"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Encounter.relatedCondition.role"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-relatedCondition#role"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The role of the condition within this encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-encounter-condition-role"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="Encounter.reasonCancelled"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled"/>
      </type>
      <binding>
        <strength value="example"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-encounter-canceled-reason"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qdm"/>
        <map value="negation rationale"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.status"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.class"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.type"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="Encounter Type Value set to describe the type of encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-encounter-type"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qdm"/>
        <map value="primary code"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.priority"/>
      <binding>
        <strength value="preferred"/>
        <description value="The priority of the encounter (e.g., Urgent, Normal, etc.)"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-priority"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.patient"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.incomingReferral"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-referralrequest"/>
      </type>
    </element>
    <element>
      <path value="Encounter.participant"/>
    </element>
    <element>
      <path value="Encounter.participant.individual"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-relatedperson"/>
      </type>
    </element>
    <element>
      <path value="Encounter.period"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.length"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="length of stay"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.reason"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="Encounter Reason Value Set to describe reason for encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-encounter-reason"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qdm"/>
        <map value="reason"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization"/>
    </element>
    <element>
      <path value="Encounter.hospitalization.origin"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
    </element>
    <element>
      <path value="Encounter.hospitalization.admitSource"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.hospitalization.reAdmission"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.hospitalization.destination"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
    </element>
    <element>
      <path value="Encounter.hospitalization.dischargeDisposition"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="discharge status"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.dischargeDiagnosis"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.location"/>
    </element>
    <element>
      <path value="Encounter.location.location"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
    </element>
    <element>
      <path value="Encounter.location.period"/>
      <mapping>
        <identity value="qdm"/>
        <map value="start datetime, stop datetime"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.serviceProvider"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-organization"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.partOf"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-encounter"/>
      </type>
    </element>
  </differential>
</StructureDefinition>