<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="KBV-PR-VoS-AllergyIntolerance" />
  <url value="https://fhir.kbv.de/StructureDefinition/KBV_PR_VoS_AllergyIntolerance" />
  <version value="2.2.0" />
  <name value="KBV_PR_VoS_AllergyIntolerance" />
  <title value="KBV_PR_VoS_AllergyIntolerance" />
  <status value="draft" />
  <date value="2025-10-01" />
  <description value="Übergabe von Allergie-Informationen aus dem PVS an die VoS" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AllergyIntolerance" />
  <baseDefinition value="https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_AllergyIntolerance|1.7.0" />
  <derivation value="constraint" />
  <differential>
    <element id="AllergyIntolerance.id">
      <path value="AllergyIntolerance.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.meta">
      <path value="AllergyIntolerance.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.meta.source">
      <path value="AllergyIntolerance.meta.source" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.meta.profile">
      <path value="AllergyIntolerance.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.meta.profile:vosProfile">
      <path value="AllergyIntolerance.meta.profile" />
      <sliceName value="vosProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="https://fhir.kbv.de/StructureDefinition/KBV_PR_VoS_AllergyIntolerance|2.2.0" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.meta.security">
      <path value="AllergyIntolerance.meta.security" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.meta.tag">
      <path value="AllergyIntolerance.meta.tag" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.implicitRules">
      <path value="AllergyIntolerance.implicitRules" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.language">
      <path value="AllergyIntolerance.language" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.contained">
      <path value="AllergyIntolerance.contained" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.extension">
      <path value="AllergyIntolerance.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="closed" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.extension:abatement">
      <path value="AllergyIntolerance.extension" />
      <sliceName value="abatement" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.extension:abatement-lebensphase-bis">
      <path value="AllergyIntolerance.extension" />
      <sliceName value="abatement-lebensphase-bis" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.identifier">
      <path value="AllergyIntolerance.identifier" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus">
      <path value="AllergyIntolerance.clinicalStatus" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding">
      <path value="AllergyIntolerance.clinicalStatus.coding" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.system">
      <path value="AllergyIntolerance.clinicalStatus.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.version">
      <path value="AllergyIntolerance.clinicalStatus.coding.version" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.code">
      <path value="AllergyIntolerance.clinicalStatus.coding.code" />
      <fixedCode value="draft" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.display">
      <path value="AllergyIntolerance.clinicalStatus.coding.display" />
      <fixedString value="draft" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.userSelected">
      <path value="AllergyIntolerance.clinicalStatus.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.text">
      <path value="AllergyIntolerance.clinicalStatus.text" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.verificationStatus">
      <path value="AllergyIntolerance.verificationStatus" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding">
      <path value="AllergyIntolerance.verificationStatus.coding" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding.system">
      <path value="AllergyIntolerance.verificationStatus.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding.version">
      <path value="AllergyIntolerance.verificationStatus.coding.version" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding.code">
      <path value="AllergyIntolerance.verificationStatus.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding.display">
      <path value="AllergyIntolerance.verificationStatus.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.coding.userSelected">
      <path value="AllergyIntolerance.verificationStatus.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.verificationStatus.text">
      <path value="AllergyIntolerance.verificationStatus.text" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.type">
      <path value="AllergyIntolerance.type" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.category">
      <path value="AllergyIntolerance.category" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.criticality">
      <path value="AllergyIntolerance.criticality" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding">
      <path value="AllergyIntolerance.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="closed" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.code.coding:snomed">
      <path value="AllergyIntolerance.code.coding" />
      <sliceName value="snomed" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:snomed.system">
      <path value="AllergyIntolerance.code.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:snomed.version">
      <path value="AllergyIntolerance.code.coding.version" />
      <fixedString value="http://snomed.info/sct/11000274103/version/20240515" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:snomed.code">
      <path value="AllergyIntolerance.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:snomed.display">
      <path value="AllergyIntolerance.code.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:ask">
      <path value="AllergyIntolerance.code.coding" />
      <sliceName value="ask" />
      <definition value="Hier soll der Code für die Substanz als ASK-Nummer eingetragen werden." />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:ask.system">
      <path value="AllergyIntolerance.code.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:ask.version">
      <path value="AllergyIntolerance.code.coding.version" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:ask.code">
      <path value="AllergyIntolerance.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:ask.display">
      <path value="AllergyIntolerance.code.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:atc">
      <path value="AllergyIntolerance.code.coding" />
      <sliceName value="atc" />
      <definition value="Hier soll der Code für die Substanz als ATC-Code eingetragen werden." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Coding" />
        <profile value="http://fhir.de/StructureDefinition/CodingATC" />
      </type>
      <patternCoding>
        <system value="http://fhir.de/CodeSystem/bfarm/atc" />
      </patternCoding>
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:atc.system">
      <path value="AllergyIntolerance.code.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:atc.version">
      <path value="AllergyIntolerance.code.coding.version" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:atc.code">
      <path value="AllergyIntolerance.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:pzn">
      <path value="AllergyIntolerance.code.coding" />
      <sliceName value="pzn" />
      <definition value="Hier soll der Code für ein Medikament als PZN eingetragen werden." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Coding" />
        <profile value="http://fhir.de/StructureDefinition/CodingPZN" />
      </type>
      <patternCoding>
        <system value="http://fhir.de/CodeSystem/ifa/pzn" />
      </patternCoding>
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:pzn.system">
      <path value="AllergyIntolerance.code.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.coding:pzn.code">
      <path value="AllergyIntolerance.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.code.text">
      <path value="AllergyIntolerance.code.text" />
      <definition value="Hier muss die Bezeichnung der Substanz bzw. der Allergie oder Unverträglichkeit als Freitext eingetragen werden." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_VoS_Patient|2.2.0" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.patient.reference">
      <path value="AllergyIntolerance.patient.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.patient.type">
      <path value="AllergyIntolerance.patient.type" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.patient.identifier">
      <path value="AllergyIntolerance.patient.identifier" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.patient.display">
      <path value="AllergyIntolerance.patient.display" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.encounter">
      <path value="AllergyIntolerance.encounter" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.onset[x]">
      <path value="AllergyIntolerance.onset[x]" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.onset[x]:onsetDateTime">
      <path value="AllergyIntolerance.onset[x]" />
      <sliceName value="onsetDateTime" />
      <max value="0" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="AllergyIntolerance.onset[x]:onsetAge">
      <path value="AllergyIntolerance.onset[x]" />
      <sliceName value="onsetAge" />
      <max value="0" />
      <type>
        <code value="Age" />
      </type>
    </element>
    <element id="AllergyIntolerance.recordedDate">
      <path value="AllergyIntolerance.recordedDate" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.recorder">
      <path value="AllergyIntolerance.recorder" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.asserter">
      <path value="AllergyIntolerance.asserter" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.lastOccurrence">
      <path value="AllergyIntolerance.lastOccurrence" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.note">
      <path value="AllergyIntolerance.note" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.note.author[x]">
      <path value="AllergyIntolerance.note.author[x]" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.note.author[x]:authorReference">
      <path value="AllergyIntolerance.note.author[x]" />
      <sliceName value="authorReference" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_Patient|1.7.0" />
        <targetProfile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_Practitioner|1.7.0" />
        <targetProfile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_RelatedPerson|1.7.0" />
        <targetProfile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_Organization|1.7.0" />
      </type>
    </element>
    <element id="AllergyIntolerance.note.author[x]:authorString">
      <path value="AllergyIntolerance.note.author[x]" />
      <sliceName value="authorString" />
      <max value="0" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AllergyIntolerance.note.time">
      <path value="AllergyIntolerance.note.time" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.note.text">
      <path value="AllergyIntolerance.note.text" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.substance">
      <path value="AllergyIntolerance.reaction.substance" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation" />
      <short value="Allergische Reaktion" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding">
      <path value="AllergyIntolerance.reaction.manifestation.coding" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding:snomed">
      <path value="AllergyIntolerance.reaction.manifestation.coding" />
      <sliceName value="snomed" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding:snomed.system">
      <path value="AllergyIntolerance.reaction.manifestation.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding:snomed.version">
      <path value="AllergyIntolerance.reaction.manifestation.coding.version" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding:snomed.code">
      <path value="AllergyIntolerance.reaction.manifestation.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding:snomed.display">
      <path value="AllergyIntolerance.reaction.manifestation.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.text">
      <path value="AllergyIntolerance.reaction.manifestation.text" />
      <short value="Allergische Reaktion" />
      <mustSupport value="true" />
    </element>
    <element id="AllergyIntolerance.reaction.description">
      <path value="AllergyIntolerance.reaction.description" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.reaction.onset">
      <path value="AllergyIntolerance.reaction.onset" />
      <max value="0" />
    </element>
    <element id="AllergyIntolerance.reaction.severity">
      <path value="AllergyIntolerance.reaction.severity" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>