{
  "resourceType": "StructureDefinition",
  "url": "https://fohm.se/nvr/fhir/StructureDefinition/NVRImmunization",
  "name": "NVRImmunization",
  "status": "draft",
  "description": "A vaccination performed on a patient",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Immunization",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Immunization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Immunization.identifier",
        "path": "Immunization.identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Immunization.identifier.use",
        "path": "Immunization.identifier.use",
        "max": "0"
      },
      {
        "id": "Immunization.identifier.type",
        "path": "Immunization.identifier.type",
        "max": "0"
      },
      {
        "id": "Immunization.identifier.system",
        "path": "Immunization.identifier.system",
        "binding": {
          "strength": "preferred",
          "description": "A uuid i strongly recommended"
        }
      },
      {
        "id": "Immunization.identifier.value",
        "path": "Immunization.identifier.value",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "A version 4 UUID in format: urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "valueSet": "urn:ietf:rfc:3986"
        }
      },
      {
        "id": "Immunization.identifier.period",
        "path": "Immunization.identifier.period",
        "max": "0"
      },
      {
        "id": "Immunization.identifier.assigner",
        "path": "Immunization.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Immunization.basedOn",
        "path": "Immunization.basedOn",
        "max": "0"
      },
      {
        "id": "Immunization.status",
        "path": "Immunization.status",
        "fixedCode": "completed"
      },
      {
        "id": "Immunization.statusReason",
        "path": "Immunization.statusReason",
        "max": "0"
      },
      {
        "id": "Immunization.vaccineCode.coding",
        "path": "Immunization.vaccineCode.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Immunization.vaccineCode.coding.system",
        "path": "Immunization.vaccineCode.coding.system",
        "min": 1,
        "fixedUri": "http://electronichealth.se/fhir/NamingSystem/nplid"
      },
      {
        "id": "Immunization.vaccineCode.coding.version",
        "path": "Immunization.vaccineCode.coding.version",
        "max": "0"
      },
      {
        "id": "Immunization.vaccineCode.coding.code",
        "path": "Immunization.vaccineCode.coding.code",
        "short": "nplId",
        "definition": "nplId for the administered vaccine product"
      },
      {
        "id": "Immunization.vaccineCode.coding.display",
        "path": "Immunization.vaccineCode.coding.display",
        "definition": "Name of the vaccine product (needed if nplId cannot be specified)"
      },
      {
        "id": "Immunization.vaccineCode.coding.userSelected",
        "path": "Immunization.vaccineCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Immunization.vaccineCode.text",
        "path": "Immunization.vaccineCode.text",
        "max": "0"
      },
      {
        "id": "Immunization.administeredProduct",
        "path": "Immunization.administeredProduct",
        "max": "0"
      },
      {
        "id": "Immunization.manufacturer",
        "path": "Immunization.manufacturer",
        "max": "0"
      },
      {
        "id": "Immunization.expirationDate",
        "path": "Immunization.expirationDate",
        "max": "0"
      },
      {
        "id": "Immunization.patient",
        "path": "Immunization.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fohm.se/nvr/fhir/StructureDefinition/NVRPatient"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Immunization.encounter",
        "path": "Immunization.encounter",
        "max": "0"
      },
      {
        "id": "Immunization.supportingInformation",
        "path": "Immunization.supportingInformation",
        "max": "0"
      },
      {
        "id": "Immunization.occurrence[x]",
        "path": "Immunization.occurrence[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "example": [
          {
            "label": "First of Januari 2025",
            "valueDateTime": "2025-01-01"
          }
        ]
      },
      {
        "id": "Immunization.primarySource",
        "path": "Immunization.primarySource",
        "max": "0"
      },
      {
        "id": "Immunization.informationSource",
        "path": "Immunization.informationSource",
        "max": "0"
      },
      {
        "id": "Immunization.location",
        "path": "Immunization.location",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fohm.se/nvr/fhir/StructureDefinition/NVRHealthCareUnitLocation"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Immunization.site",
        "path": "Immunization.site",
        "max": "0"
      },
      {
        "id": "Immunization.route",
        "path": "Immunization.route",
        "max": "0"
      },
      {
        "id": "Immunization.doseQuantity",
        "path": "Immunization.doseQuantity",
        "max": "0"
      },
      {
        "id": "Immunization.performer",
        "path": "Immunization.performer",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Immunization.performer.function",
        "path": "Immunization.performer.function",
        "max": "0"
      },
      {
        "id": "Immunization.performer.actor",
        "path": "Immunization.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fohm.se/nvr/fhir/StructureDefinition/NVRHealthCareProvider"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Immunization.note",
        "path": "Immunization.note",
        "max": "0"
      },
      {
        "id": "Immunization.reason",
        "path": "Immunization.reason",
        "max": "0"
      },
      {
        "id": "Immunization.isSubpotent",
        "path": "Immunization.isSubpotent",
        "max": "0"
      },
      {
        "id": "Immunization.subpotentReason",
        "path": "Immunization.subpotentReason",
        "max": "0"
      },
      {
        "id": "Immunization.programEligibility",
        "path": "Immunization.programEligibility",
        "max": "0"
      },
      {
        "id": "Immunization.fundingSource",
        "path": "Immunization.fundingSource",
        "max": "0"
      },
      {
        "id": "Immunization.reaction",
        "path": "Immunization.reaction",
        "max": "0"
      },
      {
        "id": "Immunization.protocolApplied",
        "path": "Immunization.protocolApplied",
        "max": "1"
      },
      {
        "id": "Immunization.protocolApplied.series",
        "path": "Immunization.protocolApplied.series",
        "max": "0"
      },
      {
        "id": "Immunization.protocolApplied.authority",
        "path": "Immunization.protocolApplied.authority",
        "max": "0"
      },
      {
        "id": "Immunization.protocolApplied.targetDisease",
        "path": "Immunization.protocolApplied.targetDisease",
        "max": "0"
      },
      {
        "id": "Immunization.protocolApplied.seriesDoses",
        "path": "Immunization.protocolApplied.seriesDoses",
        "max": "0"
      }
    ]
  }
}