{
  "openapi": "3.1.0",
  "info": {
    "title": "IMMZ.D13.Update client record API",
    "description": "Data elements for the IMMZ.D13.Update client record Data Dictionary Activity.",
    "version": "1.0.0"
  },
  "paths": {
    "/StructureDefinition-IMMZ_D13_Update_client_record.schema.json": {
      "get": {
        "summary": "JSON Schema definition for the Logical Model StructureDefinition-IMMZ_D13_Update_client_record",
        "description": "This endpoint serves the JSON Schema definition for the Logical Model StructureDefinition-IMMZ_D13_Update_client_record.",
        "responses": {
          "200": {
            "description": "The JSON Schema for StructureDefinition-IMMZ_D13_Update_client_record",
            "content": {
              "application/schema+json": {
                "schema": {
                  "$ref": "./StructureDefinition-IMMZ_D13_Update_client_record.schema.json"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StructureDefinition-IMMZ_D13_Update_client_record": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "http://smart.who.int/base/StructureDefinition-IMMZ_D13_Update_client_record.schema.json",
        "title": "IMMZ.D13.Update client record",
        "description": "Data elements for the IMMZ.D13.Update client record Data Dictionary Activity.",
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "IMMZD13",
            "description": "Resource type identifier for IMMZ_D13_Update_client_record logical model"
          },
          "@context": {
            "description": "JSON-LD context for this logical model with ValueSet vocabularies",
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "URI reference to external JSON-LD context"
              },
              {
                "type": "object",
                "description": "Inline JSON-LD context",
                "properties": {
                  "@version": {
                    "type": "number",
                    "const": 1.1
                  },
                  "fhir": {
                    "type": "string",
                    "const": "http://hl7.org/fhir/"
                  }
                },
                "additionalProperties": {
                  "type": "string",
                  "format": "uri"
                }
              },
              {
                "type": "array",
                "description": "Array of JSON-LD context objects/URIs",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "object"
                    }
                  ]
                }
              }
            ]
          },
          "@type": {
            "type": "string",
            "description": "JSON-LD type identifier for IMMZ_D13_Update_client_record logical model",
            "examples": [
              "LogicalModel-IMMZ_D13_Update_client_record"
            ]
          },
          "IMMZD13": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "FHIR "
            },
            "description": "Data elements for the IMMZ.D13.Update client record Data Dictionary Activity."
          },
          "patient": {
            "type": "object",
            "description": "The patient."
          },
          "birthDose": {
            "type": "boolean",
            "description": "Indicates if the client received a dose within 24 hours of birth. Whether a birth dose is counted as part of the primary series will depend on the antigen"
          },
          "typeOfDose": {
            "$ref": "./ValueSet-IMMZ.D.DE258.schema.json",
            "description": "The type of dose in a series that the client received"
          },
          "completedThePrimaryVaccinationSeries": {
            "type": "boolean",
            "description": "Indicates if the client has completed the primary vaccination series of a product/antigen. If the client has not yet completed their primary series, it means they may be expected to receive more doses to complete their vaccination regimen for the respective product/antigen"
          },
          "completedTheBoosterSeries": {
            "type": "boolean",
            "description": "Indicates if the client has completed the booster series of a product/antigen"
          },
          "dateWhenPrimaryVaccinationSeriesWasCompleted": {
            "type": "string",
            "format": "date",
            "description": "The date when the client completed the primary vaccination series (per product/antigen)"
          },
          "hivStatus": {
            "$ref": "./ValueSet-IMMZ.D.DE204.schema.json",
            "description": "The current HIV status of the client"
          },
          "typeOfPoliovirusDose": {
            "$ref": "./ValueSet-IMMZ.D.DE212.schema.json",
            "description": "The type of the poliovirus vaccine dose administered to the client"
          },
          "typeOfJeDose": {
            "$ref": "./ValueSet-IMMZ.D.DE216.schema.json",
            "description": "The type of Japanese encephalitis (JE) vaccine dose administered to the client"
          },
          "typeOfTbeDose": {
            "$ref": "./ValueSet-IMMZ.D.DE220.schema.json",
            "description": "The type of tick-borne encephalitis (TBE) vaccine dose administered"
          },
          "typeOfTyphoidDose": {
            "$ref": "./ValueSet-IMMZ.D.DE225.schema.json",
            "description": "The type of typhoid vaccine dose administered to the client"
          },
          "typeOfCholeraDose": {
            "$ref": "./ValueSet-IMMZ.D.DE229.schema.json",
            "description": "The type of cholera vaccine dose administered to the client"
          },
          "typeOfMeningococcalDose": {
            "$ref": "./ValueSet-IMMZ.D.DE232.schema.json",
            "description": "The type of meningococcal vaccine dose administered to the client"
          },
          "typeOfHepatitisADose": {
            "$ref": "./ValueSet-IMMZ.D.DE237.schema.json",
            "description": "The type of hepatitis A-containing vaccine dose administered to the client"
          },
          "typeOfHepatitisBDose": {
            "$ref": "./ValueSet-IMMZ.D.DE254.schema.json",
            "description": "The type of hepatitis B-containing vaccine dose administered to the client"
          },
          "vaccineType": {
            "type": "array",
            "items": {
              "$ref": "./ValueSet-IMMZ.Z.VS.schema.json",
              "description": "Coding-shaped {system, code} object from ValueSet IMMZ.Z.VS"
            },
            "minItems": 1,
            "description": "Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine library list of codes applies in this data element"
          },
          "dateAndTimeOfVaccination": {
            "type": "string",
            "format": "date-time",
            "description": "Represents the visit/encounter date, which is the date and time when each vaccine was administered to the client"
          },
          "contactDate": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of the client's contact"
          },
          "ancContactNumber": {
            "type": "integer",
            "description": "The antenatal care (ANC) contact or visit number"
          },
          "doseNumber": {
            "type": "integer",
            "description": "Vaccine dose number including dose number within series"
          },
          "immunizationEventStatus": {
            "$ref": "./ValueSet-IMMZ.D.DE1.schema.json",
            "description": "The current status of the individual immunization event"
          },
          "reasonVaccineWasNotAdministered": {
            "$ref": "./ValueSet-IMMZ.D.DE5.schema.json",
            "description": "The reason this immunization event was not performed"
          },
          "vaccineBrand": {
            "$ref": "./ValueSet-IMMZ.D.DE18.schema.json",
            "description": "The brand or trade name used to refer to the vaccine received"
          },
          "liveVaccine": {
            "type": "boolean",
            "description": "Uses a living but weakened version of the virus or one that is very similar"
          },
          "countryOfVaccination": {
            "$ref": "./ValueSet-iso3166-1-3.schema.json",
            "description": "The service delivery country where the vaccine administration occurred"
          },
          "administrativeArea": {
            "type": "object",
            "description": "The service delivery location (location name, city, municipality, town or village) where the vaccine administration occurred"
          },
          "vaccineManufacturer": {
            "$ref": "./ValueSet-IMMZ.D.DE23.schema.json",
            "description": "The manufacturer of the vaccine product"
          },
          "vaccineBatchNumber": {
            "type": "string",
            "description": "Batch number or lot number of vaccine"
          },
          "vaccineMarketAuthorizationHolder": {
            "$ref": "./ValueSet-IMMZ.D.DE25.schema.json",
            "description": "Name of the market authorization holder of the vaccine received. If market authorization holder is unknown, vaccine manufacturer is REQUIRED"
          },
          "expirationDate": {
            "type": "string",
            "format": "date",
            "description": "The expiration date of the vaccine"
          },
          "doseQuantity": {
            "type": "object",
            "description": "The quantity of vaccine product that was administered"
          },
          "healthWorkerIdentifier": {
            "type": "string",
            "description": "The person, organization or role of the entity that performed the act of giving the vaccine to the client. The implementing system can choose to populate this field using data from a health worker registry or health-care facility registry"
          },
          "totalDosesInSeries": {
            "type": "integer",
            "description": "The recommended number of doses for immunity according to the national immunization schedule (which may be based on product, age, etc.)"
          },
          "diseaseTargeted": {
            "type": "array",
            "items": {
              "$ref": "./ValueSet-IMMZ.D.DE126.schema.json",
              "description": "Coding-shaped {system, code} object from ValueSet IMMZ.D.DE126"
            },
            "description": "Vaccine-preventable disease being targeted"
          },
          "dueDateOfNextDose": {
            "type": "string",
            "format": "date",
            "description": "Date on which the next vaccination should be administered, if a next dose is required"
          }
        },
        "required": [
          "resourceType",
          "patient",
          "typeOfDose",
          "vaccineType",
          "dateAndTimeOfVaccination",
          "doseNumber",
          "immunizationEventStatus",
          "vaccineBrand",
          "countryOfVaccination",
          "vaccineManufacturer",
          "vaccineMarketAuthorizationHolder"
        ],
        "allOf": [
          {
            "$ref": "./StructureDefinition-FHIRSchemaBase.schema.json"
          },
          {
            "type": "object",
            "properties": {
              "resourceDefinition": {
                "type": "string",
                "format": "uri",
                "const": "http://smart.who.int/immunizations/StructureDefinition/IMMZD13"
              },
              "fhir:parent": {
                "type": "string",
                "const": "http://hl7.org/fhir/StructureDefinition/Base"
              },
              "jsonld:valuesets": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "const": [
                  "IMMZ.D.DE1",
                  "IMMZ.D.DE126",
                  "IMMZ.D.DE18",
                  "IMMZ.D.DE204",
                  "IMMZ.D.DE212",
                  "IMMZ.D.DE216",
                  "IMMZ.D.DE220",
                  "IMMZ.D.DE225",
                  "IMMZ.D.DE229",
                  "IMMZ.D.DE23",
                  "IMMZ.D.DE232",
                  "IMMZ.D.DE237",
                  "IMMZ.D.DE25",
                  "IMMZ.D.DE254",
                  "IMMZ.D.DE258",
                  "IMMZ.D.DE5",
                  "IMMZ.Z.VS",
                  "iso3166-1-3"
                ]
              },
              "jsonld:contextTemplate": {
                "type": "object",
                "const": {
                  "@version": 1.1,
                  "fhir": "http://hl7.org/fhir/",
                  "IMMZ.D.DE225": "http://smart.who.int/base/ValueSet-IMMZ.D.DE225.jsonld",
                  "IMMZ.D.DE25": "http://smart.who.int/base/ValueSet-IMMZ.D.DE25.jsonld",
                  "IMMZ.D.DE1": "http://smart.who.int/base/ValueSet-IMMZ.D.DE1.jsonld",
                  "IMMZ.D.DE126": "http://smart.who.int/base/ValueSet-IMMZ.D.DE126.jsonld",
                  "IMMZ.Z.VS": "http://smart.who.int/base/ValueSet-IMMZ.Z.VS.jsonld",
                  "iso3166-1-3": "http://smart.who.int/base/ValueSet-iso3166-1-3.jsonld",
                  "IMMZ.D.DE18": "http://smart.who.int/base/ValueSet-IMMZ.D.DE18.jsonld",
                  "IMMZ.D.DE258": "http://smart.who.int/base/ValueSet-IMMZ.D.DE258.jsonld",
                  "IMMZ.D.DE216": "http://smart.who.int/base/ValueSet-IMMZ.D.DE216.jsonld",
                  "IMMZ.D.DE254": "http://smart.who.int/base/ValueSet-IMMZ.D.DE254.jsonld",
                  "IMMZ.D.DE23": "http://smart.who.int/base/ValueSet-IMMZ.D.DE23.jsonld",
                  "IMMZ.D.DE212": "http://smart.who.int/base/ValueSet-IMMZ.D.DE212.jsonld",
                  "IMMZ.D.DE204": "http://smart.who.int/base/ValueSet-IMMZ.D.DE204.jsonld",
                  "IMMZ.D.DE220": "http://smart.who.int/base/ValueSet-IMMZ.D.DE220.jsonld",
                  "IMMZ.D.DE237": "http://smart.who.int/base/ValueSet-IMMZ.D.DE237.jsonld",
                  "IMMZ.D.DE5": "http://smart.who.int/base/ValueSet-IMMZ.D.DE5.jsonld",
                  "IMMZ.D.DE232": "http://smart.who.int/base/ValueSet-IMMZ.D.DE232.jsonld",
                  "IMMZ.D.DE229": "http://smart.who.int/base/ValueSet-IMMZ.D.DE229.jsonld"
                }
              }
            }
          }
        ]
      }
    }
  }
}