### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/AllergyIntolerance.json
### ----------------------------------------------------
### -- Chunk 8 of 8
code"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "AllergyIntoleranceCategory"
        }],
        "strength" : "required",
        "description" : "Category of an identified substance associated with allergies or intolerances.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/allergy-intolerance-category|4.0.0"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.class"
      },
      {
        "identity" : "v2",
        "map" : "AL1-2"
      },
      {
        "identity" : "rim",
        "map" : "value < IntoleranceValue (Agent)"
      }]
    },
    {
      "id" : "AllergyIntolerance.criticality",
      "path" : "AllergyIntolerance.criticality",
      "short" : "low | high | unable-to-assess",
      "definition" : "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.",
      "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).  Systems that capture a severity at the condition level are actually representing the concept of criticality whereas the severity documented at the reaction level is representing the true reaction severity.  Existing systems that are capturing both condition criticality and reaction severity may use the term \"severity\" to represent both.  Criticality is the worst it could be in the future (i.e. situation-agnostic) whereas severity is situation-dependent.",
      "alias" : ["Severity",
      "Seriousness",
      "Contra-indication",
      "Risk"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "AllergyIntoleranceCriticality"
        }],
        "strength" : "required",
        "description" : "Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality|4.0.0"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.grade"
      },
      {
        "identity" : "v2",
        "map" : "AL1-4"
      },
      {
        "identity" : "rim",
        "map" : "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]"
      }]
    },
    {
      "id" : "AllergyIntolerance.code",
      "path" : "AllergyIntolerance.code",
      "short" : "Code that identifies the allergy or intolerance",
      "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\").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.",
      "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, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text.\r\rWhen a substance or product code is specified for the 'code' element, the \"default\" semantic context is that this is a positive statement of an allergy or intolerance (depending on the value of the 'type' element, if present) condition to the specified substance/product.  In the corresponding SNOMED CT allergy model, the specified substance/product is the target (destination) of the \"Causative agent\" relationship.\r\rThe 'substanceExposureRisk' extension is available as a structured and more flexible alternative to the 'code' element for making positive or negative allergy or intolerance statements.  This extension provides the capability to make \"no known allergy\" (or \"no risk of adverse reaction\") statements regarding any coded substance/product (including cases when a pre-coordinated \"no allergy to x\" concept for that substance/product does not exist).  If the 'substanceExposureRisk' extension is present, the AllergyIntolerance.code element SHALL be omitted.",
      "alias" : ["Code"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "AllergyIntoleranceCode"
        }],
        "strength" : "example",
        "description" : "Type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/allergyintolerance-code"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.what[x]"
      },
      {
        "identity" : "v2",
        "map" : "AL1-3 / IAM-3"
      },
      {
        "identity" : "rim",
        "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"
      }]
    },
    {
      "id" : "AllergyIntolerance.patient",
      "path" : "AllergyIntolerance.patient",
      "short" : "Who the sensitivity is for",
      "definition" : "The patient who has the allergy or intolerance.",
      "alias" : ["Patient"],
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.subject[x]"
      },
      {
        "identity" : "v2",
        "map" : "(PID-3)"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=SBJ].role[classCode=PAT]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "AllergyIntolerance.encounter",
      "path" : "AllergyIntolerance.encounter",
      "short" : "Encounter when the allergy or intolerance was asserted",
      "definition" : "The encounter when the allergy or intolerance was asserted.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"]
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"
      }]
    },
    {
      "id" : "AllergyIntolerance.onset[x]",
      "path" : "AllergyIntolerance.onset[x]",
      "short" : "When allergy or intolerance was identified",
      "definition" : "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      },
      {
        "code" : "Age"
      },
      {
        "code" : "Period"
      },
      {
        "code" : "Range"
      },
      {
        "code" : "string"
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.init"
      },
      {
        "identity" : "rim",
        "map" : "effectiveTime.low"
      }]
    },
    {
      "id" : "AllergyIntolerance.recordedDate",
      "path" : "AllergyIntolerance.recordedDate",
      "short" : "Date first version of the resource instance was recorded",
      "definition" : "The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.recorded"
      },
      {
        "identity" : "v2",
        "map" : "IAM-13"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=AUT].time"
      }]
    },
    {
      "id" : "AllergyIntolerance.recorder",
      "path" : "AllergyIntolerance.recorder",
      "short" : "Who recorded the sensitivity",
      "definition" : "Individual who recorded the record and takes responsibility for its content.",
      "alias" : ["Author"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson"]
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.author"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=AUT].role"
      }]
    },
    {
      "id" : "AllergyIntolerance.asserter",
      "path" : "AllergyIntolerance.asserter",
      "short" : "Source of the information about the allergy",
      "definition" : "The source of the information about the allergy that is recorded.",
      "comment" : "The recorder takes responsibility for the content, but can reference the source from where they got it.",
      "alias" : ["Source",
      "Informant"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.source"
      },
      {
        "identity" : "v2",
        "map" : "IAM-14 (if patient) / IAM-18 (if practitioner)"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=INF].role"
      }]
    },
    {
      "id" : "AllergyIntolerance.lastOccurrence",
      "path" : "AllergyIntolerance.lastOccurrence",
      "short" : "Date(/time) of last known occurrence of a reaction",
      "definition" : "Represents the date and/or time of the last known occurrence of a reaction event.",
      "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.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)].effectiveTime"
      }]
    },
    {
      "id" : "AllergyIntolerance.note",
      "path" : "AllergyIntolerance.note",
      "short" : "Additional text not captured in other fields",
      "definition" : "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.",
      "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.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Annotation"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "subjectOf.observationEvent[code=\"annotation\"].value"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction",
      "path" : "AllergyIntolerance.reaction",
      "short" : "Adverse Reaction Events linked to exposure to substance",
      "definition" : "Details about each adverse reaction event linked to exposure to the identified substance.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)]"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.substance",
      "path" : "AllergyIntolerance.reaction.substance",
      "short" : "Specific substance or pharmaceutical product considered to be responsible for event",
      "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'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.",
      "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 identified as having caused the reaction (for example, \"amoxycillin\"). Duplication of the value in the 'code' and 'reaction.substance' elements is acceptable when a specific substance has been recorded in 'code'.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "SubstanceCode"
        }],
        "strength" : "example",
        "description" : "Codes defining the type of the substance (including pharmaceutical products).",
        "valueSet" : "http://hl7.org/fhir/ValueSet/substance-code"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code <= ExposureAgentEntityType]"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.manifestation",
      "path" : "AllergyIntolerance.reaction.manifestation",
      "short" : "Clinical symptoms/signs associated with the Event",
      "definition" : "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.",
      "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.",
      "alias" : ["Symptoms",
      "Signs"],
      "min" : 1,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Manifestation"
        }],
        "strength" : "example",
        "description" : "Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/clinical-findings"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "AL1-5"
      },
      {
        "identity" : "rim",
        "map" : "code"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.description",
      "path" : "AllergyIntolerance.reaction.description",
      "short" : "Description of the event as a whole",
      "definition" : "Text description about the reaction as a whole, including details of the manifestation if required.",
      "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.",
      "alias" : ["Narrative",
      "Text"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "text"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.onset",
      "path" : "AllergyIntolerance.reaction.onset",
      "short" : "Date(/time) when manifestations showed",
      "definition" : "Record of the date and/or time of the onset of the Reaction.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "AL1-6"
      },
      {
        "identity" : "rim",
        "map" : "effectiveTime.low"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.severity",
      "path" : "AllergyIntolerance.reaction.severity",
      "short" : "mild | moderate | severe (of event as a whole)",
      "definition" : "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.",
      "comment" : "It is acknowledged that this assessment is very subjective. There may be some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "AllergyIntoleranceSeverity"
        }],
        "strength" : "required",
        "description" : "Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/reaction-event-severity|4.0.0"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.exposureRoute",
      "path" : "AllergyIntolerance.reaction.exposureRoute",
      "short" : "How the subject was exposed to the substance",
      "definition" : "Identification of the route by which the subject was exposed to the substance.",
      "comment" : "Coding of the route of exposure with a terminology should be used wherever possible.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "RouteOfAdministration"
        }],
        "strength" : "example",
        "description" : "A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/route-codes"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code <= ExposureCode].routeCode"
      }]
    },
    {
      "id" : "AllergyIntolerance.reaction.note",
      "path" : "AllergyIntolerance.reaction.note",
      "short" : "Text about event not captured in other fields",
      "definition" : "Additional text about the adverse reaction event not captured in other fields.",
      "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.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Annotation"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "subjectOf.observationEvent[code=\"annotation\"].value"
      }]
    }]
  }
}


