{
  "resourceType": "StructureDefinition",
  "extension": [
    {
      "url": "http://clinfhir.com/fhir/StructureDefinition/baseTypeForModel",
      "valueString": "AllergyIntolerance"
    }
  ],
  "id": "Allergies",
  "url": "http://hapi.fhir.org/baseR4/StructureDefinition/Allergies",
  "name": "Allergies",
  "title": "Alleries Desc",
  "purpose": "vffv",
  "publisher": "Test Pub",
  "status": "draft",
  "date": "2022-04-27T17:24:14+00:00",
  "identifier": [
    {
      "system": "http://clinfhir.com",
      "value": "author"
    }
  ],
  "keyword": [
    {
      "system": "http://fhir.hl7.org.nz/NamingSystem/application",
      "code": "clinfhir"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element",
  "type": "Allergies",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "label": "Allergies",
        "id": "Allergies",
        "path": "Allergies",
        "definition": "No description",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Allergies",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "identifier",
        "id": "Allergies.identifier",
        "path": "Allergies.identifier",
        "short": "External ids for this item",
        "definition": "Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.",
        "min": 0,
        "max": "*",
        "mustSupport": false,
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.identifier|"
          }
        ],
        "type": [
          {
            "code": "Identifier",
            "isComplexDT": true
          },
          {
            "code": "Age",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.identifier",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "clinicalStatus",
        "id": "Allergies.clinicalStatus",
        "path": "Allergies.clinicalStatus",
        "short": "active | inactive | resolved",
        "definition": "The clinical status of the allergy or intolerance.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.clinicalStatus|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.clinicalStatus",
          "min": 0,
          "max": "1"
        },
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AllergyIntoleranceClinicalStatus"
            }
          ],
          "strength": "required",
          "description": "The clinical status of the allergy or intolerance.",
          "valueSet": "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1"
        }
      },
      {
        "label": "verificationStatus",
        "id": "Allergies.verificationStatus",
        "path": "Allergies.verificationStatus",
        "short": "unconfirmed | confirmed | refuted | entered-in-error",
        "definition": "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.verificationStatus|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.verificationStatus",
          "min": 0,
          "max": "1"
        },
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AllergyIntoleranceVerificationStatus"
            }
          ],
          "strength": "required",
          "description": "Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance.",
          "valueSet": "http://hl7.org/fhir/ValueSet/allergyintolerance-verification|4.0.1"
        }
      },
      {
        "label": "type",
        "id": "Allergies.type",
        "path": "Allergies.type",
        "short": "allergy | intolerance - Underlying mechanism (if known)",
        "definition": "Identification of the underlying physiological mechanism for the reaction risk.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.type|"
          }
        ],
        "type": [
          {
            "code": "code"
          }
        ],
        "base": {
          "path": "Allergies.type",
          "min": 0,
          "max": "1"
        },
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AllergyIntoleranceType"
            }
          ],
          "strength": "required",
          "description": "Identification of the underlying physiological mechanism for a Reaction Risk.",
          "valueSet": "http://hl7.org/fhir/ValueSet/allergy-intolerance-type|4.0.1"
        }
      },
      {
        "label": "category",
        "id": "Allergies.category",
        "path": "Allergies.category",
        "short": "food | medication | environment | biologic",
        "definition": "Category of the identified substance.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.category|"
          }
        ],
        "type": [
          {
            "code": "code"
          }
        ],
        "base": {
          "path": "Allergies.category",
          "min": 0,
          "max": "1"
        },
        "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.1"
        }
      },
      {
        "label": "criticality",
        "id": "Allergies.criticality",
        "path": "Allergies.criticality",
        "short": "low | high | unable-to-assess",
        "definition": "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.criticality|"
          }
        ],
        "type": [
          {
            "code": "code"
          }
        ],
        "base": {
          "path": "Allergies.criticality",
          "min": 0,
          "max": "1"
        },
        "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.1"
        }
      },
      {
        "label": "code",
        "id": "Allergies.code",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.code|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.code",
          "min": 0,
          "max": "1"
        },
        "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"
        }
      },
      {
        "label": "patient",
        "id": "Allergies.patient",
        "path": "Allergies.patient",
        "short": "Who the sensitivity is for",
        "definition": "The patient who has the allergy or intolerance.",
        "min": 1,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.patient|"
          }
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ],
        "base": {
          "path": "Allergies.patient",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "encounter",
        "id": "Allergies.encounter",
        "path": "Allergies.encounter",
        "short": "Encounter when the allergy or intolerance was asserted",
        "definition": "The encounter when the allergy or intolerance was asserted.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.encounter|"
          }
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Encounter"
            ]
          }
        ],
        "base": {
          "path": "Allergies.encounter",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "onset[x]",
        "id": "Allergies.onset[x]",
        "path": "Allergies.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",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.onset[x]|"
          }
        ],
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Age",
            "isComplexDT": true
          },
          {
            "code": "Period",
            "isComplexDT": true
          },
          {
            "code": "Range",
            "isComplexDT": true
          },
          {
            "code": "string"
          }
        ],
        "base": {
          "path": "Allergies.onset[x]",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "recordedDate",
        "id": "Allergies.recordedDate",
        "path": "Allergies.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",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.recordedDate|"
          }
        ],
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "base": {
          "path": "Allergies.recordedDate",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "recorder",
        "id": "Allergies.recorder",
        "path": "Allergies.recorder",
        "short": "Who recorded the sensitivity",
        "definition": "Individual who recorded the record and takes responsibility for its content.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.recorder|"
          }
        ],
        "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"
            ]
          }
        ],
        "base": {
          "path": "Allergies.recorder",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "asserter",
        "id": "Allergies.asserter",
        "path": "Allergies.asserter",
        "short": "Source of the information about the allergy",
        "definition": "The source of the information about the allergy that is recorded.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.asserter|"
          }
        ],
        "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"
            ]
          }
        ],
        "base": {
          "path": "Allergies.asserter",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "lastOccurrence",
        "id": "Allergies.lastOccurrence",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.lastOccurrence|"
          }
        ],
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "base": {
          "path": "Allergies.lastOccurrence",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "note",
        "id": "Allergies.note",
        "path": "Allergies.note",
        "short": "Additional text not captured in other fields",
        "definition": "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.note|"
          }
        ],
        "type": [
          {
            "code": "Annotation",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.note",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "reaction",
        "id": "Allergies.reaction",
        "path": "Allergies.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": "*",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction|"
          }
        ],
        "type": [
          {
            "code": "BackboneElement",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.reaction",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "substance",
        "id": "Allergies.reaction.substance",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.substance|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.reaction.substance",
          "min": 0,
          "max": "1"
        },
        "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"
        }
      },
      {
        "label": "manifestation",
        "id": "Allergies.reaction.manifestation",
        "path": "Allergies.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.",
        "min": 1,
        "max": "*",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.manifestation|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.reaction.manifestation",
          "min": 0,
          "max": "1"
        },
        "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"
        }
      },
      {
        "label": "description",
        "id": "Allergies.reaction.description",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.description|"
          }
        ],
        "type": [
          {
            "code": "string"
          }
        ],
        "base": {
          "path": "Allergies.reaction.description",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "onset",
        "id": "Allergies.reaction.onset",
        "path": "Allergies.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",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.onset|"
          }
        ],
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "base": {
          "path": "Allergies.reaction.onset",
          "min": 0,
          "max": "1"
        }
      },
      {
        "label": "severity",
        "id": "Allergies.reaction.severity",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.severity|"
          }
        ],
        "type": [
          {
            "code": "code"
          }
        ],
        "base": {
          "path": "Allergies.reaction.severity",
          "min": 0,
          "max": "1"
        },
        "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.1"
        }
      },
      {
        "label": "exposureRoute",
        "id": "Allergies.reaction.exposureRoute",
        "path": "Allergies.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.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.exposureRoute|"
          }
        ],
        "type": [
          {
            "code": "CodeableConcept",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.reaction.exposureRoute",
          "min": 0,
          "max": "1"
        },
        "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"
        }
      },
      {
        "label": "note",
        "id": "Allergies.reaction.note",
        "path": "Allergies.reaction.note",
        "short": "Text about event not captured in other fields",
        "definition": "Additional text about the adverse reaction event not captured in other fields.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "fhir",
            "map": "AllergyIntolerance.reaction.note|"
          }
        ],
        "type": [
          {
            "code": "Annotation",
            "isComplexDT": true
          }
        ],
        "base": {
          "path": "Allergies.reaction.note",
          "min": 0,
          "max": "1"
        }
      }
    ]
  }
}