FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Example StructureDefinition/AllergyIntolerance (Turtle)

Patient Care Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient, Practitioner, RelatedPerson

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for allergyintolerance

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "AllergyIntolerance"] ;
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2024-03-27T11:56:58.316+00:00" ]
  ] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "trial-use" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ] ;
     fhir:value [ fhir:v "pc" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm" ] ;
     fhir:value [ fhir:v "3" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category" ] ;
     fhir:value [ fhir:v "patient" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"] ;
  fhir:version [ fhir:v "6.0.0-cibuild"], [ fhir:v "6.0.0-cibuild"] ;
  fhir:name [ fhir:v "AllergyIntolerance"], [ fhir:v "AllergyIntolerance"] ;
  fhir:status [ fhir:v "draft"], [ fhir:v "draft"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2024-03-27T11:56:58+00:00"], [ fhir:v "2024-03-27T11:56:58+00:00"] ;
  fhir:publisher [ fhir:v "HL7 International / Patient Care"], [ fhir:v "HL7 International / Patient Care"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/patientcare" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/patientcare" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."], [ fhir:v "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:purpose [ fhir:v "To record a clinical assessment of a propensity, or potential risk to an individual, of an adverse reaction upon future exposure to the specified substance, or class of substance."], [ fhir:v "To record a clinical assessment of a propensity, or potential risk to an individual, of an adverse reaction upon future exposure to the specified substance, or class of substance."] ;
  fhir:fhirVersion [ fhir:v "6.0.0-cibuild"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "w5" ] ;
     fhir:uri [ fhir:v "http://hl7.org/fhir/fivews" ] ;
     fhir:name [ fhir:v "FiveWs Pattern Mapping" ]
  ] [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] [
     fhir:identity [ fhir:v "v2" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v2" ] ;
     fhir:name [ fhir:v "HL7 V2 Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "resource"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "AllergyIntolerance"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "AllergyIntolerance" ] ;
       fhir:path [ fhir:v "AllergyIntolerance" ] ;
       fhir:short [ fhir:v "Allergy or Intolerance (generally: Risk of adverse reaction to a substance)" ] ;
       fhir:definition [ fhir:v "Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "Allergy" ] [ fhir:v "Intolerance" ] [ fhir:v "Adverse Reaction" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "dom-2" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ] ;
         fhir:expression [ fhir:v "contained.contained.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource" ] ;
         fhir:expression [ fhir:v "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-4" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ] ;
         fhir:expression [ fhir:v "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-5" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a security label" ] ;
         fhir:expression [ fhir:v "contained.meta.security.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice" ] ;
           fhir:value [ fhir:v "true" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation" ] ;
           fhir:value [ fhir:v "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." ]
         ] ) ;
         fhir:key [ fhir:v "dom-6" ] ;
         fhir:severity [ fhir:v "warning" ] ;
         fhir:human [ fhir:v "A resource should have narrative for robust management" ] ;
         fhir:expression [ fhir:v "text.`div`.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Entity, Role, or Act,Observation[classCode=OBS, moodCode=EVN]" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "clinical.general" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.id" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.id" ] ;
       fhir:short [ fhir:v "Logical id of this artifact" ] ;
       fhir:definition [ fhir:v "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ] ;
       fhir:comment [ fhir:v "Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.meta" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.meta" ] ;
       fhir:short [ fhir:v "Metadata about the resource" ] ;
       fhir:definition [ fhir:v "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.meta" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Meta" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.implicitRules" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.implicitRules" ] ;
       fhir:short [ fhir:v "A set of rules under which this content was created" ] ;
       fhir:definition [ fhir:v "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc." ] ;
       fhir:comment [ fhir:v "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. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.implicitRules" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.language" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.language" ] ;
       fhir:short [ fhir:v "Language of the resource content" ] ;
       fhir:definition [ fhir:v "The base language in which the resource is written." ] ;
       fhir:comment [ fhir:v "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)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.language" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "Language" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ] ;
           fhir:value [ fhir:v "true" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "IETF language tag for a human language" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/all-languages|6.0.0-cibuild" ] ;
         fhir:additional ( [
           fhir:purpose [ fhir:v "starter" ] ;
           fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/languages" ]
         ] )
       ]
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.text" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.text" ] ;
       fhir:short [ fhir:v "Text summary of the resource, for human interpretation" ] ;
       fhir:definition [ fhir:v "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ] ;
       fhir:comment [ fhir:v "Contained resources do not have a narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later." ] ;
       fhir:alias ( [ fhir:v "narrative" ] [ fhir:v "html" ] [ fhir:v "xhtml" ] [ fhir:v "display" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.text" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Narrative" ]
       ] ) ;
       fhir:condition ( [ fhir:v "dom-6" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Act.text?" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.contained" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.contained" ] ;
       fhir:short [ fhir:v "Contained, inline Resources" ] ;
       fhir:definition [ fhir:v "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning." ] ;
       fhir:comment [ fhir:v "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. Contained resources may have profiles and tags in their meta elements, but SHALL NOT have security labels." ] ;
       fhir:alias ( [ fhir:v "inline resources" ] [ fhir:v "anonymous resources" ] [ fhir:v "contained resources" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.contained" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Resource" ]
       ] ) ;
       fhir:condition ( [ fhir:v "dom-2" ] [ fhir:v "dom-4" ] [ fhir:v "dom-3" ] [ fhir:v "dom-5" ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.extension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, 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." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.modifierExtension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored" ] ;
       fhir:definition [ fhir:v "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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.identifier" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.identifier" ] ;
       fhir:short [ fhir:v "External ids for this item" ] ;
       fhir:definition [ fhir:v "Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ] ;
       fhir:comment [ fhir:v "This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number." ] ;
       fhir:requirements [ fhir:v "Allows identification of the AllergyIntolerance as it is known by various participating systems and in a way that remains consistent across servers." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.identifier" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.identifier" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-7" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "id" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.clinicalStatus" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.clinicalStatus" ] ;
       fhir:short [ fhir:v "active | inactive | resolved" ] ;
       fhir:definition [ fhir:v "The clinical status of the allergy or intolerance." ] ;
       fhir:comment [ fhir:v "AllergyIntolerance.clinicalStatus should be present if verificationStatus is not entered-in-error and the AllergyIntolerance.code isn't negated (No Known Allergy, No Drug Allergy, No Food Allergy, No Latex Allergy).\nRefer to [discussion](extensibility.html#Special-Case) if clinicalStatus is missing data.\nThe data type is CodeableConcept because clinicalStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.clinicalStatus" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the status contains the codes inactive and resolved that mark the AllergyIntolerance as no longer active." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceClinicalStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "The clinical status of the allergy or intolerance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.status" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"clinicalStatus\", moodCode=EVN].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.verificationStatus" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.verificationStatus" ] ;
       fhir:short [ fhir:v "unconfirmed | presumed | confirmed | refuted | entered-in-error" ] ;
       fhir:definition [ fhir:v "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute." ] ;
       fhir:comment [ fhir:v "The data type is CodeableConcept because verificationStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.verificationStatus" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the status contains the codes refuted and entered-in-error that mark the AllergyIntolerance as not currently valid." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceVerificationStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-verification|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.status" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"verificationStatus\", moodCode=EVN].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.type" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "AllergyIntolerance.type" ] ;
       fhir:short [ fhir:v "allergy | intolerance - Underlying mechanism (if known)" ] ;
       fhir:definition [ fhir:v "Identification of the underlying physiological mechanism for the reaction risk." ] ;
       fhir:comment [ fhir:v "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 might not be in a position to distinguish the mechanism of a particular reaction. Often the term \"allergy\" is used rather generically and may overlap with the use of \"intolerance\" - in practice the boundaries between these two concepts might 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." ] ;
       fhir:alias ( [ fhir:v "Category" ] [ fhir:v "Class" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.type" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceType" ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "Identification of the underlying physiological mechanism for a Reaction Risk." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-type" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-9" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "code" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.category" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.category" ] ;
       fhir:short [ fhir:v "food | medication | environment | biologic" ] ;
       fhir:definition [ fhir:v "Category of the identified substance." ] ;
       fhir:comment [ fhir:v "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't have a category valued will not be returned.  Refer to [search](search.html) for more information on how to search category with a :missing modifier to get allergies that don't have a category.  Additionally, category should be used with caution because category can be subjective based on the sender." ] ;
       fhir:alias ( [ fhir:v "Category" ] [ fhir:v "Type" ] [ fhir:v "Reaction Type" ] [ fhir:v "Class" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.category" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCategory" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Category of an identified substance associated with allergies or intolerances." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-category|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "value < IntoleranceValue (Agent)" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.criticality" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.criticality" ] ;
       fhir:short [ fhir:v "low | high | unable-to-assess" ] ;
       fhir:definition [ fhir:v "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance." ] ;
       fhir:comment [ fhir:v "The default criticality value for any propensity to an adverse reaction should be 'Low Risk', indicating at the very least a relative contraindication to deliberate or voluntary exposure to the substance. 'High Risk' 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 \"severity\" to represent both.  Criticality is the worst it could be in the future (i.e. situation-agnostic) whereas severity is situation-dependent." ] ;
       fhir:alias ( [ fhir:v "Severity" ] [ fhir:v "Seriousness" ] [ fhir:v "Contra-indication" ] [ fhir:v "Risk" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.criticality" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCriticality" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.grade" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-4" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.code" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.code" ] ;
       fhir:short [ fhir:v "Code that identifies the allergy or intolerance" ] ;
       fhir:definition [ fhir:v "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").  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 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." ] ;
       fhir:comment [ fhir:v "It is strongly recommended that this element be populated using a terminology, where possible. For example, some terminologies used include RxNorm, SNOMED CT, DM+D, NDFRT, ICD-9, IDC-10, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text.\r\rWhen a substance or product code is specified for the 'code' element, the \"default\" semantic context is that this is a positive statement of an allergy or intolerance (depending on the value of the 'type' element, if present) condition to the specified substance/product.  In the corresponding SNOMED CT allergy model, the specified substance/product is the target (destination) of the \"Causative agent\" relationship.\r\rThe 'substanceExposureRisk' extension is available as a structured and more flexible alternative to the 'code' element for making positive or negative allergy or intolerance statements.  This extension provides the capability to make \"no known allergy\" (or \"no risk of adverse reaction\") statements regarding any coded substance/product (including cases when a pre-coordinated \"no allergy to x\" concept for that substance/product does not exist).  If the 'substanceExposureRisk' extension is present, the AllergyIntolerance.code element SHALL be omitted." ] ;
       fhir:alias ( [ fhir:v "Code" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.code" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCode" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-code" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.what[x]" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-3 / IAM-3" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "substance/product:\r\r.participation[typeCode=CAGNT].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]\r\rnegated/excluded substance/product:\r\r.participation[typeCode=CAGNT, negationInd=true].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]\r\rpositive or negated/excluded condition/situation:\r\rObservation.code=ASSERTION; Observation.value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.patient" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.patient" ] ;
       fhir:short [ fhir:v "Who the allergy or intolerance is for" ] ;
       fhir:definition [ fhir:v "The patient who has the allergy or intolerance." ] ;
       fhir:alias ( [ fhir:v "Patient" ] ) ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.patient" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Patient" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.subject[x]" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(PID-3)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=SBJ].role[classCode=PAT]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.encounter" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.encounter" ] ;
       fhir:short [ fhir:v "Encounter when the allergy or intolerance was asserted" ] ;
       fhir:definition [ fhir:v "The encounter when the allergy or intolerance was asserted." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.encounter" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.context" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.onset[x]" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.onset[x]" ] ;
       fhir:short [ fhir:v "When allergy or intolerance was identified" ] ;
       fhir:definition [ fhir:v "Estimated or actual date,  date-time, or age when allergy or intolerance was identified." ] ;
       fhir:comment [ fhir:v "Age is generally used when the patient reports an age at which the AllergyIntolerance was noted. Period is generally used to convey an imprecise onset that occurred within the time period.  Range is generally used to convey an imprecise age range (e.g. 4 to 6 years old)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.onset[x]" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] [
         fhir:code [ fhir:v "Age" ]
       ] [
         fhir:code [ fhir:v "Period" ]
       ] [
         fhir:code [ fhir:v "Range" ]
       ] [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.init" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "effectiveTime.low" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.recordedDate" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.recordedDate" ] ;
       fhir:short [ fhir:v "Date allergy or intolerance was first recorded" ] ;
       fhir:definition [ fhir:v "The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date." ] ;
       fhir:comment [ fhir:v "When onset date is unknown, recordedDate can be used to establish if the allergy or intolerance was present on or before a given date.  If the recordedDate is known and provided by a sending system, it is preferred that the receiving system preserve that recordedDate value. If the recordedDate is not provided by the sending system, the receipt timestamp is sometimes used as the recordedDate." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.recordedDate" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.recorded" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-13" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=AUT].time" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant" ] ;
       fhir:short [ fhir:v "Who or what participated in the activities related to the allergy or intolerance and how they were involved" ] ;
       fhir:definition [ fhir:v "Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.participant" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=PRF]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.id" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "string" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.extension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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 managable, 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." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.modifierExtension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
       fhir:definition [ fhir:v "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, 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. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.function" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.function" ] ;
       fhir:short [ fhir:v "Type of involvement" ] ;
       fhir:definition [ fhir:v "Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.participant.function" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceParticipantFunction" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ] ;
           fhir:value [ fhir:v "true" ]
         ] ) ;
         fhir:strength [ fhir:v "extensible" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/participation-role-type" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation.functionCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.actor" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.actor" ] ;
       fhir:short [ fhir:v "Who or what participated in the activities related to the allergy or intolerance" ] ;
       fhir:definition [ fhir:v "Indicates who or what participated in the activities related to the allergy or intolerance." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.participant.actor" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/PractitionerRole" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Patient" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/RelatedPerson" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Device" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Organization" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/CareTeam" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.who" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.lastOccurrence" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.lastOccurrence" ] ;
       fhir:short [ fhir:v "Date(/time) of last known occurrence of a reaction" ] ;
       fhir:definition [ fhir:v "Represents the date and/or time of the last known occurrence of a reaction event." ] ;
       fhir:comment [ fhir:v "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. 'In Childhood, '10 years ago' the AllergyIntolerance.note element should be used." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.lastOccurrence" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)].effectiveTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.note" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.note" ] ;
       fhir:short [ fhir:v "Additional text not captured in other fields" ] ;
       fhir:definition [ fhir:v "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ] ;
       fhir:comment [ fhir:v "For example: including reason for flagging a seriousness of 'High Risk'; 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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.note" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Annotation" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "subjectOf.observationEvent[code=\"annotation\"].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction" ] ;
       fhir:short [ fhir:v "Adverse Reaction Events linked to exposure to substance" ] ;
       fhir:definition [ fhir:v "Details about each adverse reaction event linked to exposure to the identified substance." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.id" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "string" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.extension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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 managable, 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." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.modifierExtension" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
       fhir:definition [ fhir:v "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, 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. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.substance" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.substance" ] ;
       fhir:short [ fhir:v "Specific substance or pharmaceutical product considered to be responsible for event" ] ;
       fhir:definition [ fhir:v "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 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." ] ;
       fhir:comment [ fhir:v "Coding of the specific substance (or pharmaceutical product) with a terminology capable of triggering decision support should be used wherever possible.  The 'code' 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, \"penicillins\"), the 'reaction.substance' element could be used to code the specific substance that was identified as having caused the reaction (for example, \"amoxycillin\"). Duplication of the value in the 'code' and 'reaction.substance' elements is acceptable when a specific substance has been recorded in 'code'." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.substance" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "SubstanceCode" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Codes defining the type of the substance (including pharmaceutical products)." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/substance-code" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.manifestation" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.manifestation" ] ;
       fhir:short [ fhir:v "Clinical symptoms/signs associated with the Event" ] ;
       fhir:definition [ fhir:v "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event." ] ;
       fhir:comment [ fhir:v "Manifestation can be expressed as a single word, phrase or brief description. For example: nausea, rash or no reaction. It is preferable that manifestation should be coded with a terminology, where possible. The values entered here may be used to display on an application screen as part of a list of adverse reactions, as recommended in the UK NHS CUI guidelines.  Terminologies commonly used include, but are not limited to, SNOMED CT or ICD10." ] ;
       fhir:alias ( [ fhir:v "Symptoms" ] [ fhir:v "Signs" ] ) ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.manifestation" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableReference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Observation" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "Manifestation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/clinical-findings" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-5" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "code" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.description" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.description" ] ;
       fhir:short [ fhir:v "Description of the event as a whole" ] ;
       fhir:definition [ fhir:v "Text description about the reaction as a whole, including details of the manifestation if required." ] ;
       fhir:comment [ fhir:v "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 note field. For example: at the age of four, the patient was given penicillin for strep throat and subsequently developed severe hives." ] ;
       fhir:alias ( [ fhir:v "Narrative" ] [ fhir:v "Text" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.description" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "text" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.onset" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.onset" ] ;
       fhir:short [ fhir:v "Date(/time) when manifestations showed" ] ;
       fhir:definition [ fhir:v "Record of the date and/or time of the onset of the Reaction." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.onset" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-6" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "effectiveTime.low" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.severity" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.severity" ] ;
       fhir:short [ fhir:v "mild | moderate | severe (of event as a whole)" ] ;
       fhir:definition [ fhir:v "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations." ] ;
       fhir:comment [ fhir:v "It is acknowledged that this assessment is very subjective. There may be some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.severity" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceSeverity" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/reaction-event-severity|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.exposureRoute" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.exposureRoute" ] ;
       fhir:short [ fhir:v "How the subject was exposed to the substance" ] ;
       fhir:definition [ fhir:v "Identification of the route by which the subject was exposed to the substance." ] ;
       fhir:comment [ fhir:v "Coding of the route of exposure with a terminology should be used wherever possible." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.exposureRoute" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "RouteOfAdministration" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept describing the route or physiological path of exposure to a substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/route-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].routeCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.note" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.note" ] ;
       fhir:short [ fhir:v "Text about event not captured in other fields" ] ;
       fhir:definition [ fhir:v "Additional text about the adverse reaction event not captured in other fields." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "AllergyIntolerance.reaction.note" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Annotation" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "subjectOf.observationEvent[code=\"annotation\"].value" ]
       ] )
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "AllergyIntolerance" ] ;
       fhir:path [ fhir:v "AllergyIntolerance" ] ;
       fhir:short [ fhir:v "Allergy or Intolerance (generally: Risk of adverse reaction to a substance)" ] ;
       fhir:definition [ fhir:v "Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "Allergy" ] [ fhir:v "Intolerance" ] [ fhir:v "Adverse Reaction" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "clinical.general" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Observation[classCode=OBS, moodCode=EVN]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.identifier" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.identifier" ] ;
       fhir:short [ fhir:v "External ids for this item" ] ;
       fhir:definition [ fhir:v "Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ] ;
       fhir:comment [ fhir:v "This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number." ] ;
       fhir:requirements [ fhir:v "Allows identification of the AllergyIntolerance as it is known by various participating systems and in a way that remains consistent across servers." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.identifier" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-7" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "id" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.clinicalStatus" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.clinicalStatus" ] ;
       fhir:short [ fhir:v "active | inactive | resolved" ] ;
       fhir:definition [ fhir:v "The clinical status of the allergy or intolerance." ] ;
       fhir:comment [ fhir:v "AllergyIntolerance.clinicalStatus should be present if verificationStatus is not entered-in-error and the AllergyIntolerance.code isn't negated (No Known Allergy, No Drug Allergy, No Food Allergy, No Latex Allergy).\nRefer to [discussion](extensibility.html#Special-Case) if clinicalStatus is missing data.\nThe data type is CodeableConcept because clinicalStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the status contains the codes inactive and resolved that mark the AllergyIntolerance as no longer active." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceClinicalStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "The clinical status of the allergy or intolerance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.status" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"clinicalStatus\", moodCode=EVN].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.verificationStatus" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.verificationStatus" ] ;
       fhir:short [ fhir:v "unconfirmed | presumed | confirmed | refuted | entered-in-error" ] ;
       fhir:definition [ fhir:v "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute." ] ;
       fhir:comment [ fhir:v "The data type is CodeableConcept because verificationStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the status contains the codes refuted and entered-in-error that mark the AllergyIntolerance as not currently valid." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceVerificationStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-verification|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.status" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"verificationStatus\", moodCode=EVN].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.type" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "AllergyIntolerance.type" ] ;
       fhir:short [ fhir:v "allergy | intolerance - Underlying mechanism (if known)" ] ;
       fhir:definition [ fhir:v "Identification of the underlying physiological mechanism for the reaction risk." ] ;
       fhir:comment [ fhir:v "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 might not be in a position to distinguish the mechanism of a particular reaction. Often the term \"allergy\" is used rather generically and may overlap with the use of \"intolerance\" - in practice the boundaries between these two concepts might 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." ] ;
       fhir:alias ( [ fhir:v "Category" ] [ fhir:v "Class" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceType" ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "Identification of the underlying physiological mechanism for a Reaction Risk." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-type" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-9" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "code" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.category" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.category" ] ;
       fhir:short [ fhir:v "food | medication | environment | biologic" ] ;
       fhir:definition [ fhir:v "Category of the identified substance." ] ;
       fhir:comment [ fhir:v "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't have a category valued will not be returned.  Refer to [search](search.html) for more information on how to search category with a :missing modifier to get allergies that don't have a category.  Additionally, category should be used with caution because category can be subjective based on the sender." ] ;
       fhir:alias ( [ fhir:v "Category" ] [ fhir:v "Type" ] [ fhir:v "Reaction Type" ] [ fhir:v "Class" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCategory" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Category of an identified substance associated with allergies or intolerances." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-category|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "value < IntoleranceValue (Agent)" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.criticality" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.criticality" ] ;
       fhir:short [ fhir:v "low | high | unable-to-assess" ] ;
       fhir:definition [ fhir:v "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance." ] ;
       fhir:comment [ fhir:v "The default criticality value for any propensity to an adverse reaction should be 'Low Risk', indicating at the very least a relative contraindication to deliberate or voluntary exposure to the substance. 'High Risk' 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 \"severity\" to represent both.  Criticality is the worst it could be in the future (i.e. situation-agnostic) whereas severity is situation-dependent." ] ;
       fhir:alias ( [ fhir:v "Severity" ] [ fhir:v "Seriousness" ] [ fhir:v "Contra-indication" ] [ fhir:v "Risk" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCriticality" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.grade" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-4" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.code" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.code" ] ;
       fhir:short [ fhir:v "Code that identifies the allergy or intolerance" ] ;
       fhir:definition [ fhir:v "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").  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 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." ] ;
       fhir:comment [ fhir:v "It is strongly recommended that this element be populated using a terminology, where possible. For example, some terminologies used include RxNorm, SNOMED CT, DM+D, NDFRT, ICD-9, IDC-10, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text.\r\rWhen a substance or product code is specified for the 'code' element, the \"default\" semantic context is that this is a positive statement of an allergy or intolerance (depending on the value of the 'type' element, if present) condition to the specified substance/product.  In the corresponding SNOMED CT allergy model, the specified substance/product is the target (destination) of the \"Causative agent\" relationship.\r\rThe 'substanceExposureRisk' extension is available as a structured and more flexible alternative to the 'code' element for making positive or negative allergy or intolerance statements.  This extension provides the capability to make \"no known allergy\" (or \"no risk of adverse reaction\") statements regarding any coded substance/product (including cases when a pre-coordinated \"no allergy to x\" concept for that substance/product does not exist).  If the 'substanceExposureRisk' extension is present, the AllergyIntolerance.code element SHALL be omitted." ] ;
       fhir:alias ( [ fhir:v "Code" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceCode" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/allergyintolerance-code" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.what[x]" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-3 / IAM-3" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "substance/product:\r\r.participation[typeCode=CAGNT].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]\r\rnegated/excluded substance/product:\r\r.participation[typeCode=CAGNT, negationInd=true].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]\r\rpositive or negated/excluded condition/situation:\r\rObservation.code=ASSERTION; Observation.value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.patient" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.patient" ] ;
       fhir:short [ fhir:v "Who the allergy or intolerance is for" ] ;
       fhir:definition [ fhir:v "The patient who has the allergy or intolerance." ] ;
       fhir:alias ( [ fhir:v "Patient" ] ) ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Patient" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.subject[x]" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(PID-3)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=SBJ].role[classCode=PAT]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.encounter" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.encounter" ] ;
       fhir:short [ fhir:v "Encounter when the allergy or intolerance was asserted" ] ;
       fhir:definition [ fhir:v "The encounter when the allergy or intolerance was asserted." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.context" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.onset[x]" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.onset[x]" ] ;
       fhir:short [ fhir:v "When allergy or intolerance was identified" ] ;
       fhir:definition [ fhir:v "Estimated or actual date,  date-time, or age when allergy or intolerance was identified." ] ;
       fhir:comment [ fhir:v "Age is generally used when the patient reports an age at which the AllergyIntolerance was noted. Period is generally used to convey an imprecise onset that occurred within the time period.  Range is generally used to convey an imprecise age range (e.g. 4 to 6 years old)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] [
         fhir:code [ fhir:v "Age" ]
       ] [
         fhir:code [ fhir:v "Period" ]
       ] [
         fhir:code [ fhir:v "Range" ]
       ] [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.init" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "effectiveTime.low" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.recordedDate" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.recordedDate" ] ;
       fhir:short [ fhir:v "Date allergy or intolerance was first recorded" ] ;
       fhir:definition [ fhir:v "The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date." ] ;
       fhir:comment [ fhir:v "When onset date is unknown, recordedDate can be used to establish if the allergy or intolerance was present on or before a given date.  If the recordedDate is known and provided by a sending system, it is preferred that the receiving system preserve that recordedDate value. If the recordedDate is not provided by the sending system, the receipt timestamp is sometimes used as the recordedDate." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.recorded" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "IAM-13" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=AUT].time" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant" ] ;
       fhir:short [ fhir:v "Who or what participated in the activities related to the allergy or intolerance and how they were involved" ] ;
       fhir:definition [ fhir:v "Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=PRF]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.function" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.function" ] ;
       fhir:short [ fhir:v "Type of involvement" ] ;
       fhir:definition [ fhir:v "Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceParticipantFunction" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ] ;
           fhir:value [ fhir:v "true" ]
         ] ) ;
         fhir:strength [ fhir:v "extensible" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/participation-role-type" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation.functionCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.participant.actor" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.participant.actor" ] ;
       fhir:short [ fhir:v "Who or what participated in the activities related to the allergy or intolerance" ] ;
       fhir:definition [ fhir:v "Indicates who or what participated in the activities related to the allergy or intolerance." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/PractitionerRole" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Patient" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/RelatedPerson" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Device" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Organization" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/CareTeam" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.who" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.lastOccurrence" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.lastOccurrence" ] ;
       fhir:short [ fhir:v "Date(/time) of last known occurrence of a reaction" ] ;
       fhir:definition [ fhir:v "Represents the date and/or time of the last known occurrence of a reaction event." ] ;
       fhir:comment [ fhir:v "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. 'In Childhood, '10 years ago' the AllergyIntolerance.note element should be used." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)].effectiveTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.note" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.note" ] ;
       fhir:short [ fhir:v "Additional text not captured in other fields" ] ;
       fhir:definition [ fhir:v "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ] ;
       fhir:comment [ fhir:v "For example: including reason for flagging a seriousness of 'High Risk'; 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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Annotation" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "subjectOf.observationEvent[code=\"annotation\"].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction" ] ;
       fhir:short [ fhir:v "Adverse Reaction Events linked to exposure to substance" ] ;
       fhir:definition [ fhir:v "Details about each adverse reaction event linked to exposure to the identified substance." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.substance" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.substance" ] ;
       fhir:short [ fhir:v "Specific substance or pharmaceutical product considered to be responsible for event" ] ;
       fhir:definition [ fhir:v "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 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." ] ;
       fhir:comment [ fhir:v "Coding of the specific substance (or pharmaceutical product) with a terminology capable of triggering decision support should be used wherever possible.  The 'code' 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, \"penicillins\"), the 'reaction.substance' element could be used to code the specific substance that was identified as having caused the reaction (for example, \"amoxycillin\"). Duplication of the value in the 'code' and 'reaction.substance' elements is acceptable when a specific substance has been recorded in 'code'." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "SubstanceCode" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Codes defining the type of the substance (including pharmaceutical products)." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/substance-code" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.manifestation" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.manifestation" ] ;
       fhir:short [ fhir:v "Clinical symptoms/signs associated with the Event" ] ;
       fhir:definition [ fhir:v "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event." ] ;
       fhir:comment [ fhir:v "Manifestation can be expressed as a single word, phrase or brief description. For example: nausea, rash or no reaction. It is preferable that manifestation should be coded with a terminology, where possible. The values entered here may be used to display on an application screen as part of a list of adverse reactions, as recommended in the UK NHS CUI guidelines.  Terminologies commonly used include, but are not limited to, SNOMED CT or ICD10." ] ;
       fhir:alias ( [ fhir:v "Symptoms" ] [ fhir:v "Signs" ] ) ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableReference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Observation" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "Manifestation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/clinical-findings" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-5" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "code" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.description" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.description" ] ;
       fhir:short [ fhir:v "Description of the event as a whole" ] ;
       fhir:definition [ fhir:v "Text description about the reaction as a whole, including details of the manifestation if required." ] ;
       fhir:comment [ fhir:v "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 note field. For example: at the age of four, the patient was given penicillin for strep throat and subsequently developed severe hives." ] ;
       fhir:alias ( [ fhir:v "Narrative" ] [ fhir:v "Text" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "text" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.onset" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.onset" ] ;
       fhir:short [ fhir:v "Date(/time) when manifestations showed" ] ;
       fhir:definition [ fhir:v "Record of the date and/or time of the onset of the Reaction." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "AL1-6" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "effectiveTime.low" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.severity" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.severity" ] ;
       fhir:short [ fhir:v "mild | moderate | severe (of event as a whole)" ] ;
       fhir:definition [ fhir:v "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations." ] ;
       fhir:comment [ fhir:v "It is acknowledged that this assessment is very subjective. There may be some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "AllergyIntoleranceSeverity" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/reaction-event-severity|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.exposureRoute" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.exposureRoute" ] ;
       fhir:short [ fhir:v "How the subject was exposed to the substance" ] ;
       fhir:definition [ fhir:v "Identification of the route by which the subject was exposed to the substance." ] ;
       fhir:comment [ fhir:v "Coding of the route of exposure with a terminology should be used wherever possible." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "RouteOfAdministration" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept describing the route or physiological path of exposure to a substance." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/route-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].routeCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "AllergyIntolerance.reaction.note" ] ;
       fhir:path [ fhir:v "AllergyIntolerance.reaction.note" ] ;
       fhir:short [ fhir:v "Text about event not captured in other fields" ] ;
       fhir:definition [ fhir:v "Additional text about the adverse reaction event not captured in other fields." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Annotation" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "subjectOf.observationEvent[code=\"annotation\"].value" ]
       ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.