{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "http://smart.who.int/base/StructureDefinition-IMMZ_D7_Counsel_client.schema.json",
  "title": "IMMZ.D7.Counsel client",
  "description": "Data elements for the IMMZ.D7.Counsel client Data Dictionary Activity.",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string",
      "const": "IMMZD7",
      "description": "Resource type identifier for IMMZ_D7_Counsel_client 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_D7_Counsel_client logical model",
      "examples": [
        "LogicalModel-IMMZ_D7_Counsel_client"
      ]
    },
    "IMMZD7": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "FHIR "
      },
      "description": "Data elements for the IMMZ.D7.Counsel client Data Dictionary Activity."
    },
    "patient": {
      "type": "object",
      "description": "The patient."
    },
    "clientEducationAndCounsellingOnImmunization": {
      "oneOf": [
        {
          "type": "object",
          "description": "FHIR Coding from ValueSet IMMZ.D.DE86",
          "properties": {
            "system": {
              "type": "string",
              "description": "Code system URI"
            },
            "code": {
              "type": "string",
              "description": "Code value"
            },
            "display": {
              "type": "string",
              "description": "Human readable display text"
            }
          },
          "required": [
            "system",
            "code"
          ]
        },
        {
          "type": "object",
          "description": "Coding from ValueSet IMMZ.D.DE86 (JSON-LD structure)",
          "properties": {
            "@type": {
              "type": "string",
              "const": "http://smart.who.int/base/ValueSet-IMMZ.D.DE86.jsonld",
              "description": "JSON-LD type reference to ValueSet IMMZ.D.DE86"
            },
            "@id": {
              "type": "string",
              "format": "uri",
              "description": "Full IRI of the code from ValueSet IMMZ.D.DE86"
            }
          },
          "required": [
            "@type",
            "@id"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Providing information, guidance and support to client or caretakers (such as parents or legal guardians) regarding immunization practices"
    }
  },
  "required": [
    "resourceType",
    "patient"
  ],
  "resourceDefinition": "http://smart.who.int/immunizations/StructureDefinition/IMMZD7",
  "fhir:parent": "http://hl7.org/fhir/StructureDefinition/Base",
  "jsonld:valuesets": [
    "IMMZ.D.DE86"
  ],
  "jsonld:contextTemplate": {
    "@version": 1.1,
    "fhir": "http://hl7.org/fhir/",
    "IMMZ.D.DE86": "http://smart.who.int/base/ValueSet-IMMZ.D.DE86.jsonld"
  }
}