API Hub

Explore and Make use of Nationally Defined Messaging APIs

This is a HL7 FHIR server, and as you appear to be accessing this page from a web browser you are seeing a HTML version of the requested resource(s). You can also access this URL from a FHIR client as a ReSTful API call. For more details please see the HL7 FHIR specification.
<StructureDefinition xmlns="http://hl7.org/fhir">
   <id value="CareConnect-ITK-Encounter-1"></id>
   <meta>
      <lastUpdated value="2018-05-22T22:12:02.951+01:00"></lastUpdated>
   </meta>
   <text>
      <status value="generated"></status>
   </text>
   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
      <valueCode value="pa"></valueCode>
   </extension>
   <url value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Encounter-1"></url>
   <version value="1.2.0"></version>
   <name value="CareConnect-ITK-Encounter-1"></name>
   <status value="active"></status>
   <date value="2018-10-22"></date>
   <publisher value="NHS Digital"></publisher>
   <contact>
      <name value="Interoperability Team"></name>
      <telecom>
         <system value="email"></system>
         <value value="interoperabilityteam@nhs.net"></value>
      </telecom>
   </contact>
   <description value="The encounter resource represents an encounter between a care professional and the patient (or patient's record)."></description>
   <purpose value="CURATED BY INTEROPen see: http://www.interopen.org/careconnect-curation-methodology/ "></purpose>
   <copyright value="Copyright © 2018 NHS Digital"></copyright>
   <fhirVersion value="3.0.1"></fhirVersion>
   <kind value="resource"></kind>
   <abstract value="false"></abstract>
   <type value="Encounter"></type>
   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter"></baseDefinition>
   <derivation value="constraint"></derivation>
   <snapshot>
      <element id="Encounter">
         <path value="Encounter"></path>
         <short value="An interaction during which services are provided to the patient"></short>
         <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."></definition>
         <alias value="Visit"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Resource"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <constraint>
            <key value="dom-2"></key>
            <severity value="error"></severity>
            <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"></human>
            <expression value="contained.contained.empty()"></expression>
            <xpath value="not(parent::f:contained and f:contained)"></xpath>
         </constraint>
         <constraint>
            <key value="dom-1"></key>
            <severity value="error"></severity>
            <human value="If the resource is contained in another resource, it SHALL NOT contain any narrative"></human>
            <expression value="contained.text.empty()"></expression>
            <xpath value="not(parent::f:contained and f:text)"></xpath>
         </constraint>
         <constraint>
            <key value="dom-4"></key>
            <severity value="error"></severity>
            <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"></human>
            <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"></expression>
            <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"></xpath>
         </constraint>
         <constraint>
            <key value="dom-3"></key>
            <severity value="error"></severity>
            <human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource"></human>
            <expression value="contained.where(('#'+id in %resource.descendants().reference).not()).empty()"></expression>
            <xpath value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="Entity. Role, or Act"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Encounter[@moodCode='EVN']"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="workflow.encounter"></map>
         </mapping>
      </element>
      <element id="Encounter.id">
         <path value="Encounter.id"></path>
         <short value="Logical id of this artifact"></short>
         <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."></definition>
         <comment 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."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="id"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta">
         <path value="Encounter.meta"></path>
         <short value="Metadata about the resource"></short>
         <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."></definition>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.meta"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.id">
         <path value="Encounter.meta.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.extension">
         <path value="Encounter.meta.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.versionId">
         <path value="Encounter.meta.versionId"></path>
         <short value="Version specific identifier"></short>
         <definition value="The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted."></definition>
         <comment value="The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.meta.versionId"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="id"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.lastUpdated">
         <path value="Encounter.meta.lastUpdated"></path>
         <short value="When the resource version last changed"></short>
         <definition value="When the resource last changed - e.g. when the version changed."></definition>
         <comment value="This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.meta.lastUpdated"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="instant"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.profile">
         <path value="Encounter.meta.profile"></path>
         <short value="Profiles this resource claims to conform to"></short>
         <definition value="A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]()."></definition>
         <comment value="It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Resource.meta.profile"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security">
         <path value="Encounter.meta.security"></path>
         <short value="Security Labels applied to this resource"></short>
         <definition value="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure."></definition>
         <comment value="The security labels can be updated without changing the stated version of the resource  The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Resource.meta.security"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="SecurityLabels"></valueString>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
               <valueBoolean value="true"></valueBoolean>
            </extension>
            <strength value="extensible"></strength>
            <description value="Security Labels from the Healthcare Privacy and Security Classification System."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/security-labels"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.id">
         <path value="Encounter.meta.security.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.extension">
         <path value="Encounter.meta.security.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.system">
         <path value="Encounter.meta.security.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.version">
         <path value="Encounter.meta.security.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.code">
         <path value="Encounter.meta.security.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.meta.security.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.security.userSelected">
         <path value="Encounter.meta.security.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag">
         <path value="Encounter.meta.tag"></path>
         <short value="Tags applied to this resource"></short>
         <definition value="Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource."></definition>
         <comment value="The tags can be updated without changing the stated version of the resource.  The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Resource.meta.tag"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="Tags"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones""></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/common-tags"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.id">
         <path value="Encounter.meta.tag.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.extension">
         <path value="Encounter.meta.tag.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.system">
         <path value="Encounter.meta.tag.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.version">
         <path value="Encounter.meta.tag.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.code">
         <path value="Encounter.meta.tag.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.meta.tag.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.meta.tag.userSelected">
         <path value="Encounter.meta.tag.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.implicitRules">
         <path value="Encounter.implicitRules"></path>
         <short value="A set of rules under which this content was created"></short>
         <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."></definition>
         <comment 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.   This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.implicitRules"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.language">
         <path value="Encounter.language"></path>
         <short value="Language of the resource content"></short>
         <definition value="The base language in which the resource is written."></definition>
         <comment 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)."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Resource.language"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
               <valueReference>
                  <reference value="http://hl7.org/fhir/ValueSet/all-languages"></reference>
               </valueReference>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="Language"></valueString>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
               <valueBoolean value="true"></valueBoolean>
            </extension>
            <strength value="extensible"></strength>
            <description value="A human language."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/languages"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.text">
         <path value="Encounter.text"></path>
         <short value="Text summary of the resource, for human interpretation"></short>
         <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 "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."></definition>
         <comment value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded in formation is added later."></comment>
         <alias value="narrative"></alias>
         <alias value="html"></alias>
         <alias value="xhtml"></alias>
         <alias value="display"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="DomainResource.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Narrative"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="dom-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Act.text?"></map>
         </mapping>
      </element>
      <element id="Encounter.text.id">
         <path value="Encounter.text.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.text.extension">
         <path value="Encounter.text.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.text.status">
         <path value="Encounter.text.status"></path>
         <short value="generated | extensions | additional | empty"></short>
         <definition value="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Narrative.status"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="NarrativeStatus"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="The status of a resource narrative"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/narrative-status"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.text.div">
         <path value="Encounter.text.div"></path>
         <short value="Limited xhtml content"></short>
         <definition value="The actual narrative content, a stripped down version of XHTML."></definition>
         <comment value="The contents of the html element are an XHTML fragment containing only the basic html formatting elements described in chapters 7-11 and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained stylesheets. The XHTML content may not contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Narrative.div"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="xhtml"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="txt-1"></key>
            <severity value="error"></severity>
            <human value="The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes"></human>
            <expression value="htmlchecks()"></expression>
            <xpath value="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])"></xpath>
         </constraint>
         <constraint>
            <key value="txt-2"></key>
            <severity value="error"></severity>
            <human value="The narrative SHALL have some non-whitespace content"></human>
            <expression value="htmlchecks()"></expression>
            <xpath value="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.contained">
         <path value="Encounter.contained"></path>
         <short value="Contained, inline Resources"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="inline resources"></alias>
         <alias value="anonymous resources"></alias>
         <alias value="contained resources"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="DomainResource.contained"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Resource"></code>
         </type>
         <mapping>
            <identity value="rim"></identity>
            <map value="Entity. Role, or Act"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension">
         <path value="Encounter.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <definition value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="DomainResource.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:encounterTransport">
         <path value="Encounter.extension"></path>
         <sliceName value="encounterTransport"></sliceName>
         <short value="Additional Content defined by implementations"></short>
         <definition value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="DomainResource.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EncounterTransport-1"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:encounterTransport.id">
         <path value="Encounter.extension.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:encounterTransport.extension">
         <path value="Encounter.extension.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:encounterTransport.url">
         <path value="Encounter.extension.url"></path>
         <representation value="xmlAttr"></representation>
         <short value="identifies the meaning of the extension"></short>
         <definition value="Source of the definition for the extension code - a logical name or a URL."></definition>
         <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.url"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EncounterTransport-1"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:encounterTransport.value[x]">
         <path value="Encounter.extension.value[x]"></path>
         <short value="Value of extension"></short>
         <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."></definition>
         <comment value="A stream of bytes, base64 encoded"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.value[x]"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="base64Binary"></code>
         </type>
         <type>
            <code value="boolean"></code>
         </type>
         <type>
            <code value="code"></code>
         </type>
         <type>
            <code value="date"></code>
         </type>
         <type>
            <code value="dateTime"></code>
         </type>
         <type>
            <code value="decimal"></code>
         </type>
         <type>
            <code value="id"></code>
         </type>
         <type>
            <code value="instant"></code>
         </type>
         <type>
            <code value="integer"></code>
         </type>
         <type>
            <code value="markdown"></code>
         </type>
         <type>
            <code value="oid"></code>
         </type>
         <type>
            <code value="positiveInt"></code>
         </type>
         <type>
            <code value="string"></code>
         </type>
         <type>
            <code value="time"></code>
         </type>
         <type>
            <code value="unsignedInt"></code>
         </type>
         <type>
            <code value="uri"></code>
         </type>
         <type>
            <code value="Address"></code>
         </type>
         <type>
            <code value="Age"></code>
         </type>
         <type>
            <code value="Annotation"></code>
         </type>
         <type>
            <code value="Attachment"></code>
         </type>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <type>
            <code value="Coding"></code>
         </type>
         <type>
            <code value="ContactPoint"></code>
         </type>
         <type>
            <code value="Count"></code>
         </type>
         <type>
            <code value="Distance"></code>
         </type>
         <type>
            <code value="Duration"></code>
         </type>
         <type>
            <code value="HumanName"></code>
         </type>
         <type>
            <code value="Identifier"></code>
         </type>
         <type>
            <code value="Money"></code>
         </type>
         <type>
            <code value="Period"></code>
         </type>
         <type>
            <code value="Quantity"></code>
         </type>
         <type>
            <code value="Range"></code>
         </type>
         <type>
            <code value="Ratio"></code>
         </type>
         <type>
            <code value="Reference"></code>
         </type>
         <type>
            <code value="SampledData"></code>
         </type>
         <type>
            <code value="Signature"></code>
         </type>
         <type>
            <code value="Timing"></code>
         </type>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance">
         <path value="Encounter.extension"></path>
         <sliceName value="outcomeOfAttendance"></sliceName>
         <short value="Additional Content defined by implementations"></short>
         <definition value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="DomainResource.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-OutcomeOfAttendance-1"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance.id">
         <path value="Encounter.extension.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance.extension">
         <path value="Encounter.extension.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance.url">
         <path value="Encounter.extension.url"></path>
         <representation value="xmlAttr"></representation>
         <short value="identifies the meaning of the extension"></short>
         <definition value="Source of the definition for the extension code - a logical name or a URL."></definition>
         <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.url"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-OutcomeOfAttendance-1"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance.value[x]">
         <path value="Encounter.extension.value[x]"></path>
         <short value="Value of extension"></short>
         <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."></definition>
         <comment value="A stream of bytes, base64 encoded"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.value[x]"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="base64Binary"></code>
         </type>
         <type>
            <code value="boolean"></code>
         </type>
         <type>
            <code value="code"></code>
         </type>
         <type>
            <code value="date"></code>
         </type>
         <type>
            <code value="dateTime"></code>
         </type>
         <type>
            <code value="decimal"></code>
         </type>
         <type>
            <code value="id"></code>
         </type>
         <type>
            <code value="instant"></code>
         </type>
         <type>
            <code value="integer"></code>
         </type>
         <type>
            <code value="markdown"></code>
         </type>
         <type>
            <code value="oid"></code>
         </type>
         <type>
            <code value="positiveInt"></code>
         </type>
         <type>
            <code value="string"></code>
         </type>
         <type>
            <code value="time"></code>
         </type>
         <type>
            <code value="unsignedInt"></code>
         </type>
         <type>
            <code value="uri"></code>
         </type>
         <type>
            <code value="Address"></code>
         </type>
         <type>
            <code value="Age"></code>
         </type>
         <type>
            <code value="Annotation"></code>
         </type>
         <type>
            <code value="Attachment"></code>
         </type>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <type>
            <code value="Coding"></code>
         </type>
         <type>
            <code value="ContactPoint"></code>
         </type>
         <type>
            <code value="Count"></code>
         </type>
         <type>
            <code value="Distance"></code>
         </type>
         <type>
            <code value="Duration"></code>
         </type>
         <type>
            <code value="HumanName"></code>
         </type>
         <type>
            <code value="Identifier"></code>
         </type>
         <type>
            <code value="Money"></code>
         </type>
         <type>
            <code value="Period"></code>
         </type>
         <type>
            <code value="Quantity"></code>
         </type>
         <type>
            <code value="Range"></code>
         </type>
         <type>
            <code value="Ratio"></code>
         </type>
         <type>
            <code value="Reference"></code>
         </type>
         <type>
            <code value="SampledData"></code>
         </type>
         <type>
            <code value="Signature"></code>
         </type>
         <type>
            <code value="Timing"></code>
         </type>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus">
         <path value="Encounter.extension"></path>
         <sliceName value="emergencyCareDischargeStatus"></sliceName>
         <short value="Additional Content defined by implementations"></short>
         <definition value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="DomainResource.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EmergencyCareDischargeStatus-1"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus.id">
         <path value="Encounter.extension.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus.extension">
         <path value="Encounter.extension.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus.url">
         <path value="Encounter.extension.url"></path>
         <representation value="xmlAttr"></representation>
         <short value="identifies the meaning of the extension"></short>
         <definition value="Source of the definition for the extension code - a logical name or a URL."></definition>
         <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.url"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EmergencyCareDischargeStatus-1"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus.value[x]">
         <path value="Encounter.extension.value[x]"></path>
         <short value="Value of extension"></short>
         <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."></definition>
         <comment value="A stream of bytes, base64 encoded"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.value[x]"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="base64Binary"></code>
         </type>
         <type>
            <code value="boolean"></code>
         </type>
         <type>
            <code value="code"></code>
         </type>
         <type>
            <code value="date"></code>
         </type>
         <type>
            <code value="dateTime"></code>
         </type>
         <type>
            <code value="decimal"></code>
         </type>
         <type>
            <code value="id"></code>
         </type>
         <type>
            <code value="instant"></code>
         </type>
         <type>
            <code value="integer"></code>
         </type>
         <type>
            <code value="markdown"></code>
         </type>
         <type>
            <code value="oid"></code>
         </type>
         <type>
            <code value="positiveInt"></code>
         </type>
         <type>
            <code value="string"></code>
         </type>
         <type>
            <code value="time"></code>
         </type>
         <type>
            <code value="unsignedInt"></code>
         </type>
         <type>
            <code value="uri"></code>
         </type>
         <type>
            <code value="Address"></code>
         </type>
         <type>
            <code value="Age"></code>
         </type>
         <type>
            <code value="Annotation"></code>
         </type>
         <type>
            <code value="Attachment"></code>
         </type>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <type>
            <code value="Coding"></code>
         </type>
         <type>
            <code value="ContactPoint"></code>
         </type>
         <type>
            <code value="Count"></code>
         </type>
         <type>
            <code value="Distance"></code>
         </type>
         <type>
            <code value="Duration"></code>
         </type>
         <type>
            <code value="HumanName"></code>
         </type>
         <type>
            <code value="Identifier"></code>
         </type>
         <type>
            <code value="Money"></code>
         </type>
         <type>
            <code value="Period"></code>
         </type>
         <type>
            <code value="Quantity"></code>
         </type>
         <type>
            <code value="Range"></code>
         </type>
         <type>
            <code value="Ratio"></code>
         </type>
         <type>
            <code value="Reference"></code>
         </type>
         <type>
            <code value="SampledData"></code>
         </type>
         <type>
            <code value="Signature"></code>
         </type>
         <type>
            <code value="Timing"></code>
         </type>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.modifierExtension">
         <path value="Encounter.modifierExtension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="DomainResource.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier">
         <path value="Encounter.identifier"></path>
         <short value="Identifier(s) by which this encounter is known"></short>
         <definition value="Identifier(s) by which this encounter is known."></definition>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.identifier"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-19"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".id"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="id"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.id">
         <path value="Encounter.identifier.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.extension">
         <path value="Encounter.identifier.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.use">
         <path value="Encounter.identifier.use"></path>
         <short value="usual | official | temp | secondary (If known)"></short>
         <definition value="The purpose of this identifier."></definition>
         <comment value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary."></comment>
         <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.use"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="IdentifierUse"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="Identifies the purpose for this identifier, if known ."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/identifier-use"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="N/A"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.code or implied by context"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type">
         <path value="Encounter.identifier.type"></path>
         <short value="Description of identifier"></short>
         <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."></definition>
         <comment value="This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type."></comment>
         <requirements value="Allows users to make use of identifiers when the identifier system is not known."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.type"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="IdentifierType"></valueString>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
               <valueBoolean value="true"></valueBoolean>
            </extension>
            <strength value="extensible"></strength>
            <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/identifier-type"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.5"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.code or implied by context"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.id">
         <path value="Encounter.identifier.type.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.extension">
         <path value="Encounter.identifier.type.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding">
         <path value="Encounter.identifier.type.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.id">
         <path value="Encounter.identifier.type.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.extension">
         <path value="Encounter.identifier.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.system">
         <path value="Encounter.identifier.type.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.version">
         <path value="Encounter.identifier.type.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.code">
         <path value="Encounter.identifier.type.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.identifier.type.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.coding.userSelected">
         <path value="Encounter.identifier.type.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.type.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.identifier.type.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.system">
         <path value="Encounter.identifier.system"></path>
         <short value="The namespace for the identifier value"></short>
         <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique."></definition>
         <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier"></comment>
         <requirements value="There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <example>
            <label value="General"></label>
            <valueUri value="http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri"></valueUri>
         </example>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.4 / EI-2-4"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.root or Role.id.root"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./IdentifierType"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.value">
         <path value="Encounter.identifier.value"></path>
         <short value="The value that is unique"></short>
         <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system."></definition>
         <comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html)."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.value"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <example>
            <label value="General"></label>
            <valueString value="123456"></valueString>
         </example>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.1 / EI.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./Value"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.period">
         <path value="Encounter.identifier.period"></path>
         <short value="Time period when id is/was valid for use"></short>
         <definition value="Time period during which identifier is/was valid for use."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.period"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.7 + CX.8"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.effectiveTime or implied by context"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./StartDate and ./EndDate"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.period.id">
         <path value="Encounter.identifier.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.period.extension">
         <path value="Encounter.identifier.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.period.start">
         <path value="Encounter.identifier.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.period.end">
         <path value="Encounter.identifier.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner">
         <path value="Encounter.identifier.assigner"></path>
         <short value="Organization that issued id (may be just text)"></short>
         <definition value="Organization that issued/manages the identifier."></definition>
         <comment value="The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.assigner"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.4 / (CX.4,CX.9,CX.10)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./IdentifierIssuingAuthority"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner.id">
         <path value="Encounter.identifier.assigner.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner.extension">
         <path value="Encounter.identifier.assigner.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner.reference">
         <path value="Encounter.identifier.assigner.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner.identifier">
         <path value="Encounter.identifier.assigner.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.identifier.assigner.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.identifier.assigner.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.status">
         <path value="Encounter.status"></path>
         <short value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +"></short>
         <definition value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +."></definition>
         <comment value="Note that internal business rules will detemine the appropraite transitions that may occur between statuses (and also classes).  This element is labeled as a modifier because the status contains codes that mark the encounter as not currently valid."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.status"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterStatus"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="Current state of the encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-status"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <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"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".statusCode"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="status"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory">
         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
            <valueString value="StatusHistory"></valueString>
         </extension>
         <path value="Encounter.statusHistory"></path>
         <short value="List of past encounter statuses"></short>
         <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."></definition>
         <comment value="The current status is always found in the current version of the resource, not the status history."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.statusHistory"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.id">
         <path value="Encounter.statusHistory.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.extension">
         <path value="Encounter.statusHistory.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.modifierExtension">
         <path value="Encounter.statusHistory.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.status">
         <path value="Encounter.statusHistory.status"></path>
         <short value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +"></short>
         <definition value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.statusHistory.status"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterStatus"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="Current state of the encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-status"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.period">
         <path value="Encounter.statusHistory.period"></path>
         <short value="The time that the episode was in the specified status"></short>
         <definition value="The time that the episode was in the specified status."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.statusHistory.period"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.period.id">
         <path value="Encounter.statusHistory.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.period.extension">
         <path value="Encounter.statusHistory.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.period.start">
         <path value="Encounter.statusHistory.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.statusHistory.period.end">
         <path value="Encounter.statusHistory.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.class">
         <path value="Encounter.class"></path>
         <short value="Classification of the encounter"></short>
         <definition value="Classification of the encounter."></definition>
         <comment value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.class"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterClass"></valueString>
            </extension>
            <strength value="extensible"></strength>
            <description value="Classification of the encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/v3-ActEncounterCode"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=LIST].code"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="class"></map>
         </mapping>
      </element>
      <element id="Encounter.class.id">
         <path value="Encounter.class.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.class.extension">
         <path value="Encounter.class.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.class.system">
         <path value="Encounter.class.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.class.version">
         <path value="Encounter.class.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.class.code">
         <path value="Encounter.class.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.class.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.class.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.class.userSelected">
         <path value="Encounter.class.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory">
         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
            <valueString value="ClassHistory"></valueString>
         </extension>
         <path value="Encounter.classHistory"></path>
         <short value="List of past encounter classes"></short>
         <definition value="The class history permits the tracking of the encounters transitions without needing to go  through the resource history.  This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient."></definition>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.classHistory"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.id">
         <path value="Encounter.classHistory.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.extension">
         <path value="Encounter.classHistory.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.modifierExtension">
         <path value="Encounter.classHistory.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class">
         <path value="Encounter.classHistory.class"></path>
         <short value="Classification of the encounter"></short>
         <definition value="Classification of the encounter."></definition>
         <comment value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.classHistory.class"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterClass"></valueString>
            </extension>
            <strength value="extensible"></strength>
            <description value="Classification of the encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/v3-ActEncounterCode"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.id">
         <path value="Encounter.classHistory.class.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.extension">
         <path value="Encounter.classHistory.class.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.system">
         <path value="Encounter.classHistory.class.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.version">
         <path value="Encounter.classHistory.class.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.code">
         <path value="Encounter.classHistory.class.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.classHistory.class.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.class.userSelected">
         <path value="Encounter.classHistory.class.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.period">
         <path value="Encounter.classHistory.period"></path>
         <short value="The time that the episode was in the specified class"></short>
         <definition value="The time that the episode was in the specified class."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.classHistory.period"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.period.id">
         <path value="Encounter.classHistory.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.period.extension">
         <path value="Encounter.classHistory.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.period.start">
         <path value="Encounter.classHistory.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.classHistory.period.end">
         <path value="Encounter.classHistory.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.type">
         <path value="Encounter.type"></path>
         <short value="Specific type of encounter"></short>
         <definition value="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)."></definition>
         <comment value="Since there are many ways to further classify encounters, this element is 0..*."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.type"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterType"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="The type of encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-type"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-4 / PV1-18"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".code"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="class"></map>
         </mapping>
      </element>
      <element id="Encounter.type.id">
         <path value="Encounter.type.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.type.extension">
         <path value="Encounter.type.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding">
         <path value="Encounter.type.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.id">
         <path value="Encounter.type.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.extension">
         <path value="Encounter.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.system">
         <path value="Encounter.type.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.version">
         <path value="Encounter.type.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.code">
         <path value="Encounter.type.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.type.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding.userSelected">
         <path value="Encounter.type.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT">
         <path value="Encounter.type.coding"></path>
         <sliceName value="snomedCT"></sliceName>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <strength value="required"></strength>
            <description value="A code from the SNOMED Clinical Terminology UK coding system that describes an encounter between a care professional and the patient (or patient's record)."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-EncounterType-1"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.id">
         <path value="Encounter.type.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.extension">
         <path value="Encounter.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.type.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <short value="The SNOMED CT Description ID for the display"></short>
         <definition value="The SNOMED CT Description ID for the display."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.system">
         <path value="Encounter.type.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.version">
         <path value="Encounter.type.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.code">
         <path value="Encounter.type.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.type.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.type.coding:snomedCT.userSelected">
         <path value="Encounter.type.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.type.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.type.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.priority">
         <path value="Encounter.priority"></path>
         <short value="Indicates the urgency of the encounter"></short>
         <definition value="Indicates the urgency of the encounter."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.priority"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="Priority"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="Indicates the urgency of the encounter."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/v3-ActPriority"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV2-25"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".priorityCode"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="grade"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.id">
         <path value="Encounter.priority.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.extension">
         <path value="Encounter.priority.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding">
         <path value="Encounter.priority.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.id">
         <path value="Encounter.priority.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.extension">
         <path value="Encounter.priority.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.system">
         <path value="Encounter.priority.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.version">
         <path value="Encounter.priority.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.code">
         <path value="Encounter.priority.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.priority.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.coding.userSelected">
         <path value="Encounter.priority.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.priority.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.priority.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.subject">
         <path value="Encounter.subject"></path>
         <short value="The patient ro group present at the encounter"></short>
         <definition value="The patient ro group present at the encounter."></definition>
         <comment value="While the encounter is always about the patient, the patient may not actually be known in all contexts of use, and there may be a group of patients that could be anonymous (such as in a group therapy for Alcoholics Anonymous - where the recording of the encounter could be used for billing on the number of people/staff and not important to the context of the specific patients) or alternately in veterinary care a herd of sheep receiving treatment (where the animals are not individually tracked)."></comment>
         <alias value="patient"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.subject"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PID-3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".participation[typeCode=SBJ]/role[classCode=PAT]"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="who.focus"></map>
         </mapping>
      </element>
      <element id="Encounter.subject.id">
         <path value="Encounter.subject.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.subject.extension">
         <path value="Encounter.subject.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.subject.reference">
         <path value="Encounter.subject.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.subject.identifier">
         <path value="Encounter.subject.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.subject.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.subject.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare">
         <path value="Encounter.episodeOfCare"></path>
         <short value="Episode(s) of care that this encounter should be recorded against"></short>
         <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)."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Encounter.episodeOfCare"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-54, PV1-53"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="context"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare.id">
         <path value="Encounter.episodeOfCare.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare.extension">
         <path value="Encounter.episodeOfCare.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare.reference">
         <path value="Encounter.episodeOfCare.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare.identifier">
         <path value="Encounter.episodeOfCare.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.episodeOfCare.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.episodeOfCare.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral">
         <path value="Encounter.incomingReferral"></path>
         <short value="The ReferralRequest that initiated this encounter"></short>
         <definition value="The referral request this encounter satisfies (incoming referral)."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Encounter.incomingReferral"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="http://hl7.org/fhir/StructureDefinition/ReferralRequest"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".reason.ClinicalDocument"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral.id">
         <path value="Encounter.incomingReferral.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral.extension">
         <path value="Encounter.incomingReferral.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral.reference">
         <path value="Encounter.incomingReferral.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral.identifier">
         <path value="Encounter.incomingReferral.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.incomingReferral.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.incomingReferral.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant">
         <path value="Encounter.participant"></path>
         <short value="List of participants involved in the encounter"></short>
         <definition value="The list of people responsible for providing the service."></definition>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.participant"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="ROL"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".participation[typeCode=PFM]"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.id">
         <path value="Encounter.participant.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.extension">
         <path value="Encounter.participant.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.modifierExtension">
         <path value="Encounter.participant.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type">
         <path value="Encounter.participant.type"></path>
         <short value="Role of participant in encounter"></short>
         <definition value="Role of participant in encounter."></definition>
         <comment 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."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.participant.type"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="ParticipantType"></valueString>
            </extension>
            <strength value="extensible"></strength>
            <description value="Role of participant in encounter"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-participant-type"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="ROL-3 (or maybe PRT-4)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".functionCode"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.id">
         <path value="Encounter.participant.type.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.extension">
         <path value="Encounter.participant.type.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding">
         <path value="Encounter.participant.type.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.id">
         <path value="Encounter.participant.type.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.extension">
         <path value="Encounter.participant.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.system">
         <path value="Encounter.participant.type.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.version">
         <path value="Encounter.participant.type.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.code">
         <path value="Encounter.participant.type.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.participant.type.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.coding.userSelected">
         <path value="Encounter.participant.type.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.type.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.participant.type.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.period">
         <path value="Encounter.participant.period"></path>
         <short value="Period of time during the encounter that the participant participated"></short>
         <definition value="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.participant.period"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="ROL-5, ROL-6 (or maybe PRT-5)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".time"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.period.id">
         <path value="Encounter.participant.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.period.extension">
         <path value="Encounter.participant.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.period.start">
         <path value="Encounter.participant.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.period.end">
         <path value="Encounter.participant.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual">
         <path value="Encounter.participant.individual"></path>
         <short value="Persons involved in the encounter other than the patient"></short>
         <definition value="Persons involved in the encounter other than the patient."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.participant.individual"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/ITK-RelatedPerson-1"></targetProfile>
         </type>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="ROL-4"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".role"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="who"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual.id">
         <path value="Encounter.participant.individual.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual.extension">
         <path value="Encounter.participant.individual.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual.reference">
         <path value="Encounter.participant.individual.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual.identifier">
         <path value="Encounter.participant.individual.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.participant.individual.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.participant.individual.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment">
         <path value="Encounter.appointment"></path>
         <short value="The appointment that scheduled this encounter"></short>
         <definition value="The appointment that scheduled this encounter."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Encounter.appointment"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="http://hl7.org/fhir/StructureDefinition/Appointment"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="SCH-1 / SCH-2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment.id">
         <path value="Encounter.appointment.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment.extension">
         <path value="Encounter.appointment.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment.reference">
         <path value="Encounter.appointment.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment.identifier">
         <path value="Encounter.appointment.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.appointment.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.appointment.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.period">
         <path value="Encounter.period"></path>
         <short value="The start and end time of the encounter"></short>
         <definition value="The start and end time of the encounter."></definition>
         <comment value="If not (yet) known, the end of the Period may be omitted."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.period"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-44, PV1-45"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".effectiveTime (low & high)"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="when.done"></map>
         </mapping>
      </element>
      <element id="Encounter.period.id">
         <path value="Encounter.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.period.extension">
         <path value="Encounter.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.period.start">
         <path value="Encounter.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.period.end">
         <path value="Encounter.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.length">
         <path value="Encounter.length"></path>
         <short value="Quantity of time the encounter lasted (less time absent)"></short>
         <definition value="Quantity of time the encounter lasted. This excludes the time during leaves of absence."></definition>
         <comment value="May differ from the time the Encounter.period lasted because of leave of absence."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.length"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Duration"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="qty-3"></key>
            <severity value="error"></severity>
            <human value="If a code for the unit is present, the system SHALL also be present"></human>
            <expression value="code.empty() or system.exists()"></expression>
            <xpath value="not(exists(f:code)) or exists(f:system)"></xpath>
         </constraint>
         <constraint>
            <key value="drt-1"></key>
            <severity value="error"></severity>
            <human value="There SHALL be a code if there is a value and it SHALL be an expression of time.  If system is present, it SHALL be UCUM."></human>
            <expression value="code.exists() implies ((system = %ucum) and value.exists())"></expression>
            <xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="SN (see also Range) or CQ"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="PQ, IVL<PQ>, MO, CO, depending on the values"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="PQ, IVL<PQ> depending on the values"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="(PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".lengthOfStayQuantity"></map>
         </mapping>
      </element>
      <element id="Encounter.length.id">
         <path value="Encounter.length.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.length.extension">
         <path value="Encounter.length.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.length.value">
         <path value="Encounter.length.value"></path>
         <short value="Numerical value (with implicit precision)"></short>
         <definition value="The value of the measured amount. The value includes an implicit precision in the presentation of the value."></definition>
         <comment 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)."></comment>
         <requirements value="Precision is handled implicitly in almost all cases of measurement."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Quantity.value"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="decimal"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="SN.2  / CQ - N/A"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"></map>
         </mapping>
      </element>
      <element id="Encounter.length.comparator">
         <path value="Encounter.length.comparator"></path>
         <short value="< | <= | >= | > - how to understand the value"></short>
         <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 "<" , then the real value is < stated value."></definition>
         <comment value="This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value."></comment>
         <requirements value="Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Quantity.comparator"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <meaningWhenMissing value="If there is no comparator, then there is no modification of the value"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="QuantityComparator"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="How the Quantity should be understood and represented."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/quantity-comparator"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="SN.1  / CQ.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL properties"></map>
         </mapping>
      </element>
      <element id="Encounter.length.unit">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.length.unit"></path>
         <short value="Unit representation"></short>
         <definition value="A human-readable form of the unit."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <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."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Quantity.unit"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="(see OBX.6 etc.) / CQ.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="PQ.unit"></map>
         </mapping>
      </element>
      <element id="Encounter.length.system">
         <path value="Encounter.length.system"></path>
         <short value="System that defines coded unit form"></short>
         <definition value="The identification of the system that provides the coded form of the unit."></definition>
         <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier"></comment>
         <requirements value="Need to know the system that defines the coded form of the unit."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Quantity.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="qty-3"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="(see OBX.6 etc.) / CQ.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CO.codeSystem, PQ.translation.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.length.code">
         <path value="Encounter.length.code"></path>
         <short value="Coded form of the unit"></short>
         <definition value="A computer processable form of the unit in some unit representation system."></definition>
         <comment 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."></comment>
         <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."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Quantity.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="(see OBX.6 etc.) / CQ.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="PQ.code, MO.currency, PQ.translation.code"></map>
         </mapping>
      </element>
      <element id="Encounter.reason">
         <path value="Encounter.reason"></path>
         <short value="Reason the encounter takes place (code)"></short>
         <definition value="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis."></definition>
         <comment 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)."></comment>
         <alias value="Indication"></alias>
         <alias value="Admission diagnosis"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.reason"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterReason"></valueString>
            </extension>
            <strength value="preferred"></strength>
            <description value="Reason why the encounter takes place."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-reason"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <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 )"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".reasonCode"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="why"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.id">
         <path value="Encounter.reason.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.extension">
         <path value="Encounter.reason.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding">
         <path value="Encounter.reason.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.id">
         <path value="Encounter.reason.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.extension">
         <path value="Encounter.reason.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.system">
         <path value="Encounter.reason.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.version">
         <path value="Encounter.reason.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.code">
         <path value="Encounter.reason.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.reason.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding.userSelected">
         <path value="Encounter.reason.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT">
         <path value="Encounter.reason.coding"></path>
         <sliceName value="snomedCT"></sliceName>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.id">
         <path value="Encounter.reason.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.extension">
         <path value="Encounter.reason.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.reason.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <short value="The SNOMED CT Description ID for the display"></short>
         <definition value="The SNOMED CT Description ID for the display."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.system">
         <path value="Encounter.reason.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.version">
         <path value="Encounter.reason.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.code">
         <path value="Encounter.reason.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.reason.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.coding:snomedCT.userSelected">
         <path value="Encounter.reason.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.reason.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.reason.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis">
         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
            <valueString value="Diagnosis"></valueString>
         </extension>
         <path value="Encounter.diagnosis"></path>
         <short value="The list of diagnosis relevant to this encounter"></short>
         <definition value="The list of diagnosis relevant to this encounter."></definition>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.diagnosis"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=RSON]"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.id">
         <path value="Encounter.diagnosis.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.extension">
         <path value="Encounter.diagnosis.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.modifierExtension">
         <path value="Encounter.diagnosis.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition">
         <path value="Encounter.diagnosis.condition"></path>
         <short value="Reason the encounter takes place (resource)"></short>
         <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."></definition>
         <comment 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)."></comment>
         <alias value="Admission diagnosis"></alias>
         <alias value="discharge diagnosis"></alias>
         <alias value="indication"></alias>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.diagnosis.condition"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Procedure-1"></targetProfile>
         </type>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Condition-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <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."></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=RSON].target"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="why"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition.id">
         <path value="Encounter.diagnosis.condition.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition.extension">
         <path value="Encounter.diagnosis.condition.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition.reference">
         <path value="Encounter.diagnosis.condition.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition.identifier">
         <path value="Encounter.diagnosis.condition.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.condition.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.diagnosis.condition.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role">
         <path value="Encounter.diagnosis.role"></path>
         <short value="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)"></short>
         <definition value="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.diagnosis.role"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="DiagnosisRole"></valueString>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
               <valueBoolean value="true"></valueBoolean>
            </extension>
            <strength value="preferred"></strength>
            <description value="The type of diagnosis this condition represents"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/diagnosis-role"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.id">
         <path value="Encounter.diagnosis.role.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.extension">
         <path value="Encounter.diagnosis.role.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding">
         <path value="Encounter.diagnosis.role.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.id">
         <path value="Encounter.diagnosis.role.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.extension">
         <path value="Encounter.diagnosis.role.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.system">
         <path value="Encounter.diagnosis.role.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.version">
         <path value="Encounter.diagnosis.role.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.code">
         <path value="Encounter.diagnosis.role.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.diagnosis.role.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.coding.userSelected">
         <path value="Encounter.diagnosis.role.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.role.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.diagnosis.role.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.diagnosis.rank">
         <path value="Encounter.diagnosis.rank"></path>
         <short value="Ranking of the diagnosis (for each role type)"></short>
         <definition value="Ranking of the diagnosis (for each role type)."></definition>
         <comment value="32 bit number; for values larger than this, use decimal"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.diagnosis.rank"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="positiveInt"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=RSON].priority"></map>
         </mapping>
      </element>
      <element id="Encounter.account">
         <path value="Encounter.account"></path>
         <short value="The set of accounts that may be used for billing for this Encounter"></short>
         <definition value="The set of accounts that may be used for billing for this Encounter."></definition>
         <comment value="The billing system may choose to allocate billable items associated with the Encounter to different referenced Accounts based on internal business rules."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Encounter.account"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="http://hl7.org/fhir/StructureDefinition/Account"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".pertains.A_Account"></map>
         </mapping>
      </element>
      <element id="Encounter.account.id">
         <path value="Encounter.account.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.account.extension">
         <path value="Encounter.account.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.account.reference">
         <path value="Encounter.account.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.account.identifier">
         <path value="Encounter.account.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.account.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.account.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization">
         <path value="Encounter.hospitalization"></path>
         <short value="Details about the admission to a healthcare service"></short>
         <definition value="Details about the admission to a healthcare service."></definition>
         <comment 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."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.id">
         <path value="Encounter.hospitalization.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension">
         <path value="Encounter.hospitalization.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod">
         <path value="Encounter.hospitalization.extension"></path>
         <sliceName value="admissionMethod"></sliceName>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AdmissionMethod-1"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod.id">
         <path value="Encounter.hospitalization.extension.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod.extension">
         <path value="Encounter.hospitalization.extension.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod.url">
         <path value="Encounter.hospitalization.extension.url"></path>
         <representation value="xmlAttr"></representation>
         <short value="identifies the meaning of the extension"></short>
         <definition value="Source of the definition for the extension code - a logical name or a URL."></definition>
         <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.url"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AdmissionMethod-1"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod.value[x]">
         <path value="Encounter.hospitalization.extension.value[x]"></path>
         <short value="Value of extension"></short>
         <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."></definition>
         <comment value="A stream of bytes, base64 encoded"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.value[x]"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="base64Binary"></code>
         </type>
         <type>
            <code value="boolean"></code>
         </type>
         <type>
            <code value="code"></code>
         </type>
         <type>
            <code value="date"></code>
         </type>
         <type>
            <code value="dateTime"></code>
         </type>
         <type>
            <code value="decimal"></code>
         </type>
         <type>
            <code value="id"></code>
         </type>
         <type>
            <code value="instant"></code>
         </type>
         <type>
            <code value="integer"></code>
         </type>
         <type>
            <code value="markdown"></code>
         </type>
         <type>
            <code value="oid"></code>
         </type>
         <type>
            <code value="positiveInt"></code>
         </type>
         <type>
            <code value="string"></code>
         </type>
         <type>
            <code value="time"></code>
         </type>
         <type>
            <code value="unsignedInt"></code>
         </type>
         <type>
            <code value="uri"></code>
         </type>
         <type>
            <code value="Address"></code>
         </type>
         <type>
            <code value="Age"></code>
         </type>
         <type>
            <code value="Annotation"></code>
         </type>
         <type>
            <code value="Attachment"></code>
         </type>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <type>
            <code value="Coding"></code>
         </type>
         <type>
            <code value="ContactPoint"></code>
         </type>
         <type>
            <code value="Count"></code>
         </type>
         <type>
            <code value="Distance"></code>
         </type>
         <type>
            <code value="Duration"></code>
         </type>
         <type>
            <code value="HumanName"></code>
         </type>
         <type>
            <code value="Identifier"></code>
         </type>
         <type>
            <code value="Money"></code>
         </type>
         <type>
            <code value="Period"></code>
         </type>
         <type>
            <code value="Quantity"></code>
         </type>
         <type>
            <code value="Range"></code>
         </type>
         <type>
            <code value="Ratio"></code>
         </type>
         <type>
            <code value="Reference"></code>
         </type>
         <type>
            <code value="SampledData"></code>
         </type>
         <type>
            <code value="Signature"></code>
         </type>
         <type>
            <code value="Timing"></code>
         </type>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod">
         <path value="Encounter.hospitalization.extension"></path>
         <sliceName value="dischargeMethod"></sliceName>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-DischargeMethod-1"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod.id">
         <path value="Encounter.hospitalization.extension.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod.extension">
         <path value="Encounter.hospitalization.extension.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod.url">
         <path value="Encounter.hospitalization.extension.url"></path>
         <representation value="xmlAttr"></representation>
         <short value="identifies the meaning of the extension"></short>
         <definition value="Source of the definition for the extension code - a logical name or a URL."></definition>
         <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.url"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-DischargeMethod-1"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod.value[x]">
         <path value="Encounter.hospitalization.extension.value[x]"></path>
         <short value="Value of extension"></short>
         <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."></definition>
         <comment value="A stream of bytes, base64 encoded"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Extension.value[x]"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="base64Binary"></code>
         </type>
         <type>
            <code value="boolean"></code>
         </type>
         <type>
            <code value="code"></code>
         </type>
         <type>
            <code value="date"></code>
         </type>
         <type>
            <code value="dateTime"></code>
         </type>
         <type>
            <code value="decimal"></code>
         </type>
         <type>
            <code value="id"></code>
         </type>
         <type>
            <code value="instant"></code>
         </type>
         <type>
            <code value="integer"></code>
         </type>
         <type>
            <code value="markdown"></code>
         </type>
         <type>
            <code value="oid"></code>
         </type>
         <type>
            <code value="positiveInt"></code>
         </type>
         <type>
            <code value="string"></code>
         </type>
         <type>
            <code value="time"></code>
         </type>
         <type>
            <code value="unsignedInt"></code>
         </type>
         <type>
            <code value="uri"></code>
         </type>
         <type>
            <code value="Address"></code>
         </type>
         <type>
            <code value="Age"></code>
         </type>
         <type>
            <code value="Annotation"></code>
         </type>
         <type>
            <code value="Attachment"></code>
         </type>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <type>
            <code value="Coding"></code>
         </type>
         <type>
            <code value="ContactPoint"></code>
         </type>
         <type>
            <code value="Count"></code>
         </type>
         <type>
            <code value="Distance"></code>
         </type>
         <type>
            <code value="Duration"></code>
         </type>
         <type>
            <code value="HumanName"></code>
         </type>
         <type>
            <code value="Identifier"></code>
         </type>
         <type>
            <code value="Money"></code>
         </type>
         <type>
            <code value="Period"></code>
         </type>
         <type>
            <code value="Quantity"></code>
         </type>
         <type>
            <code value="Range"></code>
         </type>
         <type>
            <code value="Ratio"></code>
         </type>
         <type>
            <code value="Reference"></code>
         </type>
         <type>
            <code value="SampledData"></code>
         </type>
         <type>
            <code value="Signature"></code>
         </type>
         <type>
            <code value="Timing"></code>
         </type>
         <type>
            <code value="Meta"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.modifierExtension">
         <path value="Encounter.hospitalization.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier">
         <path value="Encounter.hospitalization.preAdmissionIdentifier"></path>
         <short value="Pre-admission identifier"></short>
         <definition value="Pre-admission identifier."></definition>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.preAdmissionIdentifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-5"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".id"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.id">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.extension">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.use">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.use"></path>
         <short value="usual | official | temp | secondary (If known)"></short>
         <definition value="The purpose of this identifier."></definition>
         <comment value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary."></comment>
         <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.use"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="IdentifierUse"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="Identifies the purpose for this identifier, if known ."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/identifier-use"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="N/A"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.code or implied by context"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type"></path>
         <short value="Description of identifier"></short>
         <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."></definition>
         <comment value="This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type."></comment>
         <requirements value="Allows users to make use of identifiers when the identifier system is not known."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.type"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="IdentifierType"></valueString>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
               <valueBoolean value="true"></valueBoolean>
            </extension>
            <strength value="extensible"></strength>
            <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/identifier-type"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.5"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.code or implied by context"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.id">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.extension">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.id">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.extension">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.system">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.version">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.code">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.userSelected">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.system">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.system"></path>
         <short value="The namespace for the identifier value"></short>
         <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique."></definition>
         <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier"></comment>
         <requirements value="There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <example>
            <label value="General"></label>
            <valueUri value="http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri"></valueUri>
         </example>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.4 / EI-2-4"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.root or Role.id.root"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./IdentifierType"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.value">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.value"></path>
         <short value="The value that is unique"></short>
         <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system."></definition>
         <comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html)."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.value"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <example>
            <label value="General"></label>
            <valueString value="123456"></valueString>
         </example>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.1 / EI.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./Value"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.period">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.period"></path>
         <short value="Time period when id is/was valid for use"></short>
         <definition value="Time period during which identifier is/was valid for use."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.period"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.7 + CX.8"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="Role.effectiveTime or implied by context"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./StartDate and ./EndDate"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.period.id">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.period.extension">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.period.start">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.period.end">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner"></path>
         <short value="Organization that issued id (may be just text)"></short>
         <definition value="Organization that issued/manages the identifier."></definition>
         <comment value="The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Identifier.assigner"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX.4 / (CX.4,CX.9,CX.10)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="./IdentifierIssuingAuthority"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.id">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.extension">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.reference">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.identifier">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin">
         <path value="Encounter.hospitalization.origin"></path>
         <short value="The location from which the patient came before admission"></short>
         <definition value="The location from which the patient came before admission."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.origin"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".participation[typeCode=ORG].role"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin.id">
         <path value="Encounter.hospitalization.origin.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin.extension">
         <path value="Encounter.hospitalization.origin.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin.reference">
         <path value="Encounter.hospitalization.origin.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin.identifier">
         <path value="Encounter.hospitalization.origin.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.origin.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.origin.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource">
         <path value="Encounter.hospitalization.admitSource"></path>
         <short value="From where patient was admitted (physician referral, transfer)"></short>
         <definition value="From where patient was admitted (physician referral, transfer)."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.admitSource"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="AdmitSource"></valueString>
            </extension>
            <strength value="preferred"></strength>
            <description value="The source of admission to a Hospital Provider Spell or a Nursing Episode when the Patient is in a Hospital Site or a Care Home."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-SourceOfAdmission-1"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-14"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".admissionReferralSourceCode"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.id">
         <path value="Encounter.hospitalization.admitSource.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.extension">
         <path value="Encounter.hospitalization.admitSource.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding">
         <path value="Encounter.hospitalization.admitSource.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.id">
         <path value="Encounter.hospitalization.admitSource.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.extension">
         <path value="Encounter.hospitalization.admitSource.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.system">
         <path value="Encounter.hospitalization.admitSource.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.version">
         <path value="Encounter.hospitalization.admitSource.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.code">
         <path value="Encounter.hospitalization.admitSource.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.admitSource.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.userSelected">
         <path value="Encounter.hospitalization.admitSource.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.admitSource.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.admitSource.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission">
         <path value="Encounter.hospitalization.reAdmission"></path>
         <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"></short>
         <definition value="Whether this hospitalization is a readmission and why if known."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.reAdmission"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="ReAdmissionType"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="The reason for re-admission of this hospitalization encounter."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/v2-0092"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-13"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.id">
         <path value="Encounter.hospitalization.reAdmission.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.extension">
         <path value="Encounter.hospitalization.reAdmission.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding">
         <path value="Encounter.hospitalization.reAdmission.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.id">
         <path value="Encounter.hospitalization.reAdmission.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.extension">
         <path value="Encounter.hospitalization.reAdmission.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.system">
         <path value="Encounter.hospitalization.reAdmission.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.version">
         <path value="Encounter.hospitalization.reAdmission.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.code">
         <path value="Encounter.hospitalization.reAdmission.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.reAdmission.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding.userSelected">
         <path value="Encounter.hospitalization.reAdmission.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT">
         <path value="Encounter.hospitalization.reAdmission.coding"></path>
         <sliceName value="snomedCT"></sliceName>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.id">
         <path value="Encounter.hospitalization.reAdmission.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.extension">
         <path value="Encounter.hospitalization.reAdmission.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.hospitalization.reAdmission.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <short value="The SNOMED CT Description ID for the display"></short>
         <definition value="The SNOMED CT Description ID for the display."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.system">
         <path value="Encounter.hospitalization.reAdmission.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.version">
         <path value="Encounter.hospitalization.reAdmission.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="0"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.code">
         <path value="Encounter.hospitalization.reAdmission.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.reAdmission.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.userSelected">
         <path value="Encounter.hospitalization.reAdmission.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.reAdmission.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.reAdmission.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference">
         <path value="Encounter.hospitalization.dietPreference"></path>
         <short value="Diet preferences reported by the patient"></short>
         <definition value="Diet preferences reported by the patient."></definition>
         <comment value="For example a patient may request both a dairy-free and nut-free diet preference (not mutually exclusive)."></comment>
         <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."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.hospitalization.dietPreference"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="PatientDiet"></valueString>
            </extension>
            <strength value="extensible"></strength>
            <description value="Medical, cultural or ethical food preferences to help with catering requirements."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-diet"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-38"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=EVN, code="diet"]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.id">
         <path value="Encounter.hospitalization.dietPreference.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.extension">
         <path value="Encounter.hospitalization.dietPreference.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding">
         <path value="Encounter.hospitalization.dietPreference.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.id">
         <path value="Encounter.hospitalization.dietPreference.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.extension">
         <path value="Encounter.hospitalization.dietPreference.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.system">
         <path value="Encounter.hospitalization.dietPreference.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.version">
         <path value="Encounter.hospitalization.dietPreference.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.code">
         <path value="Encounter.hospitalization.dietPreference.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dietPreference.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.userSelected">
         <path value="Encounter.hospitalization.dietPreference.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dietPreference.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dietPreference.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy">
         <path value="Encounter.hospitalization.specialCourtesy"></path>
         <short value="Special courtesies (VIP, board member)"></short>
         <definition value="Special courtesies (VIP, board member)."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.hospitalization.specialCourtesy"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="Courtesies"></valueString>
            </extension>
            <strength value="preferred"></strength>
            <description value="Special courtesies"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-special-courtesy"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-16"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".specialCourtesiesCode"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.id">
         <path value="Encounter.hospitalization.specialCourtesy.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.extension">
         <path value="Encounter.hospitalization.specialCourtesy.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding">
         <path value="Encounter.hospitalization.specialCourtesy.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.id">
         <path value="Encounter.hospitalization.specialCourtesy.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.extension">
         <path value="Encounter.hospitalization.specialCourtesy.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.system">
         <path value="Encounter.hospitalization.specialCourtesy.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.version">
         <path value="Encounter.hospitalization.specialCourtesy.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.code">
         <path value="Encounter.hospitalization.specialCourtesy.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialCourtesy.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.userSelected">
         <path value="Encounter.hospitalization.specialCourtesy.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialCourtesy.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement">
         <path value="Encounter.hospitalization.specialArrangement"></path>
         <short value="Wheelchair, translator, stretcher, etc."></short>
         <definition value="Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.hospitalization.specialArrangement"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="Arrangements"></valueString>
            </extension>
            <strength value="preferred"></strength>
            <description value="Special arrangements"></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-special-arrangements"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-15 / OBR-30 / OBR-43"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".specialArrangementCode"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.id">
         <path value="Encounter.hospitalization.specialArrangement.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.extension">
         <path value="Encounter.hospitalization.specialArrangement.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding">
         <path value="Encounter.hospitalization.specialArrangement.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.id">
         <path value="Encounter.hospitalization.specialArrangement.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.extension">
         <path value="Encounter.hospitalization.specialArrangement.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.system">
         <path value="Encounter.hospitalization.specialArrangement.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.version">
         <path value="Encounter.hospitalization.specialArrangement.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.code">
         <path value="Encounter.hospitalization.specialArrangement.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialArrangement.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.userSelected">
         <path value="Encounter.hospitalization.specialArrangement.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialArrangement.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination">
         <path value="Encounter.hospitalization.destination"></path>
         <short value="Location to which the patient is discharged"></short>
         <definition value="Location to which the patient is discharged."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.destination"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-37"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".participation[typeCode=DST]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination.id">
         <path value="Encounter.hospitalization.destination.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination.extension">
         <path value="Encounter.hospitalization.destination.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination.reference">
         <path value="Encounter.hospitalization.destination.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination.identifier">
         <path value="Encounter.hospitalization.destination.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.destination.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.destination.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition">
         <path value="Encounter.hospitalization.dischargeDisposition"></path>
         <short value="Category or kind of location after discharge"></short>
         <definition value="Category or kind of location after discharge."></definition>
         <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.hospitalization.dischargeDisposition"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="CodeableConcept"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="DischargeDisp"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="The destination of a Patient on completion of a Hospital Provider Spell, or a note that the Patient died or was a still birth."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-DischargeDestination-1"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-36"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".dischargeDispositionCode"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.id">
         <path value="Encounter.hospitalization.dischargeDisposition.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.extension">
         <path value="Encounter.hospitalization.dischargeDisposition.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding">
         <path value="Encounter.hospitalization.dischargeDisposition.coding"></path>
         <short value="Code defined by a terminology system"></short>
         <definition value="A reference to a code defined by a terminology system."></definition>
         <comment value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."></comment>
         <requirements value="Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings."></requirements>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="CodeableConcept.coding"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Coding"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding rdfs:subClassOf dt:CDCoding"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1-8, C*E.10-22"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="union(., ./translation)"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.id">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.extension">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.system">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.system"></path>
         <short value="Identity of the terminology system"></short>
         <definition value="The identification of the code system that defines the meaning of the symbol in the code."></definition>
         <comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."></comment>
         <requirements value="Need to be unambiguous about the source of the definition of the symbol."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.system"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="uri"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.3"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystem"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.version">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.version"></path>
         <short value="Version of the system - if relevant"></short>
         <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."></definition>
         <comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.version"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.7"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./codeSystemVersion"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.code">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.code"></path>
         <short value="Symbol in syntax defined by the system"></short>
         <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to refer to a particular code in the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.code"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./code"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dischargeDisposition.coding.display"></path>
         <short value="Representation defined by the system"></short>
         <definition value="A representation of the meaning of the code in the system, following the rules of the system."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."></requirements>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.2 - but note this is not well followed"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CV.displayName"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.userSelected">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.userSelected"></path>
         <short value="If this coding was chosen directly by the user"></short>
         <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."></definition>
         <comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."></comment>
         <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Coding.userSelected"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="boolean"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="Sometimes implied by being first"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="CD.codingRationale"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source "true";     fhir:target dt:CDCoding.codingRationale\#O   ]"></map>
         </mapping>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.text">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dischargeDisposition.text"></path>
         <short value="Plain text representation of the concept"></short>
         <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."></definition>
         <comment value="Very often the text is the same as a displayName of one of the codings."></comment>
         <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."></requirements>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="CodeableConcept.text"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="C*E.9. But note many systems use C*E.2 for this"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./originalText[mediaType/code="text/plain"]/data"></map>
         </mapping>
         <mapping>
            <identity value="orim"></identity>
            <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"></map>
         </mapping>
      </element>
      <element id="Encounter.location">
         <path value="Encounter.location"></path>
         <short value="List of locations where the patient has been"></short>
         <definition value="List of locations where  the patient has been during this encounter."></definition>
         <comment value="Virtual encounters can be recorded in the Encounter by specifying a location reference to a location of type "kind" such as "client's home" and an encounter.class = "virtual"."></comment>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Encounter.location"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="BackboneElement"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".participation[typeCode=LOC]"></map>
         </mapping>
      </element>
      <element id="Encounter.location.id">
         <path value="Encounter.location.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.location.extension">
         <path value="Encounter.location.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.modifierExtension">
         <path value="Encounter.location.modifierExtension"></path>
         <short value="Extensions that cannot be ignored"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <alias value="modifiers"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="BackboneElement.modifierExtension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <isModifier value="true"></isModifier>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location">
         <path value="Encounter.location.location"></path>
         <short value="Location the encounter takes place"></short>
         <definition value="The location where the encounter takes place."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.location.location"></path>
            <min value="1"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-3 / PV1-6 / PV1-11 / PV1-42 / PV1-43"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".role"></map>
         </mapping>
         <mapping>
            <identity value="w5"></identity>
            <map value="where"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location.id">
         <path value="Encounter.location.location.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location.extension">
         <path value="Encounter.location.location.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location.reference">
         <path value="Encounter.location.location.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location.identifier">
         <path value="Encounter.location.location.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.location.location.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.location.location.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.status">
         <path value="Encounter.location.status"></path>
         <short value="planned | active | reserved | completed"></short>
         <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."></definition>
         <comment 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."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.location.status"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="code"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="EncounterLocationStatus"></valueString>
            </extension>
            <strength value="required"></strength>
            <description value="The status of the location."></description>
            <valueSetReference>
               <reference value="http://hl7.org/fhir/ValueSet/encounter-location-status"></reference>
            </valueSetReference>
         </binding>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".role.statusCode"></map>
         </mapping>
      </element>
      <element id="Encounter.location.period">
         <path value="Encounter.location.period"></path>
         <short value="Time period during which the patient was present at the location"></short>
         <definition value="Time period during which the patient was present at the location."></definition>
         <comment value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.location.period"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Period"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="per-1"></key>
            <severity value="error"></severity>
            <human value="If present, start SHALL have a lower value than end"></human>
            <expression value="start.empty() or end.empty() or (start <= end)"></expression>
            <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".time"></map>
         </mapping>
      </element>
      <element id="Encounter.location.period.id">
         <path value="Encounter.location.period.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.location.period.extension">
         <path value="Encounter.location.period.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.location.period.start">
         <path value="Encounter.location.period.start"></path>
         <short value="Starting time with inclusive boundary"></short>
         <definition value="The start of the period. The boundary is inclusive."></definition>
         <comment value="If the low element is missing, the meaning is that the low boundary is not known."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.start"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.1"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./low"></map>
         </mapping>
      </element>
      <element id="Encounter.location.period.end">
         <path value="Encounter.location.period.end"></path>
         <short value="End time with inclusive boundary, if not ongoing"></short>
         <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."></definition>
         <comment value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Period.end"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="dateTime"></code>
         </type>
         <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing"></meaningWhenMissing>
         <condition value="ele-1"></condition>
         <condition value="per-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="DR.2"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="./high"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider">
         <path value="Encounter.serviceProvider"></path>
         <short value="The custodian organization of this Encounter record"></short>
         <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."></definition>
         <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.serviceProvider"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="PV1-10 / PL.6  & PL.1  (note: HL7 v2 definition is "the treatment or type of surgery that the patient is scheduled to receive"; seems slightly out of alignment with the concept name 'hospital service'. Would not trust that implementations apply this semantic by default)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".particiaption[typeCode=PFM].role"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider.id">
         <path value="Encounter.serviceProvider.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider.extension">
         <path value="Encounter.serviceProvider.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider.reference">
         <path value="Encounter.serviceProvider.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider.identifier">
         <path value="Encounter.serviceProvider.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.serviceProvider.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.serviceProvider.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf">
         <path value="Encounter.partOf"></path>
         <short value="Another Encounter this encounter is part of"></short>
         <definition value="Another Encounter of which this encounter is a part of (administratively or in time)."></definition>
         <comment value="This is also used for associating a child's encounter back to the mother's encounter.  Refer to the Notes section in the Patient resource for further details."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Encounter.partOf"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Encounter-1"></targetProfile>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ref-1"></key>
            <severity value="error"></severity>
            <human value="SHALL have a contained resource if a local reference is provided"></human>
            <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"></expression>
            <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".inboundRelationship[typeCode=COMP].source[classCode=COMP, moodCode=EVN]"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf.id">
         <path value="Encounter.partOf.id"></path>
         <representation value="xmlAttr"></representation>
         <short value="xml:id (or equivalent in JSON)"></short>
         <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."></definition>
         <comment value="Note that FHIR strings may not exceed 1MB in size"></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Element.id"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf.extension">
         <path value="Encounter.partOf.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <description value="Extensions are always sliced by (at least) url"></description>
            <rules value="open"></rules>
         </slicing>
         <short value="Additional Content defined by implementations"></short>
         <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."></definition>
         <comment 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."></comment>
         <alias value="extensions"></alias>
         <alias value="user content"></alias>
         <min value="0"></min>
         <max value="*"></max>
         <base>
            <path value="Element.extension"></path>
            <min value="0"></min>
            <max value="*"></max>
         </base>
         <type>
            <code value="Extension"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <constraint>
            <key value="ext-1"></key>
            <severity value="error"></severity>
            <human value="Must have either extensions or value[x], not both"></human>
            <expression value="extension.exists() != value.exists()"></expression>
            <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"></xpath>
         </constraint>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf.reference">
         <path value="Encounter.partOf.reference"></path>
         <short value="Literal reference, Relative, internal or absolute URL"></short>
         <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."></definition>
         <comment value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server."></comment>
         <min value="1"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.reference"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <condition value="ref-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf.identifier">
         <path value="Encounter.partOf.identifier"></path>
         <short value="Logical reference, when literal reference is not known"></short>
         <definition value="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."></definition>
         <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.identifier"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="Identifier"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="v2"></identity>
            <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"></map>
         </mapping>
         <mapping>
            <identity value="servd"></identity>
            <map value="Identifier"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value=".identifier"></map>
         </mapping>
      </element>
      <element id="Encounter.partOf.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.partOf.display"></path>
         <short value="Text alternative for the resource"></short>
         <definition value="Plain text narrative that identifies the resource in addition to the resource reference."></definition>
         <comment value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."></comment>
         <min value="0"></min>
         <max value="1"></max>
         <base>
            <path value="Reference.display"></path>
            <min value="0"></min>
            <max value="1"></max>
         </base>
         <type>
            <code value="string"></code>
         </type>
         <condition value="ele-1"></condition>
         <constraint>
            <key value="ele-1"></key>
            <severity value="error"></severity>
            <human value="All FHIR elements must have a @value or children"></human>
            <expression value="hasValue() | (children().count() > id.count())"></expression>
            <xpath value="@value|f:*|h:div"></xpath>
         </constraint>
         <isSummary value="true"></isSummary>
         <mapping>
            <identity value="rim"></identity>
            <map value="n/a"></map>
         </mapping>
         <mapping>
            <identity value="rim"></identity>
            <map value="N/A"></map>
         </mapping>
      </element>
   </snapshot>
   <differential>
      <element id="Encounter.extension">
         <path value="Encounter.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.extension:encounterTransport">
         <path value="Encounter.extension"></path>
         <sliceName value="encounterTransport"></sliceName>
         <max value="1"></max>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EncounterTransport-1"></profile>
         </type>
      </element>
      <element id="Encounter.extension:encounterTransport.url">
         <path value="Encounter.extension.url"></path>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EncounterTransport-1"></fixedUri>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance">
         <path value="Encounter.extension"></path>
         <sliceName value="outcomeOfAttendance"></sliceName>
         <max value="1"></max>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-OutcomeOfAttendance-1"></profile>
         </type>
      </element>
      <element id="Encounter.extension:outcomeOfAttendance.url">
         <path value="Encounter.extension.url"></path>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-OutcomeOfAttendance-1"></fixedUri>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus">
         <path value="Encounter.extension"></path>
         <sliceName value="emergencyCareDischargeStatus"></sliceName>
         <max value="1"></max>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EmergencyCareDischargeStatus-1"></profile>
         </type>
      </element>
      <element id="Encounter.extension:emergencyCareDischargeStatus.url">
         <path value="Encounter.extension.url"></path>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-EmergencyCareDischargeStatus-1"></fixedUri>
      </element>
      <element id="Encounter.identifier.type.coding.system">
         <path value="Encounter.identifier.type.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.identifier.type.coding.code">
         <path value="Encounter.identifier.type.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.identifier.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.identifier.type.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.identifier.system">
         <path value="Encounter.identifier.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.identifier.value">
         <path value="Encounter.identifier.value"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.identifier.assigner">
         <path value="Encounter.identifier.assigner"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.identifier.assigner.reference">
         <path value="Encounter.identifier.assigner.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.class">
         <path value="Encounter.class"></path>
         <short value="Classification of the encounter"></short>
         <definition value="Classification of the encounter."></definition>
      </element>
      <element id="Encounter.class.system">
         <path value="Encounter.class.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.class.code">
         <path value="Encounter.class.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.class.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.class.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.classHistory.class">
         <path value="Encounter.classHistory.class"></path>
         <short value="Classification of the encounter"></short>
         <definition value="Classification of the encounter."></definition>
      </element>
      <element id="Encounter.classHistory.class.system">
         <path value="Encounter.classHistory.class.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.classHistory.class.code">
         <path value="Encounter.classHistory.class.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.classHistory.class.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.classHistory.class.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.type.coding">
         <path value="Encounter.type.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.type.coding:snomedCT">
         <path value="Encounter.type.coding"></path>
         <sliceName value="snomedCT"></sliceName>
         <max value="1"></max>
         <binding>
            <strength value="required"></strength>
            <description value="A code from the SNOMED Clinical Terminology UK coding system that describes an encounter between a care professional and the patient (or patient's record)."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-EncounterType-1"></reference>
            </valueSetReference>
         </binding>
      </element>
      <element id="Encounter.type.coding:snomedCT.extension">
         <path value="Encounter.type.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.type.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.type.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
      </element>
      <element id="Encounter.type.coding:snomedCT.system">
         <path value="Encounter.type.coding.system"></path>
         <min value="1"></min>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
      </element>
      <element id="Encounter.type.coding:snomedCT.version">
         <path value="Encounter.type.coding.version"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.type.coding:snomedCT.code">
         <path value="Encounter.type.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.type.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.type.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.priority.coding.system">
         <path value="Encounter.priority.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.priority.coding.code">
         <path value="Encounter.priority.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.priority.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.priority.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.subject">
         <path value="Encounter.subject"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.subject.reference">
         <path value="Encounter.subject.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.episodeOfCare">
         <path value="Encounter.episodeOfCare"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.incomingReferral">
         <path value="Encounter.incomingReferral"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.participant.type.coding.system">
         <path value="Encounter.participant.type.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.participant.type.coding.code">
         <path value="Encounter.participant.type.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.participant.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.participant.type.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.participant.individual">
         <path value="Encounter.participant.individual"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/ITK-RelatedPerson-1"></targetProfile>
         </type>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.participant.individual.reference">
         <path value="Encounter.participant.individual.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.appointment">
         <path value="Encounter.appointment"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.reason.coding">
         <path value="Encounter.reason.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.reason.coding:snomedCT">
         <path value="Encounter.reason.coding"></path>
         <sliceName value="snomedCT"></sliceName>
      </element>
      <element id="Encounter.reason.coding:snomedCT.extension">
         <path value="Encounter.reason.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.reason.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.reason.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
      </element>
      <element id="Encounter.reason.coding:snomedCT.system">
         <path value="Encounter.reason.coding.system"></path>
         <min value="1"></min>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
      </element>
      <element id="Encounter.reason.coding:snomedCT.version">
         <path value="Encounter.reason.coding.version"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.reason.coding:snomedCT.code">
         <path value="Encounter.reason.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.reason.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.reason.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.diagnosis.condition">
         <path value="Encounter.diagnosis.condition"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Procedure-1"></targetProfile>
         </type>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Condition-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.diagnosis.condition.reference">
         <path value="Encounter.diagnosis.condition.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.diagnosis.role.coding.system">
         <path value="Encounter.diagnosis.role.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.diagnosis.role.coding.code">
         <path value="Encounter.diagnosis.role.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.diagnosis.role.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.diagnosis.role.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.account">
         <path value="Encounter.account"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.hospitalization.extension">
         <path value="Encounter.hospitalization.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod">
         <path value="Encounter.hospitalization.extension"></path>
         <sliceName value="admissionMethod"></sliceName>
         <max value="1"></max>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AdmissionMethod-1"></profile>
         </type>
      </element>
      <element id="Encounter.hospitalization.extension:admissionMethod.url">
         <path value="Encounter.hospitalization.extension.url"></path>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AdmissionMethod-1"></fixedUri>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod">
         <path value="Encounter.hospitalization.extension"></path>
         <sliceName value="dischargeMethod"></sliceName>
         <max value="1"></max>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-DischargeMethod-1"></profile>
         </type>
      </element>
      <element id="Encounter.hospitalization.extension:dischargeMethod.url">
         <path value="Encounter.hospitalization.extension.url"></path>
         <fixedUri value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-DischargeMethod-1"></fixedUri>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.system">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.code">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.type.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.preAdmissionIdentifier.type.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.system">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.value">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.value"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner.reference">
         <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.origin">
         <path value="Encounter.hospitalization.origin"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.hospitalization.origin.reference">
         <path value="Encounter.hospitalization.origin.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.admitSource">
         <path value="Encounter.hospitalization.admitSource"></path>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="AdmitSource"></valueString>
            </extension>
            <strength value="preferred"></strength>
            <description value="The source of admission to a Hospital Provider Spell or a Nursing Episode when the Patient is in a Hospital Site or a Care Home."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-SourceOfAdmission-1"></reference>
            </valueSetReference>
         </binding>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.system">
         <path value="Encounter.hospitalization.admitSource.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.code">
         <path value="Encounter.hospitalization.admitSource.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.admitSource.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.admitSource.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding">
         <path value="Encounter.hospitalization.reAdmission.coding"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="system"></path>
            </discriminator>
            <ordered value="false"></ordered>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT">
         <path value="Encounter.hospitalization.reAdmission.coding"></path>
         <sliceName value="snomedCT"></sliceName>
         <max value="1"></max>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.extension">
         <path value="Encounter.hospitalization.reAdmission.coding.extension"></path>
         <slicing>
            <discriminator>
               <type value="value"></type>
               <path value="url"></path>
            </discriminator>
            <rules value="open"></rules>
         </slicing>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.extension:snomedCTDescriptionID">
         <path value="Encounter.hospitalization.reAdmission.coding.extension"></path>
         <sliceName value="snomedCTDescriptionID"></sliceName>
         <type>
            <code value="Extension"></code>
            <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"></profile>
         </type>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.system">
         <path value="Encounter.hospitalization.reAdmission.coding.system"></path>
         <min value="1"></min>
         <fixedUri value="http://snomed.info/sct"></fixedUri>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.version">
         <path value="Encounter.hospitalization.reAdmission.coding.version"></path>
         <max value="0"></max>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.code">
         <path value="Encounter.hospitalization.reAdmission.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.reAdmission.coding:snomedCT.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.reAdmission.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dietPreference">
         <path value="Encounter.hospitalization.dietPreference"></path>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="PatientDiet"></valueString>
            </extension>
            <strength value="extensible"></strength>
         </binding>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.system">
         <path value="Encounter.hospitalization.dietPreference.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.code">
         <path value="Encounter.hospitalization.dietPreference.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dietPreference.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dietPreference.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.system">
         <path value="Encounter.hospitalization.specialCourtesy.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.code">
         <path value="Encounter.hospitalization.specialCourtesy.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialCourtesy.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialCourtesy.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.system">
         <path value="Encounter.hospitalization.specialArrangement.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.code">
         <path value="Encounter.hospitalization.specialArrangement.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.specialArrangement.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.specialArrangement.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.destination">
         <path value="Encounter.hospitalization.destination"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.hospitalization.destination.reference">
         <path value="Encounter.hospitalization.destination.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition">
         <path value="Encounter.hospitalization.dischargeDisposition"></path>
         <binding>
            <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
               <valueString value="DischargeDisp"></valueString>
            </extension>
            <strength value="example"></strength>
            <description value="The destination of a Patient on completion of a Hospital Provider Spell, or a note that the Patient died or was a still birth."></description>
            <valueSetReference>
               <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-DischargeDestination-1"></reference>
            </valueSetReference>
         </binding>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.system">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.system"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.code">
         <path value="Encounter.hospitalization.dischargeDisposition.coding.code"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.hospitalization.dischargeDisposition.coding.display">
         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
            <valueBoolean value="true"></valueBoolean>
         </extension>
         <path value="Encounter.hospitalization.dischargeDisposition.coding.display"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.location.location">
         <path value="Encounter.location.location"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.location.location.reference">
         <path value="Encounter.location.location.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.serviceProvider">
         <path value="Encounter.serviceProvider"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.serviceProvider.reference">
         <path value="Encounter.serviceProvider.reference"></path>
         <min value="1"></min>
      </element>
      <element id="Encounter.partOf">
         <path value="Encounter.partOf"></path>
         <type>
            <code value="Reference"></code>
            <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Encounter-1"></targetProfile>
         </type>
      </element>
      <element id="Encounter.partOf.reference">
         <path value="Encounter.partOf.reference"></path>
         <min value="1"></min>
      </element>
   </differential>
</StructureDefinition>