{
  "resourceType": "StructureDefinition",
  "id": "AllergyIntolerance-uv-ips",
  "url": "http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips",
  "name": "AllergyIntoleranceUvIps",
  "title": "Allergy Intolerance (IPS)",
  "status": "active",
  "description": "This profile represents the constraints applied to the AllergyIntolerance resource by the International Patient Summary (IPS) FHIR Implementation Guide. A record of an allergy or intolerance is represented in the patient summary as an instance of an AllergyIntolerance resource constrained by this profile.\r\n\r\nIt documents the relevant allergies or intolerances (conditions) for a patient, describing the kind of reaction (e.g. rash, anaphylaxis,..); preferably the agents that cause it; and optionally the criticality and the certainty of the allergy.",
  "purpose": "This profile constrains the representation of a record of an allergy or intolerance of the patient, in the context of the international patient summary as specified by the IPS project of HL7 International.",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance",
        "path": "AllergyIntolerance"
      },
      {
        "id": "AllergyIntolerance.extension:abatement-datetime",
        "path": "AllergyIntolerance.extension",
        "sliceName": "abatement-datetime",
        "short": "Abatement datetime",
        "definition": "The date or estimated date that the condition resolved or went into remission.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/abatement-dateTime-uv-ips"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.verificationStatus",
        "path": "AllergyIntolerance.verificationStatus",
        "comment": "In the scope of the IPS the entered-in-error concept is not allowed.",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.type",
        "path": "AllergyIntolerance.type",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.criticality",
        "path": "AllergyIntolerance.criticality"
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://hl7.org/fhir/uv/ips/ValueSet/allergy-intolerance-snomed-ct-ips-free-set"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Type of the substance/product, allergy or intolerance condition."
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            },
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "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"
            },
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-allergies-uv-ips"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Absent and unknown codes for allergy or intolerance."
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            }
          ],
          "strength": "preferred",
          "description": "Type of the substance/product, allergy or intolerance condition or or a code for absent/unknown allergy.",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/allergy-intolerance-uv-ips"
        }
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.patient.reference",
        "path": "AllergyIntolerance.patient.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                "valueBoolean": true
              }
            ],
            "code": "dateTime"
          },
          {
            "code": "Age"
          },
          {
            "code": "Period"
          },
          {
            "code": "Range"
          },
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "Code for the allergy or intolerance reaction manifestation from the SNOMED International Patient Set (IPS) subset of SNOMED CT (IPS Free Set).",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/allergy-reaction-snomed-ct-ips-free-set"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.severity",
        "path": "AllergyIntolerance.reaction.severity",
        "mustSupport": true
      }
    ]
  }
}