{
  "resourceType": "StructureDefinition",
  "id": "immunization-profile",
  "meta": {
    "lastUpdated": "2021-02-27T01:47:55.51+00:00"
  },
  "url": "http://philforestall.ca/fhir/StructureDefinition/ImmunizationProfile",
  "version": "0.4",
  "name": "ImmunizationProfile",
  "title": "Immunization Profile",
  "status": "draft",
  "date": "2021-02-27T01:41:13.0515911+00:00",
  "publisher": "Me",
  "contact": [
    {
      "name": "Phil",
      "telecom": [
        {
          "system": "email",
          "value": "phil.forestall@live.ca",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Defines the medicine regulatory authority constraints and extensions on the Immunization resource for the minimal set of data to query and retrieve an individual’s immunization information.",
  "purpose": "Attempt #4:\r\n- issues with CoreUK extension availability gumming up the works.",
  "copyright": "It's all mine, baby!",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Immunization",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Immunization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Immunization.extension",
        "path": "Immunization.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Immunization.extension:administeredproduct",
        "path": "Immunization.extension",
        "sliceName": "administeredproduct",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://philforestall.ca/fhir/StructureDefinition/ExtensionAdministeredProduct"
            ]
          }
        ]
      },
      {
        "id": "Immunization.extension:vaccinationProcedure",
        "path": "Immunization.extension",
        "sliceName": "vaccinationProcedure",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-VaccinationProcedure"
            ]
          }
        ]
      },
      {
        "id": "Immunization.extension:vaccinationProcedure.value[x]",
        "path": "Immunization.extension.value[x]",
        "type": [
          {
            "code": "Reference"
          }
        ]
      },
      {
        "id": "Immunization.vaccineCode.coding",
        "path": "Immunization.vaccineCode.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Immunization.vaccineCode.coding:vaccinesGpsUvIps",
        "path": "Immunization.vaccineCode.coding",
        "sliceName": "vaccinesGpsUvIps",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/vaccines-gps-uv-ips"
        }
      },
      {
        "id": "Immunization.vaccineCode.coding:vaccinesGpsUvIps.system",
        "path": "Immunization.vaccineCode.coding.system",
        "min": 1
      },
      {
        "id": "Immunization.vaccineCode.coding:vaccinesGpsUvIps.code",
        "path": "Immunization.vaccineCode.coding.code",
        "min": 1
      },
      {
        "id": "Immunization.vaccineCode.coding:whoAtcUvIps",
        "path": "Immunization.vaccineCode.coding",
        "sliceName": "whoAtcUvIps",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/whoatc-uv-ips"
        }
      },
      {
        "id": "Immunization.vaccineCode.coding:whoAtcUvIps.system",
        "path": "Immunization.vaccineCode.coding.system",
        "min": 1
      },
      {
        "id": "Immunization.vaccineCode.coding:whoAtcUvIps.code",
        "path": "Immunization.vaccineCode.coding.code",
        "min": 1
      },
      {
        "id": "Immunization.occurrence[x]",
        "path": "Immunization.occurrence[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Immunization.occurrence[x]:occurrenceDateTime",
        "path": "Immunization.occurrence[x]",
        "sliceName": "occurrenceDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Immunization.occurrence[x]:occurrenceString",
        "path": "Immunization.occurrence[x]",
        "sliceName": "occurrenceString",
        "comment": "When immunizations are given a specific date and time should always be known.   When immunizations are patient reported, a specific date might not be known.  Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose.\r\nThis type should only be used in the rare event that the DateTime is not known with of patient self-administered dose.\r\n[Note: this isn't the best example of a type slice because the implementation comments we are adding could have been made clear on the occurrence[x] element without slicing. It does however simulate how to profile an element in multiple ways.]",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Immunization.route",
        "path": "Immunization.route",
        "min": 1,
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Immunization.education",
        "path": "Immunization.education",
        "max": "0"
      },
      {
        "id": "Immunization.reaction.date",
        "path": "Immunization.reaction.date",
        "min": 1
      },
      {
        "id": "Immunization.reaction.detail",
        "path": "Immunization.reaction.detail",
        "min": 1
      }
    ]
  }
}