<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fpar-genEncounter" />
  <url value="http://fhir.org/guides/hspc/StructureDefinition/fpar-genEncounter" />
  <name value="FPAR General Encounter Profile" />
  <status value="draft" />
  <date value="2017-05-10" />
  <publisher value="HSPC on behalf of FPAR" />
  <contact>
    <telecom>
      <system value="other" />
      <value value="http://healthcaresoa.org" />
    </telecom>
  </contact>
  <mapping>
    <identity value="qdm" />
    <uri value="http://www.healthit.gov/quality-data-model" />
    <name value="Quality Data Model" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter:fpargeneralencounter">
      <path value="Encounter" />
      <sliceName value="HSPCGeneralEncounter" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <mapping>
        <identity value="qdm" />
        <map value="Patient Characteristic" />
      </mapping>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:reasonCancelled">
      <path value="Encounter.extension" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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="ValueSet/reasonCancelled" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:confidentiality">
      <path value="Encounter.extension" />
      <sliceName value="Confidentiality" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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 id="Encounter:fpargeneralencounter.extension:hospitalservice">
      <path value="Encounter.extension" />
      <sliceName value="HospitalService" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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://fhir.org/guides/hspc/ValueSet/practitioner-providerPractitionerSpecialty" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:viplevel">
      <path value="Encounter.extension" />
      <sliceName value="VipLevel" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <binding>
        <strength value="preferred" />
        <description value="A set of codes that describe the sensitivity level of a patient's information" />
        <valueSetReference>
          <reference value="ValueSet/hspc-viplevel" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:ambulatorystatus">
      <path value="Encounter.extension" />
      <sliceName value="AmbulatoryStatus" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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 id="Encounter:fpargeneralencounter.extension:departedbytransportation">
      <path value="Encounter.extension" />
      <sliceName value="DepartedByTransportation" />
      <alias value="Departed By Transportation" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <binding>
        <strength value="preferred" />
        <description value="A set of codes that describe various means of transportation used to leave a location" />
        <valueSetReference>
          <reference value="ValueSet/departureTransportMode" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:arrivedbytransportation">
      <path value="Encounter.extension" />
      <sliceName value="ArrivedByTransportation" />
      <alias value="Arrived By Transportation" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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="ValueSet/arrivalTransportMode" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:chiefcomplaintid">
      <path value="Encounter.extension" />
      <sliceName value="ChiefComplaintId" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.extension:admitmedicationid">
      <path value="Encounter.extension" />
      <sliceName value="AdmitMedicationId" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.extension:dischargemedicationid">
      <path value="Encounter.extension" />
      <sliceName value="DischargeMedicationId" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.extension:communicationmode">
      <path value="Encounter.extension" />
      <sliceName value="CommunicationMode" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <binding>
        <strength value="preferred" />
        <description value="The set of codes that describe the means by which a patient communicates with others." />
        <valueSetReference>
          <reference value="ValueSet/communicationMode" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.extension:administrativeencounterid">
      <path value="Encounter.extension" />
      <sliceName value="AdministrativeEncounterId" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.participant.extension:providerservice">
      <path value="Encounter.participant.extension" />
      <sliceName value="ProviderService" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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://fhir.org/guides/hspc/ValueSet/practitioner-providerPractitionerSpecialty" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.participant.individual">
      <path value="Encounter.participant.individual" />
      <short value="Persons involved in the encounter other than the patient" />
      <definition value="Persons involved in the encounter other than the patient." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.org/guides/hspc/StructureDefinition/hspc-practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/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 id="Encounter:fpargeneralencounter.period">
      <path value="Encounter.period" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Encounter.period" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Encounter:fpargeneralencounter.period.start">
      <path value="Encounter.period.start" />
      <short value="The start time for the encounter" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Encounter.period.start" />
        <min value="0" />
        <max value="1" />
      </base>
      <mapping>
        <identity value="LOINC" />
        <map value="76427-4" />
      </mapping>
    </element>
    <element id="Encounter:fpargeneralencounter.length:lengthofstay">
      <path value="Encounter.length" />
      <sliceName value="LengthOfStay" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="true" />
        <rules value="open" />
      </slicing>
      <alias value="Length of stay" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.length:lengthofstay.system">
      <path value="Encounter.length.system" />
      <type>
        <code value="uri" />
        <profile value="http://hl7.org/fhir/StructureDefinition/uri" />
      </type>
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.length:lengthofstay.code">
      <path value="Encounter.length.code" />
      <type>
        <code value="code" />
        <profile value="http://hl7.org/fhir/StructureDefinition/code" />
      </type>
      <fixedCode value="d" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.length:encounterlength">
      <path value="Encounter.length" />
      <sliceName value="EncounterLength" />
      <alias value="EncounterLength" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.length:encounterlength.system">
      <path value="Encounter.length.system" />
      <type>
        <code value="uri" />
        <profile value="http://hl7.org/fhir/StructureDefinition/uri" />
      </type>
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.length:encounterlength.code">
      <path value="Encounter.length.code" />
      <type>
        <code value="code" />
        <profile value="http://hl7.org/fhir/StructureDefinition/code" />
      </type>
      <fixedCode value="min" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.hospitalization.extension:preadmittestindicator">
      <path value="Encounter.hospitalization.extension" />
      <sliceName value="PreAdmitTestIndicator" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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 id="Encounter:fpargeneralencounter.hospitalization.admitSource">
      <path value="Encounter.hospitalization.admitSource" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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://fhir.org/guides/hspc/ValueSet/admissionSource" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.hospitalization.dietPreference">
      <path value="Encounter.hospitalization.dietPreference" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <binding>
        <strength value="preferred" />
        <description value="A set of codes that describe the kind of nutrition to be supplied to the patient." />
        <valueSetReference>
          <reference value="http://fhir.org/guides/hspc/ValueSet/dietType" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.hospitalization.specialArrangement">
      <path value="Encounter.hospitalization.specialArrangement" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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://fhir.org/guides/hspc/ValueSet/specialArrangement" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.location">
      <path value="Encounter.location" />
      <short value="List of locations where the patient has been" />
      <definition value="List of locations where  the patient has been during this encounter." />
      <comment 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="*" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=LOC]" />
      </mapping>
    </element>
    <element id="Encounter:fpargeneralencounter.location:assignedparticipatinglocation">
      <path value="Encounter.location" />
      <sliceName value="AssignedParticipatingLocation" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <alias value="AssignedParticipatingLocation" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.location:assignedparticipatinglocation.extension:patientarrivalstatus">
      <path value="Encounter.location.extension" />
      <sliceName value="PatientArrivalStatus" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <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="ValueSet/arrivalStatus" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.location:assignedparticipatinglocation.location">
      <path value="Encounter.location.location" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.location:servicedeliverylocation">
      <path value="Encounter.location" />
      <sliceName value="ServiceDeliveryLocation" />
      <alias value="ServiceDeliveryLocationCondition" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Encounter:fpargeneralencounter.location:servicedeliverylocation.extension:servicedeliverylocationcondition">
      <path value="Encounter.location.extension" />
      <sliceName value="ServiceDeliveryLocationCondition" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <binding>
        <strength value="preferred" />
        <description value="The codes that describe the state of readiness of the encounter location" />
        <valueSetReference>
          <reference value="ValueSet/locationCondition" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Encounter:fpargeneralencounter.location:servicedeliverylocation.location">
      <path value="Encounter.location.location" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
  </differential>
</StructureDefinition>