{
  "resourceType": "StructureDefinition",
  "id": "allergyIntolerance-eu-core",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    }
  ],
  "url": "http://hl7.eu/fhir/base/StructureDefinition/allergyIntolerance-eu-core",
  "name": "AllergyIntoleranceEuCore",
  "title": "AllergyIntolerance (EU core)",
  "status": "active",
  "description": "This profile introduces essential constraints and extensions for the AllergyIntolerance resource that apply across multiple use cases.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.language",
        "path": "AllergyIntolerance.language",
        "short": "Language of the allergy or intolerance content"
      },
      {
        "id": "AllergyIntolerance.extension",
        "path": "AllergyIntolerance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.extension:abatement",
        "path": "AllergyIntolerance.extension",
        "sliceName": "abatement",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:abatement.value[x]",
        "path": "AllergyIntolerance.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.extension:abatement.value[x]:valueDateTime",
        "path": "AllergyIntolerance.extension.value[x]",
        "sliceName": "valueDateTime",
        "short": "End date",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.identifier",
        "path": "AllergyIntolerance.identifier",
        "short": "Business identifier for the allergy or intolerance"
      },
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "short": "Current allergy or Intolerance status"
      },
      {
        "id": "AllergyIntolerance.verificationStatus",
        "path": "AllergyIntolerance.verificationStatus",
        "short": "Certainty"
      },
      {
        "id": "AllergyIntolerance.type",
        "path": "AllergyIntolerance.type",
        "short": "Type of propensity"
      },
      {
        "id": "AllergyIntolerance.criticality",
        "path": "AllergyIntolerance.criticality",
        "short": "Criticality"
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "min": 1,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/allergies-intolerances-uv-ips",
          "extension": [
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://terminology.ehdsi.eu/ValueSet/eHDSIAllergenNoDrug"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Type of the substance/product for MyHealth@EU"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            },
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://hl7.org/fhir/uv/ips/ValueSet/whoatc-uv-ips"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Type of the substance/product, allergy or intolerance condition."
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            }
          ],
          "description": "Type of the substance/product, allergy or intolerance condition or a code for absent/unknown allergy."
        }
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "short": "Who the allergy or intolerance concerns",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/patient-eu-core"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Date of onset of the allergy or intolerance"
      },
      {
        "id": "AllergyIntolerance.onset[x]:onsetDateTime",
        "path": "AllergyIntolerance.onset[x]",
        "sliceName": "onsetDateTime",
        "short": "Onset date",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.recordedDate",
        "path": "AllergyIntolerance.recordedDate",
        "short": "Date when the allergy or intolerance was recorded"
      },
      {
        "id": "AllergyIntolerance.recorder",
        "path": "AllergyIntolerance.recorder",
        "short": "Who recorded the allergy or intolerance"
      },
      {
        "id": "AllergyIntolerance.asserter",
        "path": "AllergyIntolerance.asserter",
        "short": "Who asserts the allergy or intolerance"
      },
      {
        "id": "AllergyIntolerance.note.text",
        "path": "AllergyIntolerance.note.text",
        "short": "Additional information about the allergy or intolerance"
      },
      {
        "id": "AllergyIntolerance.reaction.substance",
        "path": "AllergyIntolerance.reaction.substance",
        "binding": {
          "strength": "example",
          "valueSet": "http://terminology.ehdsi.eu/ValueSet/eHDSIAllergenNoDrug"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/allergy-reaction-uv-ips",
          "extension": [
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://terminology.ehdsi.eu/ValueSet/eHDSIReactionAllergy"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Type of reaction (MyHealth@EU)"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            }
          ],
          "description": "Type of allergy or intolerance reaction expected to be used in MyHealth@EU"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.onset",
        "path": "AllergyIntolerance.reaction.onset",
        "short": "Reaction onset"
      },
      {
        "id": "AllergyIntolerance.reaction.severity",
        "path": "AllergyIntolerance.reaction.severity",
        "short": "Reaction severity"
      }
    ]
  }
}
