PackagesCanonicalsLogsProblems
    Packages
    gpc.stu3.fhir-assets@1.1.2
    https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-AllergyIntolerance-1
{
  "description": "This AllergyIntolerance Resource records Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.",
  "_filename": "CareConnect-GPC-AllergyIntolerance-1.json",
  "package_name": "gpc.stu3.fhir-assets",
  "date": "2020-02-17",
  "derivation": "constraint",
  "meta": {
    "lastUpdated": "2018-08-02T12:07:36.924+01:00"
  },
  "publisher": "HL7 UK",
  "fhirVersion": "3.0.1",
  "name": "CareConnect-GPC-AllergyIntolerance-1",
  "abstract": false,
  "copyright": "Copyright © 2020 HL7 UK\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "type": "AllergyIntolerance",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "1.1.2",
  "extension": [ {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode": "pc"
  } ],
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-1",
        "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
        "xpath": "not(parent::f:contained and f:text)",
        "severity": "error",
        "expression": "contained.text.empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "dom-3",
        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
        "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
        "severity": "error",
        "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()"
      }, {
        "key": "ait-1",
        "human": "AllergyIntolerance.clinicalStatus SHALL be present if verificationStatus is not entered-in-error.",
        "xpath": "f:verificationStatus/@value='entered-in-error' or exists(f:clinicalStatus)",
        "severity": "error",
        "expression": "verificationStatus='entered-in-error' or clinicalStatus.exists()"
      }, {
        "key": "ait-2",
        "human": "AllergyIntolerance.clinicalStatus SHALL NOT be present if verification Status is entered-in-error",
        "xpath": "f:verificationStatus/@value!='entered-in-error' or not(exists(f:clinicalStatus))",
        "severity": "error",
        "expression": "verificationStatus!='entered-in-error' or clinicalStatus.empty()"
      } ],
      "path": "AllergyIntolerance",
      "min": 0,
      "definition": "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.",
      "short": "Allergy or Intolerance (generally: Risk of adverse reaction to a substance)",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "Observation[classCode=OBS, moodCode=EVN]",
        "identity": "rim"
      }, {
        "map": "clinical.general",
        "identity": "w5"
      } ],
      "alias": [ "Allergy", "Intolerance", "Adverse Reaction" ],
      "max": "*",
      "id": "AllergyIntolerance",
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Resource"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.id",
      "min": 0,
      "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "short": "Logical id of this artifact",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "id"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.id",
      "condition": [ "ele-1" ],
      "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.id"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta",
      "min": 0,
      "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.",
      "short": "Metadata about the resource",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Meta"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.meta",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.meta"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.meta.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.meta.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.meta.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.versionId",
      "min": 0,
      "definition": "The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.",
      "short": "Version specific identifier",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "id"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.meta.versionId",
      "condition": [ "ele-1" ],
      "comment": "The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Meta.versionId"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.lastUpdated",
      "min": 0,
      "definition": "When the resource last changed - e.g. when the version changed.",
      "short": "When the resource version last changed",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "instant"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.meta.lastUpdated",
      "condition": [ "ele-1" ],
      "comment": "This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Meta.lastUpdated"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.profile",
      "min": 1,
      "definition": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().",
      "short": "Profiles this resource claims to conform to",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.meta.profile",
      "condition": [ "ele-1" ],
      "comment": "It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.profile"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.security",
      "min": 0,
      "definition": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
      "short": "Security Labels applied to this resource",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "SecurityLabels"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "Security Labels from the Healthcare Privacy and Security Classification System.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/security-labels"
        }
      },
      "max": "*",
      "id": "AllergyIntolerance.meta.security",
      "condition": [ "ele-1" ],
      "comment": "The security labels can be updated without changing the stated version of the resource  The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.security"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.meta.tag",
      "min": 0,
      "definition": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
      "short": "Tags applied to this resource",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Tags"
        } ],
        "description": "Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\"",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/common-tags"
        }
      },
      "max": "*",
      "id": "AllergyIntolerance.meta.tag",
      "condition": [ "ele-1" ],
      "comment": "The tags can be updated without changing the stated version of the resource.  The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.tag"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.implicitRules",
      "min": 0,
      "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.",
      "isModifier": true,
      "short": "A set of rules under which this content was created",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.implicitRules",
      "condition": [ "ele-1" ],
      "comment": "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. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.implicitRules"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.language",
      "min": 0,
      "definition": "The base language in which the resource is written.",
      "short": "Language of the resource content",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueReference": {
            "reference": "http://hl7.org/fhir/ValueSet/all-languages"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A human language.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.language",
      "condition": [ "ele-1" ],
      "comment": "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).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.language"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.text",
      "min": 0,
      "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "short": "Text summary of the resource, for human interpretation",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      }, {
        "map": "Act.text?",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Narrative"
      } ],
      "alias": [ "narrative", "html", "xhtml", "display" ],
      "max": "1",
      "id": "AllergyIntolerance.text",
      "condition": [ "ele-1", "dom-1" ],
      "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DomainResource.text"
      }
    }, {
      "path": "AllergyIntolerance.contained",
      "min": 0,
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
      "short": "Contained, inline Resources",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Resource"
      } ],
      "alias": [ "inline resources", "anonymous resources", "contained resources" ],
      "max": "*",
      "id": "AllergyIntolerance.contained",
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.contained"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.extension",
      "min": 0,
      "definition": "An associated encounter reference.",
      "short": "An associated encounter reference",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"
      } ],
      "mustSupport": true,
      "sliceName": "encounter",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.extension:encounter",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.extension",
      "min": 0,
      "definition": "Supports the date and reason that the allergy was no longer valid.",
      "short": "Supports the date and reason that the allergy was no longer valid",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-AllergyIntoleranceEnd-1"
      } ],
      "mustSupport": true,
      "sliceName": "allergyEnd",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.extension:allergyEnd",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.extension",
      "min": 0,
      "definition": "A reference to results of investigations that confirmed the certainty of the diagnosis.",
      "short": "A reference to results of investigations that confirmed the certainty of the diagnosis",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-Evidence-1"
      } ],
      "sliceName": "evidence",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.extension:evidence",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.modifierExtension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.modifierExtension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.modifierExtension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier",
      "min": 1,
      "definition": "This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).",
      "short": "External ids for this item",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)",
        "identity": "v2"
      }, {
        "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]",
        "identity": "rim"
      }, {
        "map": "Identifier",
        "identity": "servd"
      }, {
        "map": "IAM-7",
        "identity": "v2"
      }, {
        "map": "id",
        "identity": "rim"
      }, {
        "map": "id",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.identifier",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "AllergyIntolerance.identifier"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.identifier.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.identifier.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary (If known)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known .",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/identifier-use"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.identifier.use",
      "condition": [ "ele-1" ],
      "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 0,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "short": "Description of identifier",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/identifier-type"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.identifier.type",
      "condition": [ "ele-1" ],
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. \n\nWhere the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 1,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.identifier.system",
      "condition": [ "ele-1" ],
      "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "short": "The value that is unique",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.identifier.value",
      "condition": [ "ele-1" ],
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html).",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "per-1",
        "human": "If present, start SHALL have a lower value than end",
        "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)",
        "severity": "error",
        "expression": "start.empty() or end.empty() or (start <= end)"
      } ],
      "path": "AllergyIntolerance.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "DR",
        "identity": "v2"
      }, {
        "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]",
        "identity": "rim"
      }, {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.identifier.period",
      "condition": [ "ele-1" ],
      "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.identifier.assigner",
      "condition": [ "ele-1" ],
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.clinicalStatus",
      "min": 1,
      "definition": "The clinical status of the allergy or intolerance.",
      "isModifier": true,
      "short": "active | inactive | resolved",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Observation ACT\n.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"clinicalStatus\", moodCode=EVN].value",
        "identity": "rim"
      }, {
        "map": "status",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceClinicalStatus"
        } ],
        "description": "The clinical status of the allergy or intolerance.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/allergy-clinical-status"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.clinicalStatus",
      "condition": [ "ele-1", "ait-1", "ait-2" ],
      "comment": "This element is labeled as a modifier because the status contains the codes inactive and resolved that mark the AllergyIntolerance as not currently valid.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.clinicalStatus"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.verificationStatus",
      "fixedCode": "unconfirmed",
      "min": 1,
      "definition": "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).",
      "isModifier": true,
      "short": "unconfirmed | confirmed",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Observation ACT\n.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=\"verificationStatus\", moodCode=EVN].value",
        "identity": "rim"
      }, {
        "map": "status",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceVerificationStatus"
        } ],
        "description": "Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/allergy-verification-status"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.verificationStatus",
      "condition": [ "ele-1", "ait-1", "ait-2" ],
      "comment": "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.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "AllergyIntolerance.verificationStatus"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.type",
      "min": 0,
      "definition": "Identification of the underlying physiological mechanism for the reaction risk.",
      "short": "allergy | intolerance - Underlying mechanism (if known)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "IAM-9",
        "identity": "v2"
      }, {
        "map": "code",
        "identity": "rim"
      }, {
        "map": "class",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceType"
        } ],
        "description": "Identification of the underlying physiological mechanism for a Reaction Risk.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/allergy-intolerance-type"
        }
      },
      "alias": [ "Category", "Class" ],
      "max": "1",
      "id": "AllergyIntolerance.type",
      "condition": [ "ele-1" ],
      "comment": "Allergic (typically immune-mediated) reactions have been traditionally regarded as an indicator for potential escalation to significant future risk. Contemporary knowledge suggests that some reactions previously thought to be immune-mediated are, in fact, non-immune, but in some cases can still pose a life threatening risk. It is acknowledged that many clinicians may not be in a position to distinguish the mechanism of a particular reaction. Often the term \"allergy\" is used rather generically and may overlap with the use of \"intolerance\" - in practice the boundaries between these two concepts may not be well-defined or understood. This data element is included nevertheless, because many legacy systems have captured this attribute. Immunologic testing may provide supporting evidence for the basis of the reaction and the causative substance, but no tests are 100% sensitive or specific for sensitivity to a particular substance. If, as is commonly the case, it is unclear whether the reaction is due to an allergy or an intolerance, then the type element should be omitted from the resource.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.category",
      "min": 1,
      "definition": "Category of the identified substance.",
      "short": "food | medication | environment | biologic",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "AL1-2",
        "identity": "v2"
      }, {
        "map": "value < IntoleranceValue (Agent)",
        "identity": "rim"
      }, {
        "map": "class",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceCategory"
        } ],
        "description": "Category of an identified substance.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/allergy-intolerance-category"
        }
      },
      "alias": [ "Category", "Type", "Reaction Type", "Class" ],
      "max": "*",
      "id": "AllergyIntolerance.category",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "AllergyIntolerance.category"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.criticality",
      "min": 0,
      "definition": "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.",
      "short": "low | high | unable-to-assess",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "AL1-4",
        "identity": "v2"
      }, {
        "map": "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]",
        "identity": "rim"
      }, {
        "map": "grade",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceCriticality"
        } ],
        "description": "Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality"
        }
      },
      "alias": [ "Severity", "Seriousness", "Contra-indication", "Risk" ],
      "max": "1",
      "id": "AllergyIntolerance.criticality",
      "condition": [ "ele-1" ],
      "comment": "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).\n\nSystems 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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.criticality"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code",
      "min": 1,
      "definition": "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\").",
      "short": "Code that identifies the allergy or intolerance",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "AL1-3 / IAM-3",
        "identity": "v2"
      }, {
        "map": "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",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceCode"
        } ],
        "description": "Type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies.",
        "valueSetReference": {
          "reference": "https://fhir.nhs.uk/STU3/ValueSet/CareConnect-AllergyCode-1"
        }
      },
      "alias": [ "Code" ],
      "max": "1",
      "id": "AllergyIntolerance.code",
      "condition": [ "ele-1" ],
      "comment": "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, UNI, ATC and CPT. 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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.code.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.code.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.code.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.code.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.code.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.code.coding.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.code.coding.extension",
      "min": 0,
      "definition": "The SNOMED CT Description ID for the display.",
      "short": "The SNOMED CT Description ID for the display",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.extension:snomedCTDescriptionID",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.system",
      "condition": [ "ele-1" ],
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "AllergyIntolerance.code.coding.version",
      "condition": [ "ele-1" ],
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.code",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.display",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).",
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.code.coding.userSelected",
      "condition": [ "ele-1" ],
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.code.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.code.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.patient",
      "min": 1,
      "definition": "The patient who has the allergy or intolerance.",
      "short": "Who the sensitivity is for",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "(PID-3)",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=SBJ].role[classCode=PAT]",
        "identity": "rim"
      }, {
        "map": "who.focus",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      } ],
      "alias": [ "Patient" ],
      "max": "1",
      "id": "AllergyIntolerance.patient",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "AllergyIntolerance.patient"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.onset[x]",
      "min": 0,
      "definition": "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.",
      "short": "When allergy or intolerance was identified",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "effectiveTime.low",
        "identity": "rim"
      }, {
        "map": "when.init",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      }, {
        "code": "Age"
      }, {
        "code": "Period"
      }, {
        "code": "Range"
      }, {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "AllergyIntolerance.onset[x]",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.onset[x]"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.assertedDate",
      "min": 1,
      "definition": "The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.",
      "short": "Date record was believed accurate",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "IAM-20",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=AUT].time",
        "identity": "rim"
      }, {
        "map": "when.recorded",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.assertedDate",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.assertedDate"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.recorder",
      "min": 1,
      "definition": "Individual who recorded the record and takes responsibility for its content.",
      "short": "Who recorded the sensitivity",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": ".participation[typeCode=AUT].role",
        "identity": "rim"
      }, {
        "map": "who.author",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ],
      "alias": [ "Author" ],
      "max": "1",
      "id": "AllergyIntolerance.recorder",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.recorder"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.asserter",
      "min": 0,
      "definition": "The source of the information about the allergy that is recorded.",
      "short": "Source of the information about the allergy",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "IAM-14 (if patient) / IAM-18 (if practitioner)",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=INF].role",
        "identity": "rim"
      }, {
        "map": "who.source",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ],
      "mustSupport": true,
      "alias": [ "Source", "Informant" ],
      "max": "1",
      "id": "AllergyIntolerance.asserter",
      "condition": [ "ele-1" ],
      "comment": "The recorder takes repsonsibility for the content, but can reference the source from where they got it.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.asserter"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.lastOccurrence",
      "min": 0,
      "definition": "Represents the date and/or time of the last known occurrence of a reaction event.",
      "short": "Date(/time) of last known occurrence of a reaction",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)].effectiveTime",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.lastOccurrence",
      "condition": [ "ele-1" ],
      "comment": "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 Comment element should be used.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.lastOccurrence"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.note",
      "min": 0,
      "definition": "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.",
      "short": "Additional text not captured in other fields",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act",
        "identity": "rim"
      }, {
        "map": "subjectOf.observationEvent[code=\"annotation\"].value",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Annotation"
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "AllergyIntolerance.note",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "AllergyIntolerance.note"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.note.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.note.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.note.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.note.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.note.author[x]",
      "min": 0,
      "definition": "The individual responsible for making the annotation.",
      "short": "Individual responsible for the annotation",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.participant[typeCode=AUT].role",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "string"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.note.author[x]",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Annotation.author[x]"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.note.time",
      "min": 0,
      "definition": "Indicates when this particular annotation was made.",
      "short": "When the annotation was made",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.effectiveTime",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.note.time",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Annotation.time"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.note.text",
      "min": 1,
      "definition": "The text of the annotation.",
      "short": "The annotation  - text content",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.text",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.note.text",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Annotation.text"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction",
      "min": 0,
      "definition": "Details about each adverse reaction event linked to exposure to the identified substance.",
      "short": "Adverse Reaction Events linked to exposure to substance",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.reaction",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "AllergyIntolerance.reaction"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.modifierExtension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.modifierExtension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance",
      "min": 0,
      "definition": "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'.",
      "short": "Specific substance or pharmaceutical product considered to be responsible for event",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "SubstanceCode"
        } ],
        "description": "Codes defining the type of the substance (including pharmaceutical products).",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/substance-code"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance",
      "condition": [ "ele-1" ],
      "comment": "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 identifed 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'.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.reaction.substance"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.substance.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.substance.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.substance.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "sliceName": "snomedCT",
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.extension",
      "min": 0,
      "definition": "The SNOMED CT Description ID for the display.",
      "short": "The SNOMED CT Description ID for the display",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.extension:snomedCTDescriptionID",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "short": "Identity of the terminology system",
      "fixedUri": "http://snomed.info/sct",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.system",
      "condition": [ "ele-1" ],
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.version",
      "condition": [ "ele-1" ],
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.code",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.display",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).",
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.userSelected",
      "condition": [ "ele-1" ],
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.substance.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.substance.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation",
      "min": 1,
      "definition": "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.",
      "short": "Clinical symptoms/signs associated with the Event",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "AL1-5",
        "identity": "v2"
      }, {
        "map": "code",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Manifestation"
        } ],
        "description": "Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event.",
        "valueSetReference": {
          "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-AllergyManifestation-1"
        }
      },
      "alias": [ "Symptoms", "Signs" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.manifestation",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 1,
        "path": "AllergyIntolerance.reaction.manifestation"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.manifestation.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.manifestation.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "sliceName": "snomedCT",
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.extension",
      "min": 0,
      "definition": "The SNOMED CT Description ID for the display.",
      "short": "The SNOMED CT Description ID for the display",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.extension:snomedCTDescriptionID",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "short": "Identity of the terminology system",
      "fixedUri": "http://snomed.info/sct",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.system",
      "condition": [ "ele-1" ],
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.version",
      "condition": [ "ele-1" ],
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.code",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.display",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).",
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.userSelected",
      "condition": [ "ele-1" ],
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.manifestation.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.manifestation.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.description",
      "min": 0,
      "definition": "Text description about the reaction as a whole, including details of the manifestation if required.",
      "short": "Description of the event as a whole",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "text",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "alias": [ "Narrative", "Text" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.description",
      "condition": [ "ele-1" ],
      "comment": "Use the description to provide any details of a particular event of the occurred reaction such as circumstances, reaction specifics, what happened before/after. Information, related to the event, but not describing a particular care should be captured in the comment field. For example: at the age of four, the patient was given penicillin for strep throat and subsequently developed severe hives.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.reaction.description"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.onset",
      "min": 0,
      "definition": "Record of the date and/or time of the onset of the Reaction.",
      "short": "Date(/time) when manifestations showed",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "AL1-6",
        "identity": "v2"
      }, {
        "map": "effectiveTime.low",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.onset",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.reaction.onset"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.severity",
      "min": 0,
      "definition": "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.",
      "short": "mild | moderate | severe (of event as a whole)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceSeverity"
        } ],
        "description": "Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/reaction-event-severity"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.reaction.severity",
      "condition": [ "ele-1" ],
      "comment": "It is acknowledged that this assessment is very subjective. There may be some some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.reaction.severity"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute",
      "min": 0,
      "definition": "Identification of the route by which the subject was exposed to the substance.",
      "short": "How the subject was exposed to the substance",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].routeCode",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "RouteOfAdministration"
        } ],
        "description": "A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.",
        "valueSetReference": {
          "reference": "https://fhir.nhs.uk/STU3/ValueSet/CareConnect-AllergyExposureRoute-1"
        }
      },
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute",
      "condition": [ "ele-1" ],
      "comment": "Coding of the route of exposure with a terminology should be used wherever possible.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "AllergyIntolerance.reaction.exposureRoute"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.exposureRoute.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "sliceName": "snomedCT",
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.extension",
      "min": 0,
      "definition": "The SNOMED CT Description ID for the display.",
      "short": "The SNOMED CT Description ID for the display",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID",
      "alias": [ "extensions", "user content" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.extension:snomedCTDescriptionID",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "short": "Identity of the terminology system",
      "fixedUri": "http://snomed.info/sct",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.system",
      "condition": [ "ele-1" ],
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.version",
      "condition": [ "ele-1" ],
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.code",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.display",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).",
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.userSelected",
      "condition": [ "ele-1" ],
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.exposureRoute.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.exposureRoute.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.note",
      "min": 0,
      "definition": "Additional text about the adverse reaction event not captured in other fields.",
      "short": "Text about event not captured in other fields",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act",
        "identity": "rim"
      }, {
        "map": "subjectOf.observationEvent[code=\"annotation\"].value",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Annotation"
      } ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.note",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "AllergyIntolerance.reaction.note"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.note.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.note.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "AllergyIntolerance.reaction.note.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "AllergyIntolerance.reaction.note.extension",
      "condition": [ "ele-1" ],
      "comment": "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "AllergyIntolerance.reaction.note.author[x]",
      "min": 0,
      "definition": "The individual responsible for making the annotation.",
      "short": "Individual responsible for the annotation",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.participant[typeCode=AUT].role",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "string"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.note.author[x]",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Annotation.author[x]"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.note.time",
      "min": 0,
      "definition": "Indicates when this particular annotation was made.",
      "short": "When the annotation was made",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.effectiveTime",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.note.time",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Annotation.time"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "AllergyIntolerance.reaction.note.text",
      "min": 1,
      "definition": "The text of the annotation.",
      "short": "The annotation  - text content",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act.text",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "AllergyIntolerance.reaction.note.text",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Annotation.text"
      }
    } ]
  },
  "status": "active",
  "id": "56a9845b-22d8-464c-8358-319da1277d38",
  "kind": "resource",
  "url": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-AllergyIntolerance-1",
  "version": "1.7.0",
  "differential": {
    "element": [ {
      "id": "AllergyIntolerance.meta.profile",
      "min": 1,
      "path": "AllergyIntolerance.meta.profile"
    }, {
      "id": "AllergyIntolerance.extension",
      "path": "AllergyIntolerance.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.extension:encounter",
      "max": "1",
      "path": "AllergyIntolerance.extension",
      "type": [ {
        "code": "Extension",
        "profile": "http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"
      } ],
      "sliceName": "encounter",
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.extension:allergyEnd",
      "max": "1",
      "path": "AllergyIntolerance.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-AllergyIntoleranceEnd-1"
      } ],
      "sliceName": "allergyEnd",
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.extension:evidence",
      "max": "1",
      "path": "AllergyIntolerance.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-Evidence-1"
      } ],
      "sliceName": "evidence"
    }, {
      "id": "AllergyIntolerance.identifier",
      "min": 1,
      "path": "AllergyIntolerance.identifier"
    }, {
      "id": "AllergyIntolerance.identifier.system",
      "min": 1,
      "path": "AllergyIntolerance.identifier.system"
    }, {
      "id": "AllergyIntolerance.identifier.value",
      "min": 1,
      "path": "AllergyIntolerance.identifier.value"
    }, {
      "id": "AllergyIntolerance.clinicalStatus",
      "min": 1,
      "path": "AllergyIntolerance.clinicalStatus"
    }, {
      "id": "AllergyIntolerance.verificationStatus",
      "path": "AllergyIntolerance.verificationStatus",
      "short": "unconfirmed | confirmed",
      "fixedCode": "unconfirmed"
    }, {
      "id": "AllergyIntolerance.category",
      "min": 1,
      "path": "AllergyIntolerance.category"
    }, {
      "id": "AllergyIntolerance.code",
      "min": 1,
      "path": "AllergyIntolerance.code",
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "AllergyIntoleranceCode"
        } ],
        "valueSetReference": {
          "reference": "https://fhir.nhs.uk/STU3/ValueSet/CareConnect-AllergyCode-1"
        }
      }
    }, {
      "id": "AllergyIntolerance.code.coding.extension",
      "path": "AllergyIntolerance.code.coding.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.code.coding.extension:snomedCTDescriptionID",
      "path": "AllergyIntolerance.code.coding.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID"
    }, {
      "id": "AllergyIntolerance.code.coding.system",
      "min": 1,
      "path": "AllergyIntolerance.code.coding.system"
    }, {
      "id": "AllergyIntolerance.code.coding.version",
      "max": "0",
      "path": "AllergyIntolerance.code.coding.version"
    }, {
      "id": "AllergyIntolerance.code.coding.code",
      "min": 1,
      "path": "AllergyIntolerance.code.coding.code"
    }, {
      "id": "AllergyIntolerance.patient",
      "path": "AllergyIntolerance.patient",
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      } ]
    }, {
      "id": "AllergyIntolerance.onset[x]",
      "path": "AllergyIntolerance.onset[x]",
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.assertedDate",
      "min": 1,
      "path": "AllergyIntolerance.assertedDate"
    }, {
      "id": "AllergyIntolerance.recorder",
      "min": 1,
      "path": "AllergyIntolerance.recorder",
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ]
    }, {
      "id": "AllergyIntolerance.asserter",
      "path": "AllergyIntolerance.asserter",
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ],
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.note",
      "path": "AllergyIntolerance.note",
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.note.author[x]",
      "path": "AllergyIntolerance.note.author[x]",
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "string"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ]
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding",
      "path": "AllergyIntolerance.reaction.substance.coding",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT",
      "max": "1",
      "path": "AllergyIntolerance.reaction.substance.coding",
      "sliceName": "snomedCT"
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.extension",
      "path": "AllergyIntolerance.reaction.substance.coding.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.extension:snomedCTDescriptionID",
      "path": "AllergyIntolerance.reaction.substance.coding.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID"
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.system",
      "min": 1,
      "path": "AllergyIntolerance.reaction.substance.coding.system",
      "fixedUri": "http://snomed.info/sct"
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.version",
      "max": "0",
      "path": "AllergyIntolerance.reaction.substance.coding.version"
    }, {
      "id": "AllergyIntolerance.reaction.substance.coding:snomedCT.code",
      "min": 1,
      "path": "AllergyIntolerance.reaction.substance.coding.code"
    }, {
      "id": "AllergyIntolerance.reaction.manifestation",
      "path": "AllergyIntolerance.reaction.manifestation",
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Manifestation"
        } ],
        "valueSetReference": {
          "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-AllergyManifestation-1"
        }
      }
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding",
      "path": "AllergyIntolerance.reaction.manifestation.coding",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT",
      "max": "1",
      "path": "AllergyIntolerance.reaction.manifestation.coding",
      "sliceName": "snomedCT"
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.extension",
      "path": "AllergyIntolerance.reaction.manifestation.coding.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.extension:snomedCTDescriptionID",
      "path": "AllergyIntolerance.reaction.manifestation.coding.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID"
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.system",
      "min": 1,
      "path": "AllergyIntolerance.reaction.manifestation.coding.system",
      "fixedUri": "http://snomed.info/sct"
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.version",
      "max": "0",
      "path": "AllergyIntolerance.reaction.manifestation.coding.version"
    }, {
      "id": "AllergyIntolerance.reaction.manifestation.coding:snomedCT.code",
      "min": 1,
      "path": "AllergyIntolerance.reaction.manifestation.coding.code"
    }, {
      "id": "AllergyIntolerance.reaction.severity",
      "path": "AllergyIntolerance.reaction.severity",
      "mustSupport": true
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute",
      "path": "AllergyIntolerance.reaction.exposureRoute",
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "RouteOfAdministration"
        } ],
        "valueSetReference": {
          "reference": "https://fhir.nhs.uk/STU3/ValueSet/CareConnect-AllergyExposureRoute-1"
        }
      }
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding",
      "path": "AllergyIntolerance.reaction.exposureRoute.coding",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "system",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT",
      "max": "1",
      "path": "AllergyIntolerance.reaction.exposureRoute.coding",
      "sliceName": "snomedCT"
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.extension",
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.extension:snomedCTDescriptionID",
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.extension",
      "type": [ {
        "code": "Extension",
        "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
      } ],
      "sliceName": "snomedCTDescriptionID"
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.system",
      "min": 1,
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.system",
      "fixedUri": "http://snomed.info/sct"
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.version",
      "max": "0",
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.version"
    }, {
      "id": "AllergyIntolerance.reaction.exposureRoute.coding:snomedCT.code",
      "min": 1,
      "path": "AllergyIntolerance.reaction.exposureRoute.coding.code"
    }, {
      "id": "AllergyIntolerance.reaction.note.author[x]",
      "path": "AllergyIntolerance.reaction.note.author[x]",
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
      }, {
        "code": "string"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
      }, {
        "code": "Reference",
        "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
      } ]
    } ]
  },
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"
}