Trillium II Implementation Guide Implementation Guide CI Build

Publish Box goes here

XML Format: StructureDefinition-AllergyIntolerance-uv-ips

Raw xml


<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="AllergyIntolerance-uv-ips"/>
  <meta>
    <lastUpdated value="2018-02-14T15:58:02.283+01:00"/>
  </meta>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">This profile represents the constraints applied to the AllergyIntolerance resource by the Trillium II project based on FHIR STU3. This profile is derived from the International Patient Summary (IPS) FHIR Implementation Guide. A record of an allergy or intolerance is represented in the patient summary as an instance of an AllergyIntolerance resource constrained by this profile.

It documents the relevant allergies or intolerances (conditions) for a patient, describing the kind of reaction (e.g. rash, anaphylaxis,..); preferably the agents that cause it; and optionally the criticality and the certainty of the allergy.</div>
  </text>
  <url
       value="http://hl7.eu/fhir/trillium2/StructureDefinition/AllergyIntolerance-uv-ips"/>
  <version value="0.1.0"/>
  <name value="AllergyIntolerance_uv_ips"/>
  <title value="Allergy Intolerance (Trillium II)"/>
  <status value="draft"/>
  <date value="2018-02-14T14:57:18+01:00"/>
  <description
               value="This profile represents the constraints applied to the AllergyIntolerance resource by the Trillium II project based on FHIR STU3. This profile is derived from the International Patient Summary (IPS) FHIR Implementation Guide. A record of an allergy or intolerance is represented in the patient summary as an instance of an AllergyIntolerance resource constrained by this profile.

