<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="no-basis-AllergyIntolerance" />
  <url value="http://hl7.no/fhir/StructureDefinition/no-basis-AllergyIntolerance" />
  <version value="0.1" />
  <name value="no-basis-AllergyIntolerance" />
  <status value="draft" />
  <date value="2018-10-26" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AllergyIntolerance" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" />
  <derivation value="constraint" />
  <differential>
    <element id="AllergyIntolerance">
      <path value="AllergyIntolerance" />
      <definition value="Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.&#xD;&#xA;&#xD;&#xA;Norwegian profile: &#xD;&#xA;no-basis-AllergyIntolerance is the basic profile for communicating Allergy intoleeance identifed for a patient. It is adapted to be used in Norway. The profile has the following changes from AllergyIntolerance:&#xD;&#xA;- There are restrictions to use verificationStatus since KI is using Certainty that has similar use&#xD;&#xA;- Reference to patient is changes. no-basis-patient should be used.&#xD;&#xA;- Substance is required and should include one of: ATC, FestSubstance, FestMedication&#xD;&#xA;- manifestation is changed to use codingsystem 7497&#xD;&#xA;- the profile is extended with certanity and sourceOfInformation to support national KI standard" />
    </element>
    <element id="AllergyIntolerance.extension">
      <path value="AllergyIntolerance.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.extension:certainty">
      <path value="AllergyIntolerance.extension" />
      <sliceName value="certainty" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ehelse.no/fhir/StructureDefinition/no-basis-Certainty" />
      </type>
    </element>
    <element id="AllergyIntolerance.extension:sourceOfInformation">
      <path value="AllergyIntolerance.extension" />
      <sliceName value="sourceOfInformation" />
      <type>
        <code value="Extension" />
        <profile value="http://ehelse.no/fhir/StructureDefinition/no-basis-SourceOfInformation" />
      </type>
    </element>
    <element id="AllergyIntolerance.verificationStatus">
      <path value="AllergyIntolerance.verificationStatus" />
      <definition value="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).&#xD;&#xA;&#xD;&#xA;Only the values &quot;confirmed&quot; and &quot;refuted&quot; are used. The availeble values are differnt from Norwegian stadard values. Certainty is used to identify the norwegian values." />
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehelse.no/fhir/StructureDefinition/no-basis-Patient" />
      </type>
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance">
      <path value="AllergyIntolerance.reaction.substance" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding">
      <path value="AllergyIntolerance.reaction.substance.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:ATC">
      <path value="AllergyIntolerance.reaction.substance.coding" />
      <sliceName value="ATC" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:ATC.system">
      <path value="AllergyIntolerance.reaction.substance.coding.system" />
      <fixedUri value="http://www.whocc.no/atc" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:FestSubstance">
      <path value="AllergyIntolerance.reaction.substance.coding" />
      <sliceName value="FestSubstance" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:FestSubstance.system">
      <path value="AllergyIntolerance.reaction.substance.coding.system" />
      <fixedUri value="http://ehelse.no/FESTSubstance" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:FestMedication">
      <path value="AllergyIntolerance.reaction.substance.coding" />
      <sliceName value="FestMedication" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding:FestMedication.system">
      <path value="AllergyIntolerance.reaction.substance.coding.system" />
      <fixedUri value="http://ehelse.no/FESTMedication" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation" />
      <definition value="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event. Coding system 7497 shall be used." />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding">
      <path value="AllergyIntolerance.reaction.manifestation.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding.system">
      <path value="AllergyIntolerance.reaction.manifestation.coding.system" />
      <min value="1" />
      <fixedUri value="http://ehelse.no/volven/7497" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding.code">
      <path value="AllergyIntolerance.reaction.manifestation.coding.code" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="AllergyIntolerance.reaction.manifestation.coding.display" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.severity">
      <path value="AllergyIntolerance.reaction.severity" />
      <definition value="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations. Mapping to KI standard  is Severe=Alvorlig. Moderate=Mild=Mindre alvorlig." />
    </element>
  </differential>
</StructureDefinition>