<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.siss.regione.lombardia.it/StructureDefinition/RLAllergyIntolerancePAI" />
  <name value="RLAllergyIntolerancePAI" />
  <title value="AllergyIntolerance PAI" />
  <status value="draft" />
  <date value="2026-10-28" />
  <fhirVersion value="4.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" />
      <short value="Allergia del paziente" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus">
      <path value="AllergyIntolerance.clinicalStatus" />
      <short value="Stato clinico dell'allergia" />
      <min value="1" />
      <max value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" />
          <code value="active" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <short value="Descrizione allergie" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.code.text">
      <path value="AllergyIntolerance.code.text" />
      <short value="Descrizione allergie" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient" />
      <short value="Paziente a cui si riferisce l'allergia" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.siss.regione.lombardia.it/StructureDefinition/RLPatientCore" />
      </type>
    </element>
  </differential>
</StructureDefinition>