It documents the relevant allergies or intolerances (conditions) for a patient, describing the kind of reaction (e.g. rash, anaphylaxis,..); preferably the agents that cause it; and optionally the criticality and the certainty of the allergy."/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <purpose
           value="This profile constrains the representation of a record of an allergy or intolerance of the patient, in the context of the international patient summary as specified by the IPS project of HL7 International."/>
  <fhirVersion value="3.0.1"/>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <mapping>
    <identity value="w5"/>
    <uri value="http://hl7.org/fhir/w5"/>
    <name value="W5 Mapping"/>
  </mapping>
  <mapping>
    <identity value="v2"/>
    <uri value="http://hl7.org/v2"/>
    <name value="HL7 v2 Mapping"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="AllergyIntolerance"/>
  <baseDefinition
                  value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
  <derivation value="constraint"/>
  <snapshot>
    <element id="AllergyIntolerance">
      <path value="AllergyIntolerance"/>
      <short
             value="Allergy or Intolerance (generally: Risk of adverse reaction to a substance)"/>
      <definition
                  value="Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."/>
      <comment
               value="Substances include, but are not limited to: a therapeutic substance administered correctly at an appropriate dosage for the individual; food; material derived from plants or animals; or venom from insect stings."/>
      <alias value="Allergy"/>
      <alias value="Intolerance"/>
      <alias value="Adverse Reaction"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="dom-2"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
        <expression value="contained.contained.empty()"/>
        <xpath value="not(parent::f:contained and f:contained)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-1"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain any narrative"/>
        <expression value="contained.text.empty()"/>
        <xpath value="not(parent::f:contained and f:text)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-4"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
        <expression
                    value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
        <xpath
               value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-3"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource"/>
        <expression
                    value="contained.where((&#39;#&#39;+id in %resource.descendants().reference).not()).empty()"/>
        <xpath
               value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $id))]))"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="ait-1"/>
        <severity value="error"/>
        <human
               value="AllergyIntolerance.clinicalStatus SHALL be present if verificationStatus is not entered-in-error."/>
        <expression
                    value="verificationStatus=&#39;entered-in-error&#39; or clinicalStatus.exists()"/>
        <xpath
               value="f:verificationStatus/@value=&#39;entered-in-error&#39; or exists(f:clinicalStatus)"/>
        <source value="AllergyIntolerance"/>
      </constraint>
      <constraint>
        <key value="ait-2"/>
        <severity value="error"/>
        <human
               value="AllergyIntolerance.clinicalStatus SHALL NOT be present if verification Status is entered-in-error"/>
        <expression
                    value="verificationStatus!=&#39;entered-in-error&#39; or clinicalStatus.empty()"/>
        <xpath
               value="f:verificationStatus/@value!=&#39;entered-in-error&#39; or not(exists(f:clinicalStatus))"/>
        <source value="AllergyIntolerance"/>
      </constraint>
      <mustSupport value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="Entity. Role, or Act"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="Observation[classCode=OBS, moodCode=EVN]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="clinical.general"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.id">
      <path value="AllergyIntolerance.id"/>
      <short value="Logical id of this artifact"/>
      <definition
                  value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.meta">
      <path value="AllergyIntolerance.meta"/>
      <short value="Metadata about the resource"/>
      <definition
                  value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.meta.id">
      <path value="AllergyIntolerance.meta.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.meta.extension">
      <path value="AllergyIntolerance.meta.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.meta.versionId">
      <path value="AllergyIntolerance.meta.versionId"/>
      <short value="Version specific identifier"/>
      <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."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Meta.versionId"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.meta.lastUpdated">
      <path value="AllergyIntolerance.meta.lastUpdated"/>
      <short value="When the resource version last changed"/>
      <definition
                  value="When the resource last changed - e.g. when the version changed."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Meta.lastUpdated"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="instant"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.meta.profile">
      <path value="AllergyIntolerance.meta.profile"/>
      <short value="Profiles this resource claims to conform to"/>
      <definition
                  value="A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/STU3/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/STU3/)."/>
      <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."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Meta.profile"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.meta.security">
      <path value="AllergyIntolerance.meta.security"/>
      <short value="Security Labels applied to this resource"/>
      <definition
                  value="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure."/>
      <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."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Meta.security"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="SecurityLabels"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description
                     value="Security Labels from the Healthcare Privacy and Security Classification System."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/security-labels"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.meta.tag">
      <path value="AllergyIntolerance.meta.tag"/>
      <short value="Tags applied to this resource"/>
      <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."/>
      <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."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Meta.tag"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Tags"/>
        </extension>
        <strength value="example"/>
        <description
                     value="Codes that represent various types of tags, commonly workflow-related; e.g. &quot;Needs review by Dr. Jones&quot;"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/common-tags"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.implicitRules">
      <path value="AllergyIntolerance.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition
                  value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
      <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&#39;s meaning or interpretation."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="AllergyIntolerance.language">
      <path value="AllergyIntolerance.language"/>
      <short value="Language of the resource content"/>
      <definition value="The base language in which the resource is written."/>
      <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)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueReference>
            <reference value="http://hl7.org/fhir/ValueSet/all-languages"/>
          </valueReference>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description value="A human language."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/languages"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.text">
      <path value="AllergyIntolerance.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition
                  value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
      <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 &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded in formation is added later."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.contained">
      <path value="AllergyIntolerance.contained"/>
      <short value="Contained, inline Resources"/>
      <definition
                  value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
      <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."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.extension">
      <path value="AllergyIntolerance.extension"/>
      <slicing id="3">
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
    </element>
    <element id="AllergyIntolerance.extension:abatement-datetime">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0"/>
      </extension>
      <path value="AllergyIntolerance.extension"/>
      <sliceName value="abatement-datetime"/>
      <short value="Abatement datetime"/>
      <definition
                  value="The date or estimated date that the condition resolved or went into remission."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/abatement-dateTime-uv-ips"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &#39;value&#39;)])"/>
        <source value="Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.modifierExtension">
      <path value="AllergyIntolerance.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.identifier">
      <path value="AllergyIntolerance.identifier"/>
      <short value="External ids for this item"/>
      <definition
                  value="This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.identifier"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="IAM-7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="id"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.clinicalStatus">
      <path value="AllergyIntolerance.clinicalStatus"/>
      <short value="active | inactive | resolved"/>
      <definition value="The clinical status of the allergy or intolerance."/>
      <comment
               value="This element is labeled as a modifier because the status contains the codes inactive and resolved that mark the AllergyIntolerance as not currently valid."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.clinicalStatus"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <condition value="ait-1"/>
      <condition value="ait-2"/>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceClinicalStatus"/>
        </extension>
        <strength value="required"/>
        <description value="The clinical status of the allergy or intolerance."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/allergy-clinical-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map
             value="Observation ACT
