{
  "resourceType": "StructureDefinition",
  "id": "au-allergyintolerance",
  "url": "http://hl7.org.au/fhir/StructureDefinition/au-allergyintolerance",
  "version": "1.1.0",
  "name": "AUBaseAllergyIntolerance",
  "title": "AU Base Allergy Intolerance",
  "status": "draft",
  "date": "2018-08-20",
  "publisher": "Health Level Seven Australia",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org.au",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This profile defines an allergy intolerance structure including core localisation concepts for use in an Australian context.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance",
        "path": "AllergyIntolerance",
        "short": "An allergy or intolerance statement in an Australian healthcare context",
        "constraint": [
          {
            "key": "inv-ait-0",
            "severity": "error",
            "human": "Recorder and author related party shall not coexist",
            "expression": "(extension('http://hl7.org.au/fhir/StructureDefinition/author-related-person').exists() and recorder.exists()).not()"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension",
        "path": "AllergyIntolerance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.extension:authorRelatedPerson",
        "path": "AllergyIntolerance.extension",
        "sliceName": "authorRelatedPerson",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/author-related-person"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "binding": {
          "strength": "preferred",
          "description": "Preferred SNOMED-CT coding for type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies.",
          "valueSetUri": "https://healthterminologies.gov.au/fhir/ValueSet/indicator-hypersensitivity-intolerance-to-substance-1"
        }
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "short": "Reaction details"
      },
      {
        "id": "AllergyIntolerance.reaction.substance",
        "path": "AllergyIntolerance.reaction.substance",
        "binding": {
          "strength": "preferred",
          "description": "Preferred SNOMED-CT coding defining the type of the substance (including pharmaceutical products).",
          "valueSetUri": "https://healthterminologies.gov.au/fhir/ValueSet/adverse-reaction-agent-1"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "binding": {
          "strength": "preferred",
          "description": "Preferred SNOMED-CT coding of clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event.",
          "valueSetUri": "https://healthterminologies.gov.au/fhir/ValueSet/clinical-finding-1"
        }
      }
    ]
  }
}