{
  "resourceType": "StructureDefinition",
  "id": "no-basis-AllergyIntolerance",
  "url": "http://hl7.no/fhir/StructureDefinition/no-basis-AllergyIntolerance",
  "version": "0.1",
  "name": "no-basis-AllergyIntolerance",
  "status": "draft",
  "date": "2018-10-26",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance",
        "path": "AllergyIntolerance",
        "definition": "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.\r\n\r\nNorwegian profile: \r\nno-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:\r\n- There are restrictions to use verificationStatus since KI is using Certainty that has similar use\r\n- Reference to patient is changes. no-basis-patient should be used.\r\n- Substance is required and should include one of: ATC, FestSubstance, FestMedication\r\n- manifestation is changed to use codingsystem 7497\r\n- the profile is extended with certanity and sourceOfInformation to support national KI standard"
      },
      {
        "id": "AllergyIntolerance.extension",
        "path": "AllergyIntolerance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.extension:certainty",
        "path": "AllergyIntolerance.extension",
        "sliceName": "certainty",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://ehelse.no/fhir/StructureDefinition/no-basis-Certainty"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:sourceOfInformation",
        "path": "AllergyIntolerance.extension",
        "sliceName": "sourceOfInformation",
        "type": [
          {
            "code": "Extension",
            "profile": "http://ehelse.no/fhir/StructureDefinition/no-basis-SourceOfInformation"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.verificationStatus",
        "path": "AllergyIntolerance.verificationStatus",
        "definition": "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).\r\n\r\nOnly the values \"confirmed\" and \"refuted\" are used. The availeble values are differnt from Norwegian stadard values. Certainty is used to identify the norwegian values."
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://ehelse.no/fhir/StructureDefinition/no-basis-Patient"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.substance",
        "path": "AllergyIntolerance.reaction.substance",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding",
        "path": "AllergyIntolerance.reaction.substance.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:ATC",
        "path": "AllergyIntolerance.reaction.substance.coding",
        "sliceName": "ATC",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:ATC.system",
        "path": "AllergyIntolerance.reaction.substance.coding.system",
        "fixedUri": "http://www.whocc.no/atc"
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:FestSubstance",
        "path": "AllergyIntolerance.reaction.substance.coding",
        "sliceName": "FestSubstance",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:FestSubstance.system",
        "path": "AllergyIntolerance.reaction.substance.coding.system",
        "fixedUri": "http://ehelse.no/FESTSubstance"
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:FestMedication",
        "path": "AllergyIntolerance.reaction.substance.coding",
        "sliceName": "FestMedication",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding:FestMedication.system",
        "path": "AllergyIntolerance.reaction.substance.coding.system",
        "fixedUri": "http://ehelse.no/FESTMedication"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "definition": "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event. Coding system 7497 shall be used.",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding",
        "path": "AllergyIntolerance.reaction.manifestation.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding.system",
        "path": "AllergyIntolerance.reaction.manifestation.coding.system",
        "min": 1,
        "fixedUri": "http://ehelse.no/volven/7497"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding.code",
        "path": "AllergyIntolerance.reaction.manifestation.coding.code",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AllergyIntolerance.reaction.manifestation.coding.display",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.reaction.severity",
        "path": "AllergyIntolerance.reaction.severity",
        "definition": "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."
      }
    ]
  }
}