{
  "resourceType": "StructureDefinition",
  "id": "profile-allergyintolerance",
  "url": "https://fhir.synapxe.sg/StructureDefinition/profile-allergyintolerance",
  "name": "AllergyIntolerance",
  "title": "Allergy Intolerance Profile",
  "status": "active",
  "publisher": "Synapxe",
  "description": "This resource will be used to store the clinical assessment of an allergy or intolerance.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.extension:reportingFlag",
        "path": "AllergyIntolerance.extension",
        "sliceName": "reportingFlag",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-reportingFlag"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:assertedDate",
        "path": "AllergyIntolerance.extension",
        "sliceName": "assertedDate",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-assertedDate"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:informationSource",
        "path": "AllergyIntolerance.extension",
        "sliceName": "informationSource",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-informationSource"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:ADRAlertIndicator",
        "path": "AllergyIntolerance.extension",
        "sliceName": "ADRAlertIndicator",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-ADRAlertIndicator"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.identifier",
        "path": "AllergyIntolerance.identifier",
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.type.coding.system",
        "path": "AllergyIntolerance.type.coding.system",
        "patternUri": "http://hl7.org/fhir/allergy-intolerance-type"
      },
      {
        "id": "AllergyIntolerance.criticality.extension:criticality",
        "path": "AllergyIntolerance.criticality.extension",
        "sliceName": "criticality",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-criticality"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "binding": {
          "strength": "preferred",
          "description": "The clinical status of the allergy or intolerance."
        }
      },
      {
        "id": "AllergyIntolerance.code.extension",
        "path": "AllergyIntolerance.code.extension",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code.coding.version",
        "path": "AllergyIntolerance.code.coding.version",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-patient"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.patient.reference",
        "path": "AllergyIntolerance.patient.reference",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.patient.type",
        "path": "AllergyIntolerance.patient.type",
        "min": 1,
        "patternUri": "Patient"
      },
      {
        "id": "AllergyIntolerance.patient.identifier",
        "path": "AllergyIntolerance.patient.identifier",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier-nric"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.encounter",
        "path": "AllergyIntolerance.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-encounter"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Age"
          },
          {
            "code": "Period"
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.participant.id",
        "path": "AllergyIntolerance.participant.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.participant.extension:system",
        "path": "AllergyIntolerance.participant.extension",
        "sliceName": "system",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-system"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "AllergyIntolerance.participant.modifierExtension",
        "path": "AllergyIntolerance.participant.modifierExtension",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.participant.function",
        "path": "AllergyIntolerance.participant.function",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "description": "Allergy intolerance participant function.",
          "valueSet": "http://hl7.org/fhir/ValueSet/provenance-participant-type"
        }
      },
      {
        "id": "AllergyIntolerance.participant.function.extension",
        "path": "AllergyIntolerance.participant.function.extension",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.participant.actor",
        "path": "AllergyIntolerance.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-practitioner"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.participant.actor.id",
        "path": "AllergyIntolerance.participant.actor.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.participant.actor.extension",
        "path": "AllergyIntolerance.participant.actor.extension",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.participant.actor.type",
        "path": "AllergyIntolerance.participant.actor.type",
        "patternUri": "Practitioner"
      },
      {
        "id": "AllergyIntolerance.participant.actor.identifier",
        "path": "AllergyIntolerance.participant.actor.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.participant.actor.identifier.system",
        "path": "AllergyIntolerance.participant.actor.identifier.system",
        "patternUri": "https://fhir.synapxe.sg/NamingSystem/mcr"
      },
      {
        "id": "AllergyIntolerance.note",
        "path": "AllergyIntolerance.note",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.reaction.id",
        "path": "AllergyIntolerance.reaction.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.reaction.extension:reactionOutcome",
        "path": "AllergyIntolerance.reaction.extension",
        "sliceName": "reactionOutcome",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-reactionOutcome"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.reaction.extension:ADROutcome",
        "path": "AllergyIntolerance.reaction.extension",
        "sliceName": "ADROutcome",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-ADROutcome"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.reaction.substance",
        "path": "AllergyIntolerance.reaction.substance",
        "binding": {
          "strength": "required",
          "description": "The substance that is responsible for the allergic reaction."
        }
      },
      {
        "id": "AllergyIntolerance.reaction.substance.extension:substanceDetails",
        "path": "AllergyIntolerance.reaction.substance.extension",
        "sliceName": "substanceDetails",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-substance-details"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "AllergyIntolerance.reaction.severity.extension:reactionSeverity",
        "path": "AllergyIntolerance.reaction.severity.extension",
        "sliceName": "reactionSeverity",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-reactionSeverity"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "AllergyIntolerance.reaction.exposureRoute",
        "path": "AllergyIntolerance.reaction.exposureRoute",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "description": "The route by which the allergic exposure occurred."
        }
      },
      {
        "id": "AllergyIntolerance.reaction.exposureRoute.extension",
        "path": "AllergyIntolerance.reaction.exposureRoute.extension",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.reaction.note",
        "path": "AllergyIntolerance.reaction.note",
        "type": [
          {
            "code": "Annotation",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-annotation"
            ]
          }
        ]
      }
    ]
  }
}