{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://vaccinedatanavigator.org/schemas/vaccine_injury_table.schema.json",
  "title": "Per-Vaccine Injury Table (WHO causality + mechanisms)",
  "description": "Injury/causality entries for one vaccine product family, with linked AE mechanism IDs from ae_mechanism.schema.json.",
  "type": "object",
  "required": ["_meta", "entries"],
  "additionalProperties": false,
  "properties": {
    "_meta": {
      "type": "object",
      "required": [
        "vaccine_slug",
        "vaccine_name",
        "framework",
        "last_updated",
        "schema_version"
      ],
      "additionalProperties": true,
      "properties": {
        "vaccine_slug": { "type": "string" },
        "vaccine_name": { "type": "string" },
        "abbreviation": { "type": "string" },
        "page": { "type": "string" },
        "framework": { "type": "string" },
        "last_updated": { "type": "string", "format": "date" },
        "schema_version": { "type": "string" },
        "hrsa_source": { "type": "string" },
        "mechanisms_catalog": { "type": "string" },
        "notes": { "type": "string" }
      }
    },
    "entries": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/$defs/entry" }
    }
  },
  "$defs": {
    "mechanismRef": {
      "type": "object",
      "required": ["mechanism_id"],
      "additionalProperties": false,
      "properties": {
        "mechanism_id": { "type": "string" },
        "role": {
          "type": "string",
          "enum": ["primary", "contributing", "hypothetical", "alternative"]
        },
        "vaccine_specific_notes": { "type": "string" }
      }
    },
    "entry": {
      "type": "object",
      "required": [
        "condition",
        "causality_level",
        "time_window_days",
        "evidence_level",
        "mechanisms"
      ],
      "additionalProperties": true,
      "properties": {
        "condition": { "type": "string" },
        "causality_level": {
          "type": "string",
          "enum": [
            "Very likely / Probable",
            "Possible",
            "Unlikely",
            "Unrelated",
            "Unclassifiable"
          ]
        },
        "time_window_days": {
          "type": "array",
          "items": { "type": "integer" },
          "minItems": 2,
          "maxItems": 2
        },
        "evidence_level": {
          "type": "string",
          "enum": ["High", "Moderate", "Low", "Very Low"]
        },
        "mechanisms": {
          "type": "array",
          "minItems": 1,
          "items": { "$ref": "#/$defs/mechanismRef" }
        },
        "mechanism_summaries": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Resolved human-readable mechanism summaries for display"
        },
        "hrsa_compensable": { "type": "boolean" },
        "hrsa_description": { "type": "string" },
        "who_assessment_notes": { "type": "string" },
        "supporting_studies_count": { "type": "integer" },
        "notes": { "type": "string" },
        "last_updated": { "type": "string", "format": "date" }
      }
    }
  }
}