<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="IPSAllergiesAndIntolerances" />
  <url value="http://openehr.org/StructureDefinition/IPSAllergiesAndIntolerances" />
  <version value="1.1.0-alpha.3" />
  <name value="IPSAllergiesAndIntolerances" />
  <title value="IPS - Allergies and Intolerances.v1" />
  <status value="active" />
  <description value="`[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1]`&#xA;                             A persistent and managed list of adverse reactions experienced by the subject that may influence clinical decision-making and care provision.)" />
  <fhirVersion value="4.0.1" />
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://openehr.org/StructureDefinition/IPSAllergiesAndIntolerances" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <differential>
    <element id="IPSAllergiesAndIntolerances">
      <path value="IPSAllergiesAndIntolerances" />
      <short value="IPS - Allergies and Intolerances.v1" />
      <definition value="`[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1]`&#xA;                             A persistent and managed list of adverse reactions experienced by the subject that may influence clinical decision-making and care provision.)" />
    </element>
    <element id="IPSAllergiesAndIntolerances.category">
      <path value="IPSAllergiesAndIntolerances.category" />
      <short value="category" />
      <definition value="`[RM]`&#xA;                             Temporal category of this Composition, persistent / episodic or event.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http:openehr.org/ValueSet/Category" />
      </binding>
    </element>
    <element id="IPSAllergiesAndIntolerances.composer">
      <path value="IPSAllergiesAndIntolerances.composer" />
      <short value="composer" />
      <definition value="`[RM]`&#xA;                             The person primarily responsible for the content of the Composition (but not necessarily its committal into the EHR system). This is the identifier which should appear on the screen. It may or may not be the person who entered the data. When it is the patient, the special self instance of `PARTY_SELF` will be used.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.context">
      <path value="IPSAllergiesAndIntolerances.context" />
      <short value="context" />
      <definition value="`[RM]`&#xA;                             `COMPOSITION.context` - Documents the context information of a healthcare event involving the subject of care and the health system. The context information recorded here are independent of the attributes recorded in the version audit, which document the system interaction context, i.e. the context of a user interacting with the health record system. Healthcare events include patient contacts, and any other business activity, such as pathology investigations which take place on behalf of the patient.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.context.startTime">
      <path value="IPSAllergiesAndIntolerances.context.startTime" />
      <short value="start_time" />
      <definition value="`[RM]`&#xA;                             COMPOSITION.context.start_time - Start time of the clinical session or other kind of event during which a provider performs a service of any kind for the patient.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.context.setting">
      <path value="IPSAllergiesAndIntolerances.context.setting" />
      <short value="setting" />
      <definition value="`[RM]`&#xA;                             The setting in which the clinical session took place. Coded using the openEHR Terminology, setting group.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http:openehr.org/ValueSet/Setting" />
      </binding>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances" />
      <short value="Allergies &amp; Intolerances" />
      <definition value="`[openEHR-EHR-SECTION.adhoc.v1]`&#xA;                             A generic section header which should be renamed in a template to suit a specific clinical context.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance" />
      <short value="Allergy Intolerance" />
      <definition value="`[openEHR-EHR-EVALUATION.adverse_reaction_risk.v2]`&#xA;                             Clinical assessment of the propensity for an individual to experience a harmful or undesirable physiological response if exposed, or re-exposed, to a substance.)" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.substance">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.substance" />
      <short value="Substance" />
      <definition value="`[at0002]`&#xA;                             Identification of a substance, or substance class, that is considered to put the individual at risk of an adverse reaction event.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.verificationStatus">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.verificationStatus" />
      <short value="Verification status" />
      <definition value="`[at0063]`&#xA;                             Assertion about the certainty of the propensity, or potential future risk, of the identified 'Substance' to cause a reaction.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="preferred" />
        <valueSet value="http:openehr.org/ValueSet/VerificationStatus" />
      </binding>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.criticality">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier">
        <valueIdentifier>
          <system value="http:/openehr.org/openEHR-EHR-EVALUATION.adverse_reaction_risk.v2" />
          <value value="at0101" />
        </valueIdentifier>
      </extension>
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.criticality" />
      <short value="Criticality" />
      <definition value="`[at0101]`&#xA;                             An indication of the potential for critical system organ damage or life threatening consequence.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="preferred" />
        <valueSet value="http:openehr.org/ValueSet/Criticality" />
      </binding>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.type">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.type" />
      <short value="Type" />
      <definition value="`[at0058]`&#xA;                             Identification of the underlying physiological mechanism for the adverse reaction.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent" />
      <short value="Adverse reaction event" />
      <definition value="`[openEHR-EHR-CLUSTER.adverse_reaction_event.v1]`&#xA;                             Information about a specific adverse reaction event caused by exposure to a specific substance.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.manifestation">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.manifestation" />
      <short value="Manifestation" />
      <definition value="`[at0006]`&#xA;                             Clinical symptoms and/or signs that are observed or associated with the adverse reaction.)" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.onset">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.onset" />
      <short value="Onset" />
      <definition value="`[at0008]`&#xA;                             The date and/or time of the onset of the reaction.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.severity">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.adverseReactionEvent.severity" />
      <short value="Severity" />
      <definition value="`[at0010]`&#xA;                             Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="preferred" />
        <valueSet value="http:openehr.org/ValueSet/Severity" />
      </binding>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.comment">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.comment" />
      <short value="Comment" />
      <definition value="`[at0006]`&#xA;                             Additional narrative about the propensity for the adverse reaction, not captured in other fields.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.lastUpdated">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AllergyIntolerance.lastUpdated" />
      <short value="Last updated" />
      <definition value="`[at0062]`&#xA;                             Date when the propensity or the reaction event was updated.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.ExclusionGlobal">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.ExclusionGlobal" />
      <short value="Exclusion - global" />
      <definition value="`[openEHR-EHR-EVALUATION.exclusion_global.v1]`&#xA;                             An overall statement of exclusion about all Problems/diagnoses, Family history, Medications, Procedures, Adverse reactions or other clinical items that are either not currently present, or have not been present in the past.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.ExclusionGlobal.globalExclusionOfAdverseReactions">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.ExclusionGlobal.globalExclusionOfAdverseReactions" />
      <short value="Global exclusion of adverse reactions" />
      <definition value="`[at0002]`&#xA;                             Overall statement of exclusion about all adverse reactions at the time of recording.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation" />
      <short value="Absence of information" />
      <definition value="`[openEHR-EHR-EVALUATION.absence.v2]`&#xA;                             Statement that specified health information is not available for inclusion in the health record or extract at the time of recording.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation.absenceStatement">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation.absenceStatement" />
      <short value="Absence statement" />
      <definition value="`[at0002]`&#xA;                             Positive statement that no information is available.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation.lastUpdated">
      <path value="IPSAllergiesAndIntolerances.allergiesIntolerances.AbsenceOfInformation.lastUpdated" />
      <short value="Last updated" />
      <definition value="`[at0004]`&#xA;                             The date at which the absence was last updated.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
  </differential>
</StructureDefinition>