{
  "resourceType": "StructureDefinition",
  "id": "profile-DwImmunization",
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwImmunization",
  "version": "2.0.0",
  "name": "DwImmunization",
  "status": "active",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Immunization",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Immunization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Immunization.id",
        "path": "Immunization.id",
        "mustSupport": true
      },
      {
        "id": "Immunization.meta.lastUpdated",
        "path": "Immunization.meta.lastUpdated",
        "mustSupport": true
      },
      {
        "id": "Immunization.meta.source",
        "path": "Immunization.meta.source",
        "mustSupport": true
      },
      {
        "id": "Immunization.meta.security",
        "path": "Immunization.meta.security",
        "mustSupport": true
      },
      {
        "id": "Immunization.extension",
        "path": "Immunization.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Immunization.extension:archivedIndicator",
        "path": "Immunization.extension",
        "sliceName": "archivedIndicator",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-ArchivedIndicator"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Immunization.identifier",
        "path": "Immunization.identifier",
        "mustSupport": true
      },
      {
        "id": "Immunization.status",
        "path": "Immunization.status",
        "mustSupport": true
      },
      {
        "id": "Immunization.statusReason",
        "path": "Immunization.statusReason",
        "mustSupport": true,
        "binding": {
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/immunization-status-reason"
        }
      },
      {
        "id": "Immunization.statusReason.coding.code",
        "path": "Immunization.statusReason.coding.code",
        "comment": "PS & CHR - Code will be PATOBJ when immunization is refused\r\n\r\nNote that FHIR strings SHALL NOT exceed 1MB in size"
      },
      {
        "id": "Immunization.statusReason.coding.display",
        "path": "Immunization.statusReason.coding.display",
        "comment": "PS & CHR - display patient objection when flagged as refused\r\nMA - \r\nNote that FHIR strings SHALL NOT exceed 1MB in size"
      },
      {
        "id": "Immunization.statusReason.text",
        "path": "Immunization.statusReason.text",
        "comment": "PS - Refused Treatment \r\nCHR - Patient Refused\r\n"
      },
      {
        "id": "Immunization.vaccineCode",
        "path": "Immunization.vaccineCode",
        "mustSupport": true
      },
      {
        "id": "Immunization.vaccineCode.coding",
        "path": "Immunization.vaccineCode.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Immunization.vaccineCode.coding:absentOrUnknownImmunization",
        "path": "Immunization.vaccineCode.coding",
        "sliceName": "absentOrUnknownImmunization",
        "comment": "Usage Note:  Where there are no immunizations recorded for the patient the \"no known immunization\" code will be provided.",
        "min": 0,
        "max": "*",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-immunizations-uv-ips"
        }
      },
      {
        "id": "Immunization.vaccineCode.coding:absentOrUnknownImmunization.system",
        "path": "Immunization.vaccineCode.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips",
        "mustSupport": true
      },
      {
        "id": "Immunization.vaccineCode.coding:absentOrUnknownImmunization.version",
        "path": "Immunization.vaccineCode.coding.version",
        "mustSupport": true
      },
      {
        "id": "Immunization.vaccineCode.coding:absentOrUnknownImmunization.code",
        "path": "Immunization.vaccineCode.coding.code",
        "mustSupport": true
      },
      {
        "id": "Immunization.vaccineCode.coding:absentOrUnknownImmunization.display",
        "path": "Immunization.vaccineCode.coding.display",
        "mustSupport": true
      },
      {
        "id": "Immunization.vaccineCode.text",
        "path": "Immunization.vaccineCode.text",
        "mustSupport": true
      },
      {
        "id": "Immunization.patient",
        "path": "Immunization.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Immunization.encounter",
        "path": "Immunization.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Immunization.occurrence[x]",
        "path": "Immunization.occurrence[x]",
        "mustSupport": true
      },
      {
        "id": "Immunization.recorded",
        "path": "Immunization.recorded",
        "mustSupport": true
      },
      {
        "id": "Immunization.primarySource",
        "path": "Immunization.primarySource",
        "comment": "Reflects the \"reliability\" of the content.",
        "mustSupport": true
      },
      {
        "id": "Immunization.reportOrigin",
        "path": "Immunization.reportOrigin",
        "mustSupport": true
      },
      {
        "id": "Immunization.manufacturer",
        "path": "Immunization.manufacturer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Immunization.lotNumber",
        "path": "Immunization.lotNumber",
        "mustSupport": true
      },
      {
        "id": "Immunization.expirationDate",
        "path": "Immunization.expirationDate",
        "mustSupport": true
      },
      {
        "id": "Immunization.site",
        "path": "Immunization.site",
        "mustSupport": true
      },
      {
        "id": "Immunization.site.coding",
        "path": "Immunization.site.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Immunization.site.coding:siteCVC",
        "path": "Immunization.site.coding",
        "sliceName": "siteCVC",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/immunizationadministrationanatomicalsitecode"
        }
      },
      {
        "id": "Immunization.site.text",
        "path": "Immunization.site.text",
        "mustSupport": true
      },
      {
        "id": "Immunization.route",
        "path": "Immunization.route",
        "mustSupport": true
      },
      {
        "id": "Immunization.route.coding",
        "path": "Immunization.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Immunization.route.coding:routeCVC",
        "path": "Immunization.route.coding",
        "sliceName": "routeCVC",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/immunizationrouteofadministrationcode"
        }
      },
      {
        "id": "Immunization.route.coding:routeCVC.system",
        "path": "Immunization.route.coding.system",
        "mustSupport": true
      },
      {
        "id": "Immunization.route.coding:routeCVC.code",
        "path": "Immunization.route.coding.code",
        "mustSupport": true
      },
      {
        "id": "Immunization.route.coding:routeCVC.display",
        "path": "Immunization.route.coding.display",
        "mustSupport": true
      },
      {
        "id": "Immunization.route.text",
        "path": "Immunization.route.text",
        "mustSupport": true
      },
      {
        "id": "Immunization.doseQuantity",
        "path": "Immunization.doseQuantity",
        "comment": "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator.",
        "mustSupport": true
      },
      {
        "id": "Immunization.performer",
        "path": "Immunization.performer",
        "mustSupport": true
      },
      {
        "id": "Immunization.performer.function",
        "path": "Immunization.performer.function",
        "comment": "MA - \"Vaccine Administered\" here = AP (administering provider) not provided when \"Vaccine Administered\" =elsewhere\r\nPSS -  AP  or not provide when \"Performed by External Provider\" \r\n\r\nNot all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://hl7.org/fhir/ValueSet/immunization-function"
        }
      },
      {
        "id": "Immunization.performer.function.coding",
        "path": "Immunization.performer.function.coding",
        "comment": "PSS - AP for any immunizations given by the clinic  Not provided for immunizations given elsewhere and being recorded in the EMR \r\nMA - TBD\r\nCodes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."
      },
      {
        "id": "Immunization.performer.actor",
        "path": "Immunization.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization"
            ]
          }
        ]
      },
      {
        "id": "Immunization.note",
        "path": "Immunization.note",
        "comment": "For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.  This element may need to be included in narrative because of the potential for modifying information.  *Annotations SHOULD NOT* be used to communicate \"modifying\" information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible).",
        "mustSupport": true
      },
      {
        "id": "Immunization.reasonCode",
        "path": "Immunization.reasonCode",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            }
          ],
          "rules": "open"
        },
        "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.",
        "mustSupport": true,
        "binding": {
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/immunization-reason"
        }
      },
      {
        "id": "Immunization.reasonCode:ICD9Code",
        "path": "Immunization.reasonCode",
        "sliceName": "ICD9Code",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Immunization.reasonCode:ICD9Code.coding",
        "path": "Immunization.reasonCode.coding",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.infoway-inforoute.ca/io/psca/ValueSet/ICD9CM"
        }
      },
      {
        "id": "Immunization.reasonCode:ICD9Code.coding.system",
        "path": "Immunization.reasonCode.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/icd9cm"
      },
      {
        "id": "Immunization.reasonCode:ICD10Code",
        "path": "Immunization.reasonCode",
        "sliceName": "ICD10Code",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Immunization.reasonCode:ICD10Code.coding.system",
        "path": "Immunization.reasonCode.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/sid/icd-10"
      },
      {
        "id": "Immunization.reasonCode:SNOMEDCode",
        "path": "Immunization.reasonCode",
        "sliceName": "SNOMEDCode",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Immunization.reasonCode:SNOMEDCode.coding",
        "path": "Immunization.reasonCode.coding",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/healthconditioncode"
        }
      },
      {
        "id": "Immunization.reasonCode:SNOMEDCode.coding.system",
        "path": "Immunization.reasonCode.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Immunization.reasonCode:ENCODECode",
        "path": "Immunization.reasonCode",
        "sliceName": "ENCODECode",
        "code": [
          {
            "system": "https://www.insite-fm.com/encode-fm"
          }
        ],
        "min": 0,
        "max": "*"
      },
      {
        "id": "Immunization.reasonCode:ENCODECode.coding.system",
        "path": "Immunization.reasonCode.coding.system",
        "min": 1,
        "fixedUri": "https://www.insite-fm.com/encode-fm"
      }
    ]
  }
}