.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&quot;clinicalStatus&quot;, moodCode=EVN].value"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.verificationStatus">
      <path value="AllergyIntolerance.verificationStatus"/>
      <short value="unconfirmed | confirmed | refuted | entered-in-error"/>
      <definition
                  value="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product)."/>
      <comment
               value="In the scope of the IPS the entered-in-error concept is not allowed."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.verificationStatus"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <condition value="ait-1"/>
      <condition value="ait-2"/>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceVerificationStatus"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/allergy-verification-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map
             value="Observation ACT
.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&quot;verificationStatus&quot;, moodCode=EVN].value"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.type">
      <path value="AllergyIntolerance.type"/>
      <short value="allergy | intolerance - Underlying mechanism (if known)"/>
      <definition
                  value="Identification of the underlying physiological mechanism for the reaction risk."/>
      <comment
               value="Allergic (typically immune-mediated) reactions have been traditionally regarded as an indicator for potential escalation to significant future risk. Contemporary knowledge suggests that some reactions previously thought to be immune-mediated are, in fact, non-immune, but in some cases can still pose a life threatening risk. It is acknowledged that many clinicians may not be in a position to distinguish the mechanism of a particular reaction. Often the term &quot;allergy&quot; is used rather generically and may overlap with the use of &quot;intolerance&quot; - in practice the boundaries between these two concepts may not be well-defined or understood. This data element is included nevertheless, because many legacy systems have captured this attribute. Immunologic testing may provide supporting evidence for the basis of the reaction and the causative substance, but no tests are 100% sensitive or specific for sensitivity to a particular substance. If, as is commonly the case, it is unclear whether the reaction is due to an allergy or an intolerance, then the type element should be omitted from the resource."/>
      <alias value="Category"/>
      <alias value="Class"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.type"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceType"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Identification of the underlying physiological mechanism for a Reaction Risk."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/allergy-intolerance-type"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="IAM-9"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="code"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.category">
      <path value="AllergyIntolerance.category"/>
      <short value="food | medication | environment | biologic"/>
      <definition value="Category of the identified substance."/>
      <comment
               value="This data element has been included because it is currently being captured in some clinical systems. This data can be derived from the substance where coding systems are used, and is effectively redundant in that situation.  When searching on category, consider the implications of AllergyIntolerance resources without a category.  For example, when searching on category = medication, medication allergies that don&#39;t have a category valued will not be returned.  Refer to [search](http://hl7.org/fhir/STU3/search.html) for more information on how to search category with a :missing modifier to get allergies that don&#39;t have a category.  Additionally, category should be used with caution because category can be subjective based on the sender."/>
      <alias value="Category"/>
      <alias value="Type"/>
      <alias value="Reaction Type"/>
      <alias value="Class"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.category"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceCategory"/>
        </extension>
        <strength value="required"/>
        <description value="Category of an identified substance."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/allergy-intolerance-category"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="AL1-2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="value &lt; IntoleranceValue (Agent)"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.criticality">
      <path value="AllergyIntolerance.criticality"/>
      <short value="low | high | unable-to-assess"/>
      <definition
                  value="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance."/>
      <comment
               value="The default criticality value for any propensity to an adverse reaction should be &#39;Low Risk&#39;, indicating at the very least a relative contraindication to deliberate or voluntary exposure to the substance. &#39;High Risk&#39; is flagged if the clinician has identified a propensity for a more serious or potentially life-threatening reaction, such as anaphylaxis, and implies an absolute contraindication to deliberate or voluntary exposure to the substance. If this element is missing, the criticality is unknown (though it may be known elsewhere).

Systems that capture a severity at the condition level are actually representing the concept of criticality whereas the severity documented at the reaction level is representing the true reaction severity.  Existing systems that are capturing both condition criticality and reaction severity may use the term &quot;severity&quot; to represent both.  Criticality is the worst it could be in the future (i.e. situation-agnostic) whereas severity is situation-dependent."/>
      <alias value="Severity"/>
      <alias value="Seriousness"/>
      <alias value="Contra-indication"/>
      <alias value="Risk"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.criticality"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceCriticality"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="AL1-4"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value &lt;= SeverityObservation (Severity Level)]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="grade"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="coding.system"/>
        </discriminator>
        <description value="Discriminated by code system"/>
        <rules value="open"/>
      </slicing>
      <short value="Concept - reference to a terminology or just  text"/>
      <definition
                  value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."/>
      <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."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceCode"/>
        </extension>
        <strength value="preferred"/>
        <description
                     value="Type of the substance/product, allergy or intolerance condition."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/uv/ips/ValueSet/allergy-intolerance-substance-condition-uv-ips"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="CE/CNE/CWE"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0"/>
      </extension>
      <path value="AllergyIntolerance.code"/>
      <sliceName value="absentOrUnknownAllergy"/>
      <short value="Code for absent or unknown allergy or intolerance"/>
      <definition
                  value="Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This describes a categorical negated statement (e.g.,  &quot;No known allergy&quot;)."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="absentOrUnknownAllergy"/>
        </extension>
        <strength value="required"/>
        <description
                     value="negation/exclusion codes for reporting no known allergies or not available data."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-allergies-uv-ips"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="CE/CNE/CWE"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.id">
      <path value="AllergyIntolerance.code.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.extension">
      <path value="AllergyIntolerance.code.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding">
      <path value="AllergyIntolerance.code.coding"/>
      <short value="Code defined by a terminology system"/>
      <definition value="A reference to a code defined by a terminology system."/>
      <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."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/Coding-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.id">
      <path value="AllergyIntolerance.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.extension">
      <path value="AllergyIntolerance.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.system">
      <path value="AllergyIntolerance.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <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&#39;s list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri
                value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips"/>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.version">
      <path value="AllergyIntolerance.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <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."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.code">
      <path value="AllergyIntolerance.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <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)."/>
      <requirements value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="AllergyIntolerance.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.display.id">
      <path value="AllergyIntolerance.code.coding.display.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references)"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.display.extension">
      <path value="AllergyIntolerance.code.coding.display.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.display.extension:translation">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0"/>
      </extension>
      <path value="AllergyIntolerance.code.coding.display.extension"/>
      <sliceName value="translation"/>
      <short value="Language Translation (Localization)"/>
      <definition
                  value="Language translation from base language of resource to another language."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/translation"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &#39;value&#39;)])"/>
        <source value="Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="ST.translation"/>
      </mapping>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.display.value">
      <path value="AllergyIntolerance.code.coding.display.value"/>
      <representation value="xmlAttr"/>
      <short value="Primitive value for string"/>
      <definition value="The actual value"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="string.value"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/regex">
          <valueString value="[ \r\n\t\S]+"/>
        </extension>
        <code>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
            <valueString value="string"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
            <valueString value="xsd:string"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type">
            <valueString value="xsd:string"/>
          </extension>
        </code>
      </type>
      <maxLength value="1048576"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element
             id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.userSelected">
      <path value="AllergyIntolerance.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <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 &#39;directly chosen&#39; implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <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 &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.text">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="AllergyIntolerance.code.text"/>
      <short value="Plain text representation of the concept"/>
      <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."/>
      <comment
               value="Very often the text is the same as a displayName of one of the codings."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.9. But note many systems use C*E.2 for this"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./originalText[mediaType/code=&quot;text/plain&quot;]/data"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient"/>
      <short value="Who the sensitivity is for"/>
      <definition value="The patient who has the allergy or intolerance."/>
      <alias value="Patient"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.patient"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.eu/fhir/trillium2/StructureDefinition/Patient-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="(PID-3)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=SBJ].role[classCode=PAT]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.focus"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient.id">
      <path value="AllergyIntolerance.patient.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient.extension">
      <path value="AllergyIntolerance.patient.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient.reference">
      <path value="AllergyIntolerance.patient.reference"/>
      <short value="Literal reference, Relative, internal or absolute URL"/>
      <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 &#39;#&#39;) refer to contained resources."/>
      <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 &quot;/[type]/[id]&quot; then it should be assumed that the reference is to a FHIR RESTful server."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Reference.reference"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <condition value="ref-1"/>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient.identifier">
      <path value="AllergyIntolerance.patient.identifier"/>
      <short value="Logical reference, when literal reference is not known"/>
      <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."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.identifier"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".identifier"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="AllergyIntolerance.patient.display"/>
      <short value="Text alternative for the resource"/>
      <definition
                  value="Plain text narrative that identifies the resource in addition to the resource reference."/>
      <comment
               value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what&#39;s being referenced, not to fully describe it."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.onsetDateTime:onsetDateTime">
      <path value="AllergyIntolerance.onsetDateTime"/>
      <sliceName value="onsetDateTime"/>
      <short value="When allergy or intolerance was identified"/>
      <definition
                  value="Estimated or actual date,  date-time, or age when allergy or intolerance was identified."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.onset[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="effectiveTime.low"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="when.init"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.assertedDate">
      <path value="AllergyIntolerance.assertedDate"/>
      <short value="Date record was believed accurate"/>
      <definition
                  value="The date on which the existance of the AllergyIntolerance was first asserted or acknowledged."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.assertedDate"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mapping>
        <identity value="v2"/>
        <map value="IAM-20"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=AUT].time"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="when.recorded"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.recorder">
      <path value="AllergyIntolerance.recorder"/>
      <short value="Who recorded the sensitivity"/>
      <definition
                  value="Individual who recorded the record and takes responsibility for its content."/>
      <alias value="Author"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.recorder"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=AUT].role"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.author"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.asserter">
      <path value="AllergyIntolerance.asserter"/>
      <short value="Source of the information about the allergy"/>
      <definition
                  value="The source of the information about the allergy that is recorded."/>
      <comment
               value="The recorder takes repsonsibility for the content, but can reference the source from where they got it."/>
      <alias value="Source"/>
      <alias value="Informant"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.asserter"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="IAM-14 (if patient) / IAM-18 (if practitioner)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=INF].role"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.source"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.lastOccurrence">
      <path value="AllergyIntolerance.lastOccurrence"/>
      <short value="Date(/time) of last known occurrence of a reaction"/>
      <definition
                  value="Represents the date and/or time of the last known occurrence of a reaction event."/>
      <comment
               value="This date may be replicated by one of the Onset of Reaction dates. Where a textual representation of the date of last occurrence is required e.g. &#39;In Childhood, &#39;10 years ago&#39; the Comment element should be used."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.lastOccurrence"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map
             value="outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code &lt;= CommonClinicalObservationType, value &lt;= ObservationValue (Reaction Type)].effectiveTime"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.note">
      <path value="AllergyIntolerance.note"/>
      <short value="Additional text not captured in other fields"/>
      <definition
                  value="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields."/>
      <comment
               value="For example: including reason for flagging a seriousness of &#39;High Risk&#39;; and instructions related to future exposure or administration of the substance, such as administration within an Intensive Care Unit or under corticosteroid cover. The notes should be related to an allergy or intolerance as a condition in general and not related to any particular episode of it. For episode notes and descriptions, use AllergyIntolerance.event.description and  AllergyIntolerance.event.notes."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.note"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Annotation"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map
             value="subjectOf.observationEvent[code=&quot;annotation&quot;].value"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction"/>
      <short value="Adverse Reaction Events linked to exposure to substance"/>
      <definition
                  value="Details about each adverse reaction event linked to exposure to the identified substance."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.reaction"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mustSupport value="true"/>
      <mapping>
        <identity value="rim"/>
        <map
             value="outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code &lt;= CommonClinicalObservationType, value &lt;= ObservationValue (Reaction Type)]"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.id">
      <path value="AllergyIntolerance.reaction.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.extension">
      <path value="AllergyIntolerance.reaction.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.modifierExtension">
      <path value="AllergyIntolerance.reaction.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
      <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."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.substance">
      <path value="AllergyIntolerance.reaction.substance"/>
      <short
             value="Specific substance or pharmaceutical product considered to be responsible for event"/>
      <definition
                  value="Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the &#39;code&#39; and ignore the &#39;reaction.substance&#39;."/>
      <comment
               value="Coding of the specific substance (or pharmaceutical product) with a terminology capable of triggering decision support should be used wherever possible.  The &#39;code&#39; element allows for the use of a specific substance or pharmaceutical product, or a group or class of substances. In the case of an allergy or intolerance to a class of substances, (for example, &quot;penicillins&quot;), the &#39;reaction.substance&#39; element could be used to code the specific substance that was identifed as having caused the reaction (for example, &quot;amoxycillin&quot;). Duplication of the value in the &#39;code&#39; and &#39;reaction.substance&#39; elements is acceptable when a specific substance has been recorded in &#39;code&#39;."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.reaction.substance"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="SubstanceCode"/>
        </extension>
        <strength value="example"/>
        <description
                     value="Codes defining the type of the substance (including pharmaceutical products)."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/substance-code"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map
             value="outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code &lt;= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code &lt;= ExposureAgentEntityType]"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0"/>
      </extension>
      <path value="AllergyIntolerance.reaction.manifestation"/>
      <short value="Concept - reference to a terminology or just  text"/>
      <definition
                  value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."/>
      <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."/>
      <min value="1"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.reaction.manifestation"/>
        <min value="1"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Manifestation"/>
        </extension>
        <strength value="preferred"/>
        <valueSetReference>
          <reference
                     value="http://hl7.eu/fhir/trillium2ValueSet/allergy-reaction-uv-ips"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="CE/CNE/CWE"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.description">
      <path value="AllergyIntolerance.reaction.description"/>
      <short value="Description of the event as a whole"/>
      <definition
                  value="Text description about the reaction as a whole, including details of the manifestation if required."/>
      <comment
               value="Use the description to provide any details of a particular event of the occurred reaction such as circumstances, reaction specifics, what happened before/after. Information, related to the event, but not describing a particular care should be captured in the comment field. For example: at the age of four, the patient was given penicillin for strep throat and subsequently developed severe hives."/>
      <alias value="Narrative"/>
      <alias value="Text"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.reaction.description"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="text"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.onset">
      <path value="AllergyIntolerance.reaction.onset"/>
      <short value="Date(/time) when manifestations showed"/>
      <definition
                  value="Record of the date and/or time of the onset of the Reaction."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.reaction.onset"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="AL1-6"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="effectiveTime.low"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.severity">
      <path value="AllergyIntolerance.reaction.severity"/>
      <short value="mild | moderate | severe (of event as a whole)"/>
      <definition
                  value="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations."/>
      <comment
               value="It is acknowledged that this assessment is very subjective. There may be some some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.reaction.severity"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceSeverity"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/reaction-event-severity"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map
             value="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value &lt;= SeverityObservation (Severity Level)]"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.exposureRoute">
      <path value="AllergyIntolerance.reaction.exposureRoute"/>
      <short value="How the subject was exposed to the substance"/>
      <definition
                  value="Identification of the route by which the subject was exposed to the substance."/>
      <comment
               value="Coding of the route of exposure with a terminology should be used wherever possible."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="AllergyIntolerance.reaction.exposureRoute"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="RouteOfAdministration"/>
        </extension>
        <strength value="example"/>
        <description
                     value="A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/route-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map
             value="outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code &lt;= ExposureCode].routeCode"/>
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.note">
      <path value="AllergyIntolerance.reaction.note"/>
      <short value="Text about event not captured in other fields"/>
      <definition
                  value="Additional text about the adverse reaction event not captured in other fields."/>
      <comment
               value="Use this field to record information indirectly related to a particular event and not captured in the description. For example: Clinical records are no longer available, recorded based on information provided to the patient by her mother and her mother is deceased."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="AllergyIntolerance.reaction.note"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Annotation"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map
             value="subjectOf.observationEvent[code=&quot;annotation&quot;].value"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="AllergyIntolerance">
      <path value="AllergyIntolerance"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.id">
      <path value="AllergyIntolerance.id"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.meta">
      <path value="AllergyIntolerance.meta"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.meta.profile">
      <path value="AllergyIntolerance.meta.profile"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.text">
      <path value="AllergyIntolerance.text"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.extension:abatement-datetime">
      <path value="AllergyIntolerance.extension"/>
      <sliceName value="abatement-datetime"/>
      <short value="Abatement datetime"/>
      <definition
                  value="The date or estimated date that the condition resolved or went into remission."/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/abatement-dateTime-uv-ips"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.clinicalStatus">
      <path value="AllergyIntolerance.clinicalStatus"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.verificationStatus">
      <path value="AllergyIntolerance.verificationStatus"/>
      <comment
               value="In the scope of the IPS the entered-in-error concept is not allowed."/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.type">
      <path value="AllergyIntolerance.type"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.criticality">
      <path value="AllergyIntolerance.criticality"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="coding.system"/>
        </discriminator>
        <description value="Discriminated by code system"/>
        <rules value="open"/>
      </slicing>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AllergyIntoleranceCode"/>
        </extension>
        <strength value="preferred"/>
        <description
                     value="Type of the substance/product, allergy or intolerance condition."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/uv/ips/ValueSet/allergy-intolerance-substance-condition-uv-ips"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy">
      <path value="AllergyIntolerance.code"/>
      <sliceName value="absentOrUnknownAllergy"/>
      <short value="Code for absent or unknown allergy or intolerance"/>
      <definition
                  value="Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This describes a categorical negated statement (e.g.,  &quot;No known allergy&quot;)."/>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="absentOrUnknownAllergy"/>
        </extension>
        <strength value="required"/>
        <description
                     value="negation/exclusion codes for reporting no known allergies or not available data."/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-allergies-uv-ips"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding">
      <path value="AllergyIntolerance.code.coding"/>
      <min value="1"/>
      <max value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.code:absentOrUnknownAllergy.coding.system">
      <path value="AllergyIntolerance.code.coding.system"/>
      <min value="1"/>
      <max value="1"/>
      <fixedUri
                value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient"/>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.eu/fhir/trillium2/StructureDefinition/Patient-uv-ips"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.patient.reference">
      <path value="AllergyIntolerance.patient.reference"/>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.onsetDateTime:onsetDateTime">
      <path value="AllergyIntolerance.onsetDateTime"/>
      <sliceName value="onsetDateTime"/>
      <type>
        <code value="dateTime"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.asserter">
      <path value="AllergyIntolerance.asserter"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation"/>
      <type>
        <code value="CodeableConcept"/>
        <profile
                 value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"/>
      </type>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Manifestation"/>
        </extension>
        <strength value="preferred"/>
        <valueSetReference>
          <reference
                     value="http://hl7.eu/fhir/trillium2ValueSet/allergy-reaction-uv-ips"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="AllergyIntolerance.reaction.onset">
      <path value="AllergyIntolerance.reaction.onset"/>
      <mustSupport value="true"/>
    </element>
    <element id="AllergyIntolerance.reaction.severity">
      <path value="AllergyIntolerance.reaction.severity"/>
      <mustSupport value="true"/>
    </element>
  </differential>
</StructureDefinition>