{
  "resourceType": "StructureDefinition",
  "id": "AllergyIntolerancePSAB",
  "url": "https://www.alberta.ca/fhir/psab/StructureDefinition/AllergyIntolerancePSAB",
  "version": "1.2.0",
  "name": "AllergyIntolerancePSAB",
  "title": "AllergyIntolerance (PS-AB)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR AllergyIntolerance resource for use in Alberta Patient Summaries (PS-AB). It re-profiles the PS-CA AllergyIntolerance profile and refines constraints applied to the AllergyIntolerance resource by the PS-CA project to represent the minimum expectations for the AllergyIntolerance resource when used in the PS-AB Composition profile.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/allergyintolerance-ca-ps",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "comment": "No terminology has been defined in AB for this element. Future releases may include defined terminology"
      },
      {
        "id": "AllergyIntolerance.code.text",
        "path": "AllergyIntolerance.code.text",
        "comment": "Required if any allergy/intolerance data is submitted; otherwise blank/null. String: Max Character length (250)",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "comment": "May be full or partial date, numeric age or string description"
      },
      {
        "id": "AllergyIntolerance.recorder",
        "path": "AllergyIntolerance.recorder",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerPSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerRolePSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.lastOccurrence",
        "path": "AllergyIntolerance.lastOccurrence",
        "comment": "If supplied, optional YYYY-MM-DD format. Partial dates (YYYY only or YYYY-MM only) are accepted. ISO-8601 doesn't support partial dates like YYYY or YYYY-MM"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "comment": "AllergyIntolerance.reaction.manifestation only needs to be populated if AllergyIntolerance.reaction is populated with other details. No terminology has been defined in AB for this element. Future releases may include defined terminology"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.text",
        "path": "AllergyIntolerance.reaction.manifestation.text",
        "comment": "AllergyIntolerance.reaction.manifestation.text only needs to be populated if AllergyIntolerance.reaction is populated with other details",
        "min": 1
      }
    ]
  }
}