STU 3 Candidate

This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). 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: HSPC-opencounter - XML

HSPC-opencounter

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="hspc-opencounter"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">to do</div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter"/>
  <name value="HSPC-Outpatient Encounter"/>
  <status value="draft"/>
  <publisher value="HSPC"/>
  <contact>
    <telecom>
      <system value="other"/>
      <value value="http://healthcaresoa.org"/>
    </telecom>
  </contact>
  <date value="2015-12-30"/>
  <description value="The HSPC Outpatient Encounter profile, specifically for outpatient class of encounter"/>
  <fhirVersion value="1.4.0"/>
  <mapping>
    <identity value="qdm"/>
    <uri value="http://www.healthit.gov/quality-data-model"/>
    <name value="Quality Data Model"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <baseType value="Encounter"/>
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/qicore-encounter"/>
  <derivation value="constraint"/>
  <snapshot>
    <element>
      <path value="Encounter"/>
      <name value="HSPC-opencounter"/>
      <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>
      <mapping>
        <identity value="qdm"/>
        <map value="Patient Characteristic"/>
      </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="Resource.id"/>
        <min value="0"/>
        <max value="*"/>
      </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="Resource.meta"/>
        <min value="0"/>
        <max value="*"/>
      </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="Resource.implicitRules"/>
        <min value="0"/>
        <max value="*"/>
      </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="Resource.language"/>
        <min value="0"/>
        <max value="*"/>
      </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="DomainResource.text"/>
        <min value="0"/>
        <max value="*"/>
      </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="DomainResource.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="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </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="DomainResource.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"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </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="DomainResource.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.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsconfidentiality"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values that describe the level of confidentiality for the patient encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0907"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-hospitalService"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The particular healthcare specialty or care group responsible for the care of the patient
         during the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-practitioner-providerPractitionerSpecialty"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-VipLevel"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe the sensitivity level of a patient's information"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-hspc-viplevel"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AmbulatoryStatus"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe a patient's current level of ability to ambulate."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0009"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationMode"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe various means of transportation used to leave a location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-departureTransportMode"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationMode"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe various means of transportation used to arrive at a location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-arrivalTransportMode"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AdmitMedicationId"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-DischargeMedicationId"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AdministrativeEncounterId"/>
      </type>
    </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="DomainResource.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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </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="Element.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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary 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>
      <fixedCode value="outpatient"/>
      <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 level of the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-encounterPriority"/>
        </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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.participant.extension"/>
      <name value="ProviderService"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ProviderService"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that represent the particular specialty or practice group that a provider is
         affiliated with for the given encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-practitioner-providerPractitionerSpecialty"/>
        </valueSetReference>
      </binding>
    </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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary 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="preferred"/>
        <description value="A set of codes that are used to describe how an entity participates in an encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-ParticipationType"/>
        </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"/>
      <name value="LengthOfStay"/>
      <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.length.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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.length.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="Element.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.length.value"/>
      <short value="Numerical value (with implicit precision)"/>
      <definition value="The value of the measured amount. The value includes an implicit precision in the presentation
       of the value."/>
      <comments value="The implicit precision in the value should always be honored. Monetary values have their
       own rules for handling precision (refer to standard accounting text books)."/>
      <requirements value="Precision is handled implicitly in almost all cases of measurement."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Quantity.value"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="decimal"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="SN.2  / CQ - N/A"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.length.comparator"/>
      <short value="&lt; | &lt;= | &gt;= | &gt; - how to understand the value"/>
      <definition value="How the value should be understood and represented - whether the actual value is greater
       or less than the stated value due to measurement issues; e.g. if the comparator is &quot;&lt;&quot;
       , then the real value is &lt; stated value."/>
      <comments value="This is labeled as &quot;Is Modifier&quot; because the comparator modifies the interpretation
       of the value significantly. If there is no comparator, then there is no modification of
       the value."/>
      <requirements value="Need a framework for handling measures where the value is &lt;5ug/L or &gt;400mg/L due
       to the limitations of measuring methodology."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Quantity.comparator"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="If there is no comparator, then there is no modification of the value"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="How the Quantity should be understood and represented."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/quantity-comparator"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="SN.1  / CQ.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="IVL properties"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.length.unit"/>
      <short value="Unit representation"/>
      <definition value="A human-readable form of the unit."/>
      <requirements value="There are many representations for units of measure and in many contexts, particular representations
       are fixed and required. I.e. mcg for micrograms."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Quantity.unit"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="(see OBX.6 etc.) / CQ.2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="PQ.unit"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.length.system"/>
      <short value="System that defines coded unit form"/>
      <definition value="The identification of the system that provides the coded form of the unit."/>
      <requirements value="Need to know the system that defines the coded form of the unit."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Quantity.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://unitsofmeasure.org"/>
      <condition value="qty-3"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="(see OBX.6 etc.) / CQ.2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CO.codeSystem, PQ.translation.codeSystem"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.length.code"/>
      <short value="Coded form of the unit"/>
      <definition value="A computer processable form of the unit in some unit representation system."/>
      <comments value="The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or
       ISO 4217 for currency.  The context of use may additionally require a code from a particular
       system."/>
      <requirements value="Need a computable form of the unit that is fixed across all forms. UCUM provides this
       for quantities, but SNOMED CT provides many units of interest."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Quantity.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <fixedCode value="d"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="(see OBX.6 etc.) / CQ.2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="PQ.code, MO.currency, PQ.translation.code"/>
      </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="example"/>
        <description value="A set of codes that describe why an act was performed"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-encounterReason"/>
        </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"/>
      <name value="VisitDiagnosis"/>
      <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/qicore-condition"/>
      </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.indication.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="Resource.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.indication.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="Resource.meta"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.indication.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="Resource.implicitRules"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="Encounter.indication.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="Resource.language"/>
        <min value="0"/>
        <max value="*"/>
      </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.indication.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="DomainResource.text"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.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="DomainResource.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.indication.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.indication.extension"/>
      <name value="criticality"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/condition-criticality"/>
      </type>
      <binding>
        <strength value="example"/>
        <description value="Indicates the potential impact of the condition"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-condition-criticality"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qidam"/>
        <map value="ManifestedSymptom.criticality"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.extension"/>
      <name value="bodySiteInstance"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-bodysite"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="Encounter.indication.extension"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsprimaryIndicator"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.indication.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="DomainResource.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.indication.identifier"/>
      <short value="External Ids for this condition"/>
      <definition value="This records identifiers associated with this condition that are defined by business processes
       and/or used to refer to it when a direct URL reference to the resource itself is not appropriate
       (e.g. in CDA documents, or in written / printed documentation)."/>
      <requirements value="Need to allow connection to a wider workflow."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Condition.identifier"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.patient"/>
      <short value="Who has the condition?"/>
      <definition value="Indicates the patient who the condition record is associated with."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Condition.patient"/>
        <min value="1"/>
        <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.indication.encounter"/>
      <short value="Encounter when condition first asserted"/>
      <definition value="Encounter during which the condition was first asserted."/>
      <comments value="This record indicates the encounter this particular record is associated with.  In the
       case of a &quot;new&quot; diagnosis reflecting ongoing/revised information about the condition,
       this might be distinct from the first encounter in which the underlying condition was
       first &quot;known&quot;."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.encounter"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-encounter"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="PV1-19 (+PV1-54)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="context"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.asserter"/>
      <short value="Person who asserts this condition"/>
      <definition value="Individual who is making the condition statement."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.asserter"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="REL-7.1 identifier + REL-7.12 type code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=AUT].role"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.author"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.dateRecorded"/>
      <short value="When first entered"/>
      <definition value="A date, when  the Condition statement was documented."/>
      <comments value="The Date Recorded represents the date when this particular Condition record was created
       in the EHR, not the date of the most recent update in terms of when severity, abatement,
       etc. were specified.  The date of the last record modification can be retrieved from the
       resource metadata."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.dateRecorded"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="date"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="REL-11"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=AUT].time"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="when.recorded"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.code"/>
      <short value="Identification of the condition, problem or diagnosis"/>
      <definition value="Identification of the condition, problem or diagnosis."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Condition.code"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="The code for the condition"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-problem"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".value"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="what"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="primary code"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.category"/>
      <short value="complaint | symptom | finding | diagnosis"/>
      <definition value="A category assigned to the condition."/>
      <comments value="The categorization is often highly contextual and may appear poorly differentiated or
       not very useful in other contexts."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.category"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="A category assigned to the condition."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/condition-category"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="'problem' if from PRB-3. 'diagnosis' if from DG1 segment in PV1 message"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.clinicalStatus"/>
      <short value="active | relapse | remission | resolved"/>
      <definition value="The clinical status of the condition."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.clinicalStatus"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="The clinical status of the condition or diagnosis."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/condition-clinical"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-14 / DG1-6"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.verificationStatus"/>
      <short value="provisional | differential | confirmed | refuted | entered-in-error | unknown"/>
      <definition value="The verification status to support the clinical status of the condition."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Condition.verificationStatus"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="The verification status to support or decline the clinical status of the condition or
         diagnosis."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/condition-ver-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-13"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code (pre or post-coordinated in)  Can use valueNegationInd for refuted"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.severity"/>
      <short value="Subjective severity of condition"/>
      <definition value="A subjective assessment of the severity of the condition as evaluated by the clinician."/>
      <comments value="Coding of the severity with a terminology is preferred, where possible."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.severity"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="A subjective assessment of the severity of the condition as evaluated by the clinician."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/condition-severity"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-26 / ABS-3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="Can be pre/post-coordinated into value.  Or ./inboundRelationship[typeCode=SUBJ].source[classCode=OB
        S, moodCode=EVN, code=&quot;severity&quot;].value"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="grade"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="severity"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.onset[x]"/>
      <short value="Estimated or actual date,  date-time, or age"/>
      <definition value="Estimated or actual date or date-time  the condition began, in the opinion of the clinician."/>
      <comments value="Age is generally used when the patient reports an age at which the Condition began to
       occur."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.onset[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Age"/>
      </type>
      <type>
        <code value="Period"/>
      </type>
      <type>
        <code value="Range"/>
      </type>
      <type>
        <code value="string"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-16"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime.low or .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN,
         code=&quot;age at onset&quot;].value"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="when.init"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="start datetime"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.abatement[x]"/>
      <short value="If/when in resolution/remission"/>
      <definition value="The date or estimated date that the condition resolved or went into remission. This is
       called &quot;abatement&quot; because of the many overloaded connotations associated with
       &quot;remission&quot; or &quot;resolution&quot; - Conditions are never really resolved,
       but they can abate."/>
      <comments value="There is no explicit distinction between resolution and remission because in many cases
       the distinction is not clear. Age is generally used when the patient reports an age at
       which the Condition abated.  If there is no abatement element, it is unknown whether the
       condition has resolved or entered remission; applications and users should generally assume
       that the condition is still valid."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.abatement[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Age"/>
      </type>
      <type>
        <code value="boolean"/>
      </type>
      <type>
        <code value="Period"/>
      </type>
      <type>
        <code value="Range"/>
      </type>
      <type>
        <code value="string"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime.high or .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN,
         code=&quot;age at remission&quot;].value or .inboundRelationship[typeCode=SUBJ]source[classCode=CONC
        , moodCode=EVN].status=completed"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="when.done"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="stop datetime"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.stage"/>
      <short value="Stage/grade, usually assessed formally"/>
      <definition value="Clinical stage or grade of a condition. May include formal severity assessments."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.stage"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="con-1"/>
        <severity value="error"/>
        <human value="Stage SHALL have summary or assessment"/>
        <expression value="summary or assessment"/>
        <xpath value="exists(f:summary) or exists(f:assessment)"/>
      </constraint>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="./inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&quot;stage/grade&quot
        ;]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.stage.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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.stage.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="Element.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.indication.stage.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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.stage.summary"/>
      <short value="Simple summary (disease specific)"/>
      <definition value="A simple summary of the stage such as &quot;Stage 3&quot;. The determination of the stage
       is disease-specific."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.stage.summary"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <condition value="con-1"/>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="Codes describing condition stages (e.g. Cancer stages)."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/condition-stage"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="PRB-14"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".value"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.stage.assessment"/>
      <short value="Formal record of assessment"/>
      <definition value="Reference to a formal record of the evidence on which the staging assessment is based."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Condition.stage.assessment"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/ClinicalImpression"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
      </type>
      <condition value="con-1"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".self"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.evidence"/>
      <short value="Supporting evidence"/>
      <definition value="Supporting Evidence / manifestations that are the basis on which this condition is suspected
       or confirmed."/>
      <comments value="The evidence may be a simple list of coded symptoms/manifestations, or references to observations
       or formal assessments, or both."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Condition.evidence"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="con-2"/>
        <severity value="error"/>
        <human value="evidence SHALL have code or details"/>
        <expression value="code or detail"/>
        <xpath value="exists(f:code) or exists(f:detail)"/>
      </constraint>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=SPRT].target[classCode=OBS, moodCode=EVN]"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.evidence.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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.evidence.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="Element.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.indication.evidence.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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.evidence.code"/>
      <short value="Manifestation/symptom"/>
      <definition value="A manifestation or symptom that led to the recording of this condition."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.evidence.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <condition value="con-2"/>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="Codes that describe the manifestation or symptoms of a condition."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/manifestation-or-symptom"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="[code=&quot;diagnosis&quot;].value"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.evidence.detail"/>
      <short value="Supporting information found elsewhere"/>
      <definition value="Links to other relevant information, including pathology reports."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Condition.evidence.detail"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
      <condition value="con-2"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".self"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.bodySite"/>
      <short value="Anatomical location, if relevant"/>
      <definition value="The anatomical location where this condition manifests itself."/>
      <comments value="May be a summary code, or a reference to a very precise definition of the location, or
       both."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Condition.bodySite"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="Codes describing anatomical locations. May include laterality."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/body-site"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".targetBodySiteCode"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="anatomical location site and laterality"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.indication.notes"/>
      <short value="Additional information about the Condition"/>
      <definition value="Additional information about the Condition. This is a general notes/comments entry  for
       description of the Condition, its diagnosis and prognosis."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Condition.notes"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="NTE child of PRB"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&quot;annotation&quot;]
        .value"/>
      </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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <name value="PreAdmitTestIndicator"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-PreAdmitTestInd"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <name value="ReAdmitIndicator"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ReAdmitInd"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary 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="example"/>
        <description value="The set of codes that describe where a patient came from for the current admission."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-admissionSource"/>
        </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="A set of codes that describe the kind of courtesies to be extended to the patient during
         the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-EncounterSpecialCourtesy"/>
        </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="A set of codes that describe any particular needs for a patient regarding this encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-specialArrangement"/>
        </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"/>
      <slicing>
        <discriminator value="Encounter.location.location"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <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"/>
      <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"/>
      <name value="AssignedParticipatingLocation"/>
      <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"/>
      <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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.extension"/>
      <name value="PatientArrivalStatus"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-PatientArrivalStatus"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe whether or not the patient has arrived at the specified location
         for the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-arrivalStatus"/>
        </valueSetReference>
      </binding>
    </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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary 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.location"/>
      <name value="ServiceDeliveryLocation"/>
      <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"/>
      <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="Element.id"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.location.extension"/>
      <name value="ServiceDeliveryLocationCondition"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ServiceDeliveryLocationCondition"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe the state of readiness of the encounter location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-locationCondition"/>
        </valueSetReference>
      </binding>
    </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="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary 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="HSPC-opencounter"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Encounter"/>
      </type>
      <mapping>
        <identity value="qdm"/>
        <map value="Patient Characteristic"/>
      </mapping>
    </element>
    <element>
      <path value="Encounter.encounter-reasonCancelled"/>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe why an individual's encounter has been done away with."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-reasonCancelled"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="Confidentiality"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsconfidentiality"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values that describe the level of confidentiality for the patient encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0907"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="HospitalService"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-hospitalService"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The particular healthcare specialty or care group responsible for the care of the patient
         during the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-practitioner-providerPractitionerSpecialty"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="VipLevel"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-VipLevel"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe the sensitivity level of a patient's information"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-hspc-viplevel"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="AmbulatoryStatus"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AmbulatoryStatus"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe a patient's current level of ability to ambulate."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0009"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="DepartedByTransportation"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationMode"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe various means of transportation used to leave a location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-departureTransportMode"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Confidentiality"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsconfidentiality"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values that describe the level of confidentiality for the patient encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0907"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="TransportationDescription"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationDescription"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="TransportPriority"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionspriority"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe the urgency level."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-transportPriority"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Period"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-Period"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="ArrivedByTransportation"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationMode"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe various means of transportation used to arrive at a location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-arrivalTransportMode"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Confidentiality"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsconfidentiality"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values that describe the level of confidentiality for the patient encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0907"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="TransportationDescription"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-TransportationDescription"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="TransportPriority"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionspriority"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe the urgency level."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-transportPriority"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.extension.extension"/>
      <name value="Period"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-Period"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="AdmitMedicationId"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AdmitMedicationId"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="DischargeMedicationId"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-DischargeMedicationId"/>
      </type>
    </element>
    <element>
      <path value="Encounter.extension"/>
      <name value="AdministrativeEncounterId"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-AdministrativeEncounterId"/>
      </type>
    </element>
    <element>
      <path value="Encounter.class"/>
      <type>
        <code value="code"/>
      </type>
      <fixedCode value="outpatient"/>
    </element>
    <element>
      <path value="Encounter.priority"/>
      <min value="0"/>
      <max value="1"/>
      <binding>
        <strength value="preferred"/>
        <description value="The priority level of the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-encounterPriority"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.participant"/>
    </element>
    <element>
      <path value="Encounter.participant.extension"/>
      <name value="ProviderService"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ProviderService"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that represent the particular specialty or practice group that a provider is
         affiliated with for the given encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-practitioner-providerPractitionerSpecialty"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.participant.type"/>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that are used to describe how an entity participates in an encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-ParticipationType"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.length"/>
      <name value="LengthOfStay"/>
      <min value="0"/>
      <max value="1"/>
    </element>
    <element>
      <path value="Encounter.length.system"/>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://unitsofmeasure.org"/>
    </element>
    <element>
      <path value="Encounter.length.code"/>
      <type>
        <code value="code"/>
      </type>
      <fixedCode value="d"/>
    </element>
    <element>
      <path value="Encounter.reason"/>
      <min value="0"/>
      <max value="*"/>
      <binding>
        <strength value="example"/>
        <description value="A set of codes that describe why an act was performed"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-encounterReason"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.indication"/>
      <name value="VisitDiagnosis"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-condition"/>
      </type>
    </element>
    <element>
      <path value="Encounter.indication.extension"/>
      <name value="VisitDiagnosisPrimaryIndicator"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsprimaryIndicator"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization"/>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <name value="PreAdmitTestIndicator"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-PreAdmitTestInd"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization.extension"/>
      <name value="ReAdmitIndicator"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ReAdmitInd"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization.admitSource"/>
      <binding>
        <strength value="example"/>
        <description value="The set of codes that describe where a patient came from for the current admission."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-admissionSource"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization.specialCourtesy"/>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe the kind of courtesies to be extended to the patient during
         the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-EncounterSpecialCourtesy"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.hospitalization.specialArrangement"/>
      <binding>
        <strength value="preferred"/>
        <description value="A set of codes that describe any particular needs for a patient regarding this encounter."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-specialArrangement"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.location"/>
      <slicing>
        <discriminator value="Encounter.location.location"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <max value="1"/>
    </element>
    <element>
      <path value="Encounter.location"/>
      <name value="AssignedParticipatingLocation"/>
      <min value="0"/>
      <max value="1"/>
    </element>
    <element>
      <path value="Encounter.location.extension"/>
      <name value="PatientArrivalStatus"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-PatientArrivalStatus"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe whether or not the patient has arrived at the specified location
         for the encounter"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-arrivalStatus"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.location"/>
      <name value="ServiceDeliveryLocation"/>
      <min value="0"/>
      <max value="1"/>
    </element>
    <element>
      <path value="Encounter.location.address"/>
    </element>
    <element>
      <path value="Encounter.location.address.extension"/>
      <name value="PrimaryIndicator"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionsprimaryIndicator"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.location.telecom"/>
    </element>
    <element>
      <path value="Encounter.location.telecom.extension"/>
      <name value="PreferenceIndicator"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-extensionspreferenceIndicator"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The set of values to indicate affirmative or negative"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v2-0136"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="Encounter.location.extension"/>
      <name value="ServiceDeliveryLocationCondition"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/hspc-opencounter-ServiceDeliveryLocationCondition"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="The codes that describe the state of readiness of the encounter location"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/hspc-locationCondition"/>
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>