{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "contracts_version": "0.1.0",
  "interpretation_schema_version": "1.0",
  "generated_at": "2026-05-20T01:33:05.855Z",
  "schemas": {
    "Interpretation": {
      "$ref": "#/definitions/Interpretation",
      "definitions": {
        "Interpretation": {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "string",
              "const": "1.0"
            },
            "image_quality": {
              "type": "string",
              "enum": [
                "good",
                "marginal",
                "poor"
              ]
            },
            "image_quality_notes": {
              "type": "string"
            },
            "rate": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "measurement": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "unit": {
                      "type": "string"
                    },
                    "normal_range": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "items": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "interpretation": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "borderline",
                        "abnormal"
                      ]
                    }
                  },
                  "required": [
                    "value",
                    "unit",
                    "interpretation"
                  ],
                  "additionalProperties": false,
                  "description": "Ventricular rate in beats per minute."
                },
                "atrial_rate": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "unit": {
                      "type": "string"
                    },
                    "normal_range": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "items": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "interpretation": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "borderline",
                        "abnormal"
                      ]
                    }
                  },
                  "required": [
                    "value",
                    "unit",
                    "interpretation"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "measurement"
              ],
              "additionalProperties": false
            },
            "rhythm": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "diagnosis": {
                  "type": "string",
                  "description": "e.g. 'normal sinus rhythm', 'atrial fibrillation'"
                },
                "regular": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "diagnosis",
                "regular"
              ],
              "additionalProperties": false
            },
            "axis": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "measurement": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "unit": {
                      "type": "string"
                    },
                    "normal_range": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "items": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "interpretation": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "borderline",
                        "abnormal"
                      ]
                    }
                  },
                  "required": [
                    "value",
                    "unit",
                    "interpretation"
                  ],
                  "additionalProperties": false,
                  "description": "Frontal-plane axis in degrees, -180 to +180."
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "left_deviation",
                    "right_deviation",
                    "extreme",
                    "indeterminate"
                  ]
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "measurement",
                "category"
              ],
              "additionalProperties": false
            },
            "intervals": {
              "type": "object",
              "properties": {
                "pr": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement"
                  ],
                  "additionalProperties": false
                },
                "qrs": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement"
                  ],
                  "additionalProperties": false
                },
                "qt": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement"
                  ],
                  "additionalProperties": false
                },
                "qtc": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false
                    },
                    "correction_formula": {
                      "type": "string",
                      "enum": [
                        "bazett",
                        "fridericia",
                        "framingham"
                      ]
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement",
                    "correction_formula"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "pr",
                "qrs",
                "qt",
                "qtc"
              ],
              "additionalProperties": false
            },
            "p_wave_morphology": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "abnormalities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "abnormalities"
              ],
              "additionalProperties": false
            },
            "qrs_morphology": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "bundle_branch_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "rbbb",
                    "lbbb",
                    "incomplete_rbbb",
                    "incomplete_lbbb",
                    "nonspecific_ivcd"
                  ]
                },
                "fascicular_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "lafb",
                    "lpfb",
                    "bifascicular"
                  ]
                },
                "pathologic_q_waves": {
                  "type": "object",
                  "properties": {
                    "present": {
                      "type": "boolean"
                    },
                    "leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "territory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "anterior",
                            "inferior",
                            "lateral",
                            "septal",
                            "posterior",
                            "none"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "present",
                    "leads",
                    "territory"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "bundle_branch_block",
                "fascicular_block",
                "pathologic_q_waves"
              ],
              "additionalProperties": false
            },
            "st_t_changes": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "st_elevation": {
                  "type": "object",
                  "properties": {
                    "present": {
                      "type": "boolean"
                    },
                    "leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "magnitude_mm": {
                      "type": "number"
                    },
                    "morphology": {
                      "type": "string",
                      "enum": [
                        "concave",
                        "convex",
                        "horizontal"
                      ]
                    },
                    "territory": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "present",
                    "leads"
                  ],
                  "additionalProperties": false
                },
                "st_depression": {
                  "type": "object",
                  "properties": {
                    "present": {
                      "type": "boolean"
                    },
                    "leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "morphology": {
                      "type": "string",
                      "enum": [
                        "horizontal",
                        "downsloping",
                        "upsloping"
                      ]
                    }
                  },
                  "required": [
                    "present",
                    "leads"
                  ],
                  "additionalProperties": false
                },
                "t_wave_changes": {
                  "type": "object",
                  "properties": {
                    "inverted_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "peaked": {
                      "type": "boolean"
                    },
                    "flat": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "inverted_leads",
                    "peaked",
                    "flat"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "st_elevation",
                "st_depression",
                "t_wave_changes"
              ],
              "additionalProperties": false
            },
            "chamber_enlargement": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "lvh": {
                  "type": "boolean"
                },
                "rvh": {
                  "type": "boolean"
                },
                "la_enlargement": {
                  "type": "boolean"
                },
                "ra_enlargement": {
                  "type": "boolean"
                },
                "criteria_met": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "e.g. 'sokolow_lyon', 'cornell_voltage', 'romhilt_estes'"
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "lvh",
                "rvh",
                "la_enlargement",
                "ra_enlargement",
                "criteria_met"
              ],
              "additionalProperties": false
            },
            "conduction_abnormalities": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "description": "What the learner should look at on the strip to reach this finding."
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "teaching_point": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000,
                  "description": "The single most important concept this finding illustrates."
                },
                "av_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "first_degree",
                    "mobitz_i",
                    "mobitz_ii",
                    "high_grade",
                    "complete"
                  ]
                },
                "preexcitation": {
                  "type": "boolean"
                },
                "paced": {
                  "type": "boolean"
                }
              },
              "required": [
                "finding",
                "reasoning",
                "confidence",
                "leads_to_examine",
                "teaching_point",
                "av_block",
                "preexcitation",
                "paced"
              ],
              "additionalProperties": false
            },
            "final_synthesis": {
              "type": "object",
              "properties": {
                "one_line_summary": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "The single-sentence read, as it would appear on a printed report."
                },
                "primary_diagnosis": {
                  "type": "string"
                },
                "secondary_findings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "differential": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Alternative interpretations worth considering."
                },
                "clinical_significance_education": {
                  "type": "string",
                  "description": "What this pattern would mean if seen in a real patient. Framed as education, not as a diagnostic recommendation."
                },
                "overall_confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                }
              },
              "required": [
                "one_line_summary",
                "primary_diagnosis",
                "secondary_findings",
                "differential",
                "clinical_significance_education",
                "overall_confidence"
              ],
              "additionalProperties": false
            },
            "teaching_pearls": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "maxItems": 5,
              "description": "The 1-5 highest-yield teaching points for this strip."
            },
            "difficulty_estimate": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "concepts_illustrated": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Slugs from the concept taxonomy that this strip exemplifies."
            },
            "cannot_interpret": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "reason"
              ],
              "additionalProperties": false,
              "description": "Set only if image_quality is 'poor' and interpretation is unsafe. When present, other clinical fields may be omitted."
            }
          },
          "required": [
            "schema_version",
            "image_quality",
            "rate",
            "rhythm",
            "axis",
            "intervals",
            "p_wave_morphology",
            "qrs_morphology",
            "st_t_changes",
            "chamber_enlargement",
            "conduction_abnormalities",
            "final_synthesis",
            "teaching_pearls",
            "difficulty_estimate",
            "concepts_illustrated"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "LearnerInterpretation": {
      "$ref": "#/definitions/LearnerInterpretation",
      "definitions": {
        "LearnerInterpretation": {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "string",
              "const": "1.0"
            },
            "final_synthesis": {
              "type": "object",
              "properties": {
                "primary_diagnosis": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "secondary_findings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "overall_confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                }
              },
              "required": [
                "primary_diagnosis"
              ],
              "additionalProperties": false
            },
            "image_quality": {
              "type": "string",
              "enum": [
                "good",
                "marginal",
                "poor"
              ]
            },
            "rate": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "measurement_value": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "rhythm": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "diagnosis": {
                  "type": "string"
                },
                "regular": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            },
            "axis": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "measurement_value": {
                  "type": "number"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "left_deviation",
                    "right_deviation",
                    "extreme",
                    "indeterminate"
                  ]
                }
              },
              "additionalProperties": false
            },
            "intervals": {
              "type": "object",
              "properties": {
                "pr_ms": {
                  "type": "number"
                },
                "qrs_ms": {
                  "type": "number"
                },
                "qt_ms": {
                  "type": "number"
                },
                "qtc_ms": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "p_wave_morphology": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "abnormalities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "qrs_morphology": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "bundle_branch_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "rbbb",
                    "lbbb",
                    "incomplete_rbbb",
                    "incomplete_lbbb",
                    "nonspecific_ivcd"
                  ]
                },
                "fascicular_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "lafb",
                    "lpfb",
                    "bifascicular"
                  ]
                },
                "pathologic_q_waves_present": {
                  "type": "boolean"
                },
                "pathologic_q_waves_leads": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                }
              },
              "additionalProperties": false
            },
            "st_t_changes": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "st_elevation_present": {
                  "type": "boolean"
                },
                "st_elevation_leads": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "st_depression_present": {
                  "type": "boolean"
                },
                "st_depression_leads": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "t_wave_inverted_leads": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                }
              },
              "additionalProperties": false
            },
            "chamber_enlargement": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "lvh": {
                  "type": "boolean"
                },
                "rvh": {
                  "type": "boolean"
                },
                "la_enlargement": {
                  "type": "boolean"
                },
                "ra_enlargement": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            },
            "conduction_abnormalities": {
              "type": "object",
              "properties": {
                "finding": {
                  "type": "string",
                  "maxLength": 500
                },
                "reasoning": {
                  "type": "string",
                  "maxLength": 2000
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "leads_to_examine": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "I",
                      "II",
                      "III",
                      "aVR",
                      "aVL",
                      "aVF",
                      "V1",
                      "V2",
                      "V3",
                      "V4",
                      "V5",
                      "V6",
                      "rhythm_strip"
                    ]
                  }
                },
                "av_block": {
                  "type": "string",
                  "enum": [
                    "none",
                    "first_degree",
                    "mobitz_i",
                    "mobitz_ii",
                    "high_grade",
                    "complete"
                  ]
                },
                "preexcitation": {
                  "type": "boolean"
                },
                "paced": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            },
            "duration_ms": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "schema_version",
            "final_synthesis"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "TutorResponse": {
      "$ref": "#/definitions/TutorResponse",
      "definitions": {
        "TutorResponse": {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "string",
              "const": "1.0"
            },
            "affirmation": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400,
              "description": "Specific, one-sentence opener noting what the learner read correctly."
            },
            "primary_gaps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "concept_slug": {
                    "type": "string",
                    "minLength": 1
                  },
                  "gap_description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 800
                  },
                  "teaching": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The general skill — transferable to the next strip."
                  },
                  "applied_to_this_strip": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "How the general skill applies to THIS image, lead by lead."
                  },
                  "leads_to_examine": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "I",
                        "II",
                        "III",
                        "aVR",
                        "aVL",
                        "aVF",
                        "V1",
                        "V2",
                        "V3",
                        "V4",
                        "V5",
                        "V6",
                        "rhythm_strip"
                      ]
                    }
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "life_threatening_missed",
                      "primary_diagnosis_missed",
                      "secondary_finding_missed",
                      "measurement_off",
                      "stylistic"
                    ]
                  }
                },
                "required": [
                  "concept_slug",
                  "gap_description",
                  "teaching",
                  "applied_to_this_strip",
                  "leads_to_examine"
                ],
                "additionalProperties": false
              },
              "minItems": 0,
              "maxItems": 3
            },
            "next_step_recommendation": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          "required": [
            "schema_version",
            "affirmation",
            "primary_gaps",
            "next_step_recommendation"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "GapAnalysis": {
      "$ref": "#/definitions/GapAnalysis",
      "definitions": {
        "GapAnalysis": {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "string",
              "const": "1.0"
            },
            "sections_correct": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Rubric section names the learner got right."
            },
            "sections_partial": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "section": {
                    "type": "string"
                  },
                  "learner_value": {},
                  "canonical_value": {},
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "section"
                ],
                "additionalProperties": false
              }
            },
            "sections_missing": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "section": {
                    "type": "string"
                  },
                  "canonical_value": {}
                },
                "required": [
                  "section"
                ],
                "additionalProperties": false
              }
            },
            "sections_wrong": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "section": {
                    "type": "string"
                  },
                  "learner_value": {},
                  "canonical_value": {},
                  "severity": {
                    "type": "string",
                    "enum": [
                      "life_threatening_missed",
                      "primary_diagnosis_missed",
                      "secondary_finding_missed",
                      "measurement_off",
                      "stylistic"
                    ]
                  }
                },
                "required": [
                  "section"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "schema_version",
            "sections_correct",
            "sections_partial",
            "sections_missing",
            "sections_wrong"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "Case": {
      "$ref": "#/definitions/Case",
      "definitions": {
        "Case": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "source": {
              "type": "string",
              "enum": [
                "ptb_xl",
                "user_upload",
                "curated_other"
              ]
            },
            "source_ref": {
              "type": [
                "string",
                "null"
              ]
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "difficulty": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5
                },
                {
                  "type": "null"
                }
              ]
            },
            "image_url": {
              "type": "string",
              "description": "Path under /ekg-tutor/api/cases/:id/image"
            },
            "thumb_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "public",
                "private"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "processing",
                "ready",
                "failed"
              ]
            },
            "clinician_reviewed": {
              "type": "boolean"
            },
            "canonical_interpretation": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string",
                      "const": "1.0"
                    },
                    "image_quality": {
                      "type": "string",
                      "enum": [
                        "good",
                        "marginal",
                        "poor"
                      ]
                    },
                    "image_quality_notes": {
                      "type": "string"
                    },
                    "rate": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false,
                          "description": "Ventricular rate in beats per minute."
                        },
                        "atrial_rate": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement"
                      ],
                      "additionalProperties": false
                    },
                    "rhythm": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "diagnosis": {
                          "type": "string",
                          "description": "e.g. 'normal sinus rhythm', 'atrial fibrillation'"
                        },
                        "regular": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "diagnosis",
                        "regular"
                      ],
                      "additionalProperties": false
                    },
                    "axis": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false,
                          "description": "Frontal-plane axis in degrees, -180 to +180."
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "left_deviation",
                            "right_deviation",
                            "extreme",
                            "indeterminate"
                          ]
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement",
                        "category"
                      ],
                      "additionalProperties": false
                    },
                    "intervals": {
                      "type": "object",
                      "properties": {
                        "pr": {
                          "type": "object",
                          "properties": {
                            "finding": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "reasoning": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000,
                              "description": "What the learner should look at on the strip to reach this finding."
                            },
                            "confidence": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "leads_to_examine": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "teaching_point": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000,
                              "description": "The single most important concept this finding illustrates."
                            },
                            "measurement": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "normal_range": {
                                  "type": "array",
                                  "minItems": 2,
                                  "maxItems": 2,
                                  "items": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "interpretation": {
                                  "type": "string",
                                  "enum": [
                                    "normal",
                                    "borderline",
                                    "abnormal"
                                  ]
                                }
                              },
                              "required": [
                                "value",
                                "unit",
                                "interpretation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "finding",
                            "reasoning",
                            "confidence",
                            "leads_to_examine",
                            "teaching_point",
                            "measurement"
                          ],
                          "additionalProperties": false
                        },
                        "qrs": {
                          "type": "object",
                          "properties": {
                            "finding": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "reasoning": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000,
                              "description": "What the learner should look at on the strip to reach this finding."
                            },
                            "confidence": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "leads_to_examine": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "teaching_point": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000,
                              "description": "The single most important concept this finding illustrates."
                            },
                            "measurement": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "normal_range": {
                                  "type": "array",
                                  "minItems": 2,
                                  "maxItems": 2,
                                  "items": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "interpretation": {
                                  "type": "string",
                                  "enum": [
                                    "normal",
                                    "borderline",
                                    "abnormal"
                                  ]
                                }
                              },
                              "required": [
                                "value",
                                "unit",
                                "interpretation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "finding",
                            "reasoning",
                            "confidence",
                            "leads_to_examine",
                            "teaching_point",
                            "measurement"
                          ],
                          "additionalProperties": false
                        },
                        "qt": {
                          "type": "object",
                          "properties": {
                            "finding": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "reasoning": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000,
                              "description": "What the learner should look at on the strip to reach this finding."
                            },
                            "confidence": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "leads_to_examine": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "teaching_point": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000,
                              "description": "The single most important concept this finding illustrates."
                            },
                            "measurement": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "normal_range": {
                                  "type": "array",
                                  "minItems": 2,
                                  "maxItems": 2,
                                  "items": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "interpretation": {
                                  "type": "string",
                                  "enum": [
                                    "normal",
                                    "borderline",
                                    "abnormal"
                                  ]
                                }
                              },
                              "required": [
                                "value",
                                "unit",
                                "interpretation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "finding",
                            "reasoning",
                            "confidence",
                            "leads_to_examine",
                            "teaching_point",
                            "measurement"
                          ],
                          "additionalProperties": false
                        },
                        "qtc": {
                          "type": "object",
                          "properties": {
                            "finding": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "reasoning": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000,
                              "description": "What the learner should look at on the strip to reach this finding."
                            },
                            "confidence": {
                              "type": "string",
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ]
                            },
                            "leads_to_examine": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "teaching_point": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000,
                              "description": "The single most important concept this finding illustrates."
                            },
                            "measurement": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "normal_range": {
                                  "type": "array",
                                  "minItems": 2,
                                  "maxItems": 2,
                                  "items": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "interpretation": {
                                  "type": "string",
                                  "enum": [
                                    "normal",
                                    "borderline",
                                    "abnormal"
                                  ]
                                }
                              },
                              "required": [
                                "value",
                                "unit",
                                "interpretation"
                              ],
                              "additionalProperties": false
                            },
                            "correction_formula": {
                              "type": "string",
                              "enum": [
                                "bazett",
                                "fridericia",
                                "framingham"
                              ]
                            }
                          },
                          "required": [
                            "finding",
                            "reasoning",
                            "confidence",
                            "leads_to_examine",
                            "teaching_point",
                            "measurement",
                            "correction_formula"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "pr",
                        "qrs",
                        "qt",
                        "qtc"
                      ],
                      "additionalProperties": false
                    },
                    "p_wave_morphology": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "abnormalities": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "abnormalities"
                      ],
                      "additionalProperties": false
                    },
                    "qrs_morphology": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "bundle_branch_block": {
                          "type": "string",
                          "enum": [
                            "none",
                            "rbbb",
                            "lbbb",
                            "incomplete_rbbb",
                            "incomplete_lbbb",
                            "nonspecific_ivcd"
                          ]
                        },
                        "fascicular_block": {
                          "type": "string",
                          "enum": [
                            "none",
                            "lafb",
                            "lpfb",
                            "bifascicular"
                          ]
                        },
                        "pathologic_q_waves": {
                          "type": "object",
                          "properties": {
                            "present": {
                              "type": "boolean"
                            },
                            "leads": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "territory": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "anterior",
                                    "inferior",
                                    "lateral",
                                    "septal",
                                    "posterior",
                                    "none"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "present",
                            "leads",
                            "territory"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "bundle_branch_block",
                        "fascicular_block",
                        "pathologic_q_waves"
                      ],
                      "additionalProperties": false
                    },
                    "st_t_changes": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "st_elevation": {
                          "type": "object",
                          "properties": {
                            "present": {
                              "type": "boolean"
                            },
                            "leads": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "magnitude_mm": {
                              "type": "number"
                            },
                            "morphology": {
                              "type": "string",
                              "enum": [
                                "concave",
                                "convex",
                                "horizontal"
                              ]
                            },
                            "territory": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "present",
                            "leads"
                          ],
                          "additionalProperties": false
                        },
                        "st_depression": {
                          "type": "object",
                          "properties": {
                            "present": {
                              "type": "boolean"
                            },
                            "leads": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "morphology": {
                              "type": "string",
                              "enum": [
                                "horizontal",
                                "downsloping",
                                "upsloping"
                              ]
                            }
                          },
                          "required": [
                            "present",
                            "leads"
                          ],
                          "additionalProperties": false
                        },
                        "t_wave_changes": {
                          "type": "object",
                          "properties": {
                            "inverted_leads": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "I",
                                  "II",
                                  "III",
                                  "aVR",
                                  "aVL",
                                  "aVF",
                                  "V1",
                                  "V2",
                                  "V3",
                                  "V4",
                                  "V5",
                                  "V6",
                                  "rhythm_strip"
                                ]
                              }
                            },
                            "peaked": {
                              "type": "boolean"
                            },
                            "flat": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "inverted_leads",
                            "peaked",
                            "flat"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "st_elevation",
                        "st_depression",
                        "t_wave_changes"
                      ],
                      "additionalProperties": false
                    },
                    "chamber_enlargement": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "lvh": {
                          "type": "boolean"
                        },
                        "rvh": {
                          "type": "boolean"
                        },
                        "la_enlargement": {
                          "type": "boolean"
                        },
                        "ra_enlargement": {
                          "type": "boolean"
                        },
                        "criteria_met": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "e.g. 'sokolow_lyon', 'cornell_voltage', 'romhilt_estes'"
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "lvh",
                        "rvh",
                        "la_enlargement",
                        "ra_enlargement",
                        "criteria_met"
                      ],
                      "additionalProperties": false
                    },
                    "conduction_abnormalities": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "av_block": {
                          "type": "string",
                          "enum": [
                            "none",
                            "first_degree",
                            "mobitz_i",
                            "mobitz_ii",
                            "high_grade",
                            "complete"
                          ]
                        },
                        "preexcitation": {
                          "type": "boolean"
                        },
                        "paced": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "av_block",
                        "preexcitation",
                        "paced"
                      ],
                      "additionalProperties": false
                    },
                    "final_synthesis": {
                      "type": "object",
                      "properties": {
                        "one_line_summary": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "description": "The single-sentence read, as it would appear on a printed report."
                        },
                        "primary_diagnosis": {
                          "type": "string"
                        },
                        "secondary_findings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "differential": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Alternative interpretations worth considering."
                        },
                        "clinical_significance_education": {
                          "type": "string",
                          "description": "What this pattern would mean if seen in a real patient. Framed as education, not as a diagnostic recommendation."
                        },
                        "overall_confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        }
                      },
                      "required": [
                        "one_line_summary",
                        "primary_diagnosis",
                        "secondary_findings",
                        "differential",
                        "clinical_significance_education",
                        "overall_confidence"
                      ],
                      "additionalProperties": false
                    },
                    "teaching_pearls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "maxItems": 5,
                      "description": "The 1-5 highest-yield teaching points for this strip."
                    },
                    "difficulty_estimate": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 5
                    },
                    "concepts_illustrated": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Slugs from the concept taxonomy that this strip exemplifies."
                    },
                    "cannot_interpret": {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "reason"
                      ],
                      "additionalProperties": false,
                      "description": "Set only if image_quality is 'poor' and interpretation is unsafe. When present, other clinical fields may be omitted."
                    }
                  },
                  "required": [
                    "schema_version",
                    "image_quality",
                    "rate",
                    "rhythm",
                    "axis",
                    "intervals",
                    "p_wave_morphology",
                    "qrs_morphology",
                    "st_t_changes",
                    "chamber_enlargement",
                    "conduction_abnormalities",
                    "final_synthesis",
                    "teaching_pearls",
                    "difficulty_estimate",
                    "concepts_illustrated"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "interpretation_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "concepts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "rate",
                      "rhythm",
                      "axis",
                      "intervals",
                      "p_wave",
                      "qrs",
                      "ischemia",
                      "chamber",
                      "conduction",
                      "paced",
                      "meta"
                    ]
                  },
                  "salience": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "secondary"
                    ]
                  }
                },
                "required": [
                  "slug",
                  "title",
                  "category",
                  "salience"
                ],
                "additionalProperties": false
              },
              "default": []
            },
            "quick_reading": {
              "type": [
                "string",
                "null"
              ]
            },
            "quick_reading_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "quick_reading_elapsed_ms": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "id",
            "source",
            "source_ref",
            "title",
            "difficulty",
            "image_url",
            "thumb_url",
            "visibility",
            "status",
            "clinician_reviewed",
            "canonical_interpretation",
            "interpretation_version",
            "quick_reading",
            "quick_reading_model",
            "quick_reading_elapsed_ms",
            "created_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "CaseListItem": {
      "$ref": "#/definitions/CaseListItem",
      "definitions": {
        "CaseListItem": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "source": {
              "type": "string",
              "enum": [
                "ptb_xl",
                "user_upload",
                "curated_other"
              ]
            },
            "source_ref": {
              "type": [
                "string",
                "null"
              ]
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "difficulty": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5
                },
                {
                  "type": "null"
                }
              ]
            },
            "image_url": {
              "type": "string",
              "description": "Path under /ekg-tutor/api/cases/:id/image"
            },
            "thumb_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "public",
                "private"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "processing",
                "ready",
                "failed"
              ]
            },
            "clinician_reviewed": {
              "type": "boolean"
            },
            "interpretation_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "concepts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "rate",
                      "rhythm",
                      "axis",
                      "intervals",
                      "p_wave",
                      "qrs",
                      "ischemia",
                      "chamber",
                      "conduction",
                      "paced",
                      "meta"
                    ]
                  },
                  "salience": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "secondary"
                    ]
                  }
                },
                "required": [
                  "slug",
                  "title",
                  "category",
                  "salience"
                ],
                "additionalProperties": false
              },
              "default": []
            },
            "quick_reading": {
              "type": [
                "string",
                "null"
              ]
            },
            "quick_reading_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "quick_reading_elapsed_ms": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "id",
            "source",
            "source_ref",
            "title",
            "difficulty",
            "image_url",
            "thumb_url",
            "visibility",
            "status",
            "clinician_reviewed",
            "interpretation_version",
            "quick_reading",
            "quick_reading_model",
            "quick_reading_elapsed_ms",
            "created_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "Attempt": {
      "$ref": "#/definitions/Attempt",
      "definitions": {
        "Attempt": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "user_id": {
              "type": "string",
              "format": "uuid"
            },
            "case_id": {
              "type": "string",
              "format": "uuid"
            },
            "learner_response": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "string",
                  "const": "1.0"
                },
                "final_synthesis": {
                  "type": "object",
                  "properties": {
                    "primary_diagnosis": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "secondary_findings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "overall_confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    }
                  },
                  "required": [
                    "primary_diagnosis"
                  ],
                  "additionalProperties": false
                },
                "image_quality": {
                  "type": "string",
                  "enum": [
                    "good",
                    "marginal",
                    "poor"
                  ]
                },
                "rate": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "measurement_value": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "rhythm": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "diagnosis": {
                      "type": "string"
                    },
                    "regular": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "axis": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "measurement_value": {
                      "type": "number"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "left_deviation",
                        "right_deviation",
                        "extreme",
                        "indeterminate"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "intervals": {
                  "type": "object",
                  "properties": {
                    "pr_ms": {
                      "type": "number"
                    },
                    "qrs_ms": {
                      "type": "number"
                    },
                    "qt_ms": {
                      "type": "number"
                    },
                    "qtc_ms": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "p_wave_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "abnormalities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "qrs_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "bundle_branch_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "rbbb",
                        "lbbb",
                        "incomplete_rbbb",
                        "incomplete_lbbb",
                        "nonspecific_ivcd"
                      ]
                    },
                    "fascicular_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "lafb",
                        "lpfb",
                        "bifascicular"
                      ]
                    },
                    "pathologic_q_waves_present": {
                      "type": "boolean"
                    },
                    "pathologic_q_waves_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "st_t_changes": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "st_elevation_present": {
                      "type": "boolean"
                    },
                    "st_elevation_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "st_depression_present": {
                      "type": "boolean"
                    },
                    "st_depression_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "t_wave_inverted_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "chamber_enlargement": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "lvh": {
                      "type": "boolean"
                    },
                    "rvh": {
                      "type": "boolean"
                    },
                    "la_enlargement": {
                      "type": "boolean"
                    },
                    "ra_enlargement": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "conduction_abnormalities": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "av_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "first_degree",
                        "mobitz_i",
                        "mobitz_ii",
                        "high_grade",
                        "complete"
                      ]
                    },
                    "preexcitation": {
                      "type": "boolean"
                    },
                    "paced": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "schema_version",
                "final_synthesis"
              ],
              "additionalProperties": false
            },
            "canonical_snapshot": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "string",
                  "const": "1.0"
                },
                "image_quality": {
                  "type": "string",
                  "enum": [
                    "good",
                    "marginal",
                    "poor"
                  ]
                },
                "image_quality_notes": {
                  "type": "string"
                },
                "rate": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false,
                      "description": "Ventricular rate in beats per minute."
                    },
                    "atrial_rate": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement"
                  ],
                  "additionalProperties": false
                },
                "rhythm": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "diagnosis": {
                      "type": "string",
                      "description": "e.g. 'normal sinus rhythm', 'atrial fibrillation'"
                    },
                    "regular": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "diagnosis",
                    "regular"
                  ],
                  "additionalProperties": false
                },
                "axis": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "normal_range": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "borderline",
                            "abnormal"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "unit",
                        "interpretation"
                      ],
                      "additionalProperties": false,
                      "description": "Frontal-plane axis in degrees, -180 to +180."
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "left_deviation",
                        "right_deviation",
                        "extreme",
                        "indeterminate"
                      ]
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "measurement",
                    "category"
                  ],
                  "additionalProperties": false
                },
                "intervals": {
                  "type": "object",
                  "properties": {
                    "pr": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement"
                      ],
                      "additionalProperties": false
                    },
                    "qrs": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement"
                      ],
                      "additionalProperties": false
                    },
                    "qt": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement"
                      ],
                      "additionalProperties": false
                    },
                    "qtc": {
                      "type": "object",
                      "properties": {
                        "finding": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "What the learner should look at on the strip to reach this finding."
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "leads_to_examine": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "teaching_point": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "The single most important concept this finding illustrates."
                        },
                        "measurement": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "normal_range": {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "interpretation": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "borderline",
                                "abnormal"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "unit",
                            "interpretation"
                          ],
                          "additionalProperties": false
                        },
                        "correction_formula": {
                          "type": "string",
                          "enum": [
                            "bazett",
                            "fridericia",
                            "framingham"
                          ]
                        }
                      },
                      "required": [
                        "finding",
                        "reasoning",
                        "confidence",
                        "leads_to_examine",
                        "teaching_point",
                        "measurement",
                        "correction_formula"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "pr",
                    "qrs",
                    "qt",
                    "qtc"
                  ],
                  "additionalProperties": false
                },
                "p_wave_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "abnormalities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "abnormalities"
                  ],
                  "additionalProperties": false
                },
                "qrs_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "bundle_branch_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "rbbb",
                        "lbbb",
                        "incomplete_rbbb",
                        "incomplete_lbbb",
                        "nonspecific_ivcd"
                      ]
                    },
                    "fascicular_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "lafb",
                        "lpfb",
                        "bifascicular"
                      ]
                    },
                    "pathologic_q_waves": {
                      "type": "object",
                      "properties": {
                        "present": {
                          "type": "boolean"
                        },
                        "leads": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "territory": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "anterior",
                                "inferior",
                                "lateral",
                                "septal",
                                "posterior",
                                "none"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "present",
                        "leads",
                        "territory"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "bundle_branch_block",
                    "fascicular_block",
                    "pathologic_q_waves"
                  ],
                  "additionalProperties": false
                },
                "st_t_changes": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "st_elevation": {
                      "type": "object",
                      "properties": {
                        "present": {
                          "type": "boolean"
                        },
                        "leads": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "magnitude_mm": {
                          "type": "number"
                        },
                        "morphology": {
                          "type": "string",
                          "enum": [
                            "concave",
                            "convex",
                            "horizontal"
                          ]
                        },
                        "territory": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "present",
                        "leads"
                      ],
                      "additionalProperties": false
                    },
                    "st_depression": {
                      "type": "object",
                      "properties": {
                        "present": {
                          "type": "boolean"
                        },
                        "leads": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "morphology": {
                          "type": "string",
                          "enum": [
                            "horizontal",
                            "downsloping",
                            "upsloping"
                          ]
                        }
                      },
                      "required": [
                        "present",
                        "leads"
                      ],
                      "additionalProperties": false
                    },
                    "t_wave_changes": {
                      "type": "object",
                      "properties": {
                        "inverted_leads": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "I",
                              "II",
                              "III",
                              "aVR",
                              "aVL",
                              "aVF",
                              "V1",
                              "V2",
                              "V3",
                              "V4",
                              "V5",
                              "V6",
                              "rhythm_strip"
                            ]
                          }
                        },
                        "peaked": {
                          "type": "boolean"
                        },
                        "flat": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "inverted_leads",
                        "peaked",
                        "flat"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "st_elevation",
                    "st_depression",
                    "t_wave_changes"
                  ],
                  "additionalProperties": false
                },
                "chamber_enlargement": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "lvh": {
                      "type": "boolean"
                    },
                    "rvh": {
                      "type": "boolean"
                    },
                    "la_enlargement": {
                      "type": "boolean"
                    },
                    "ra_enlargement": {
                      "type": "boolean"
                    },
                    "criteria_met": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "e.g. 'sokolow_lyon', 'cornell_voltage', 'romhilt_estes'"
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "lvh",
                    "rvh",
                    "la_enlargement",
                    "ra_enlargement",
                    "criteria_met"
                  ],
                  "additionalProperties": false
                },
                "conduction_abnormalities": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000,
                      "description": "What the learner should look at on the strip to reach this finding."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "teaching_point": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "The single most important concept this finding illustrates."
                    },
                    "av_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "first_degree",
                        "mobitz_i",
                        "mobitz_ii",
                        "high_grade",
                        "complete"
                      ]
                    },
                    "preexcitation": {
                      "type": "boolean"
                    },
                    "paced": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "finding",
                    "reasoning",
                    "confidence",
                    "leads_to_examine",
                    "teaching_point",
                    "av_block",
                    "preexcitation",
                    "paced"
                  ],
                  "additionalProperties": false
                },
                "final_synthesis": {
                  "type": "object",
                  "properties": {
                    "one_line_summary": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "description": "The single-sentence read, as it would appear on a printed report."
                    },
                    "primary_diagnosis": {
                      "type": "string"
                    },
                    "secondary_findings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "differential": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Alternative interpretations worth considering."
                    },
                    "clinical_significance_education": {
                      "type": "string",
                      "description": "What this pattern would mean if seen in a real patient. Framed as education, not as a diagnostic recommendation."
                    },
                    "overall_confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    }
                  },
                  "required": [
                    "one_line_summary",
                    "primary_diagnosis",
                    "secondary_findings",
                    "differential",
                    "clinical_significance_education",
                    "overall_confidence"
                  ],
                  "additionalProperties": false
                },
                "teaching_pearls": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 1,
                  "maxItems": 5,
                  "description": "The 1-5 highest-yield teaching points for this strip."
                },
                "difficulty_estimate": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5
                },
                "concepts_illustrated": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Slugs from the concept taxonomy that this strip exemplifies."
                },
                "cannot_interpret": {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "reason"
                  ],
                  "additionalProperties": false,
                  "description": "Set only if image_quality is 'poor' and interpretation is unsafe. When present, other clinical fields may be omitted."
                }
              },
              "required": [
                "schema_version",
                "image_quality",
                "rate",
                "rhythm",
                "axis",
                "intervals",
                "p_wave_morphology",
                "qrs_morphology",
                "st_t_changes",
                "chamber_enlargement",
                "conduction_abnormalities",
                "final_synthesis",
                "teaching_pearls",
                "difficulty_estimate",
                "concepts_illustrated"
              ],
              "additionalProperties": false
            },
            "gap_analysis": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string",
                      "const": "1.0"
                    },
                    "sections_correct": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Rubric section names the learner got right."
                    },
                    "sections_partial": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "section": {
                            "type": "string"
                          },
                          "learner_value": {},
                          "canonical_value": {},
                          "note": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "section"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sections_missing": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "section": {
                            "type": "string"
                          },
                          "canonical_value": {}
                        },
                        "required": [
                          "section"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sections_wrong": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "section": {
                            "type": "string"
                          },
                          "learner_value": {},
                          "canonical_value": {},
                          "severity": {
                            "type": "string",
                            "enum": [
                              "life_threatening_missed",
                              "primary_diagnosis_missed",
                              "secondary_finding_missed",
                              "measurement_off",
                              "stylistic"
                            ]
                          }
                        },
                        "required": [
                          "section"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "schema_version",
                    "sections_correct",
                    "sections_partial",
                    "sections_missing",
                    "sections_wrong"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "tutor_response": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string",
                      "const": "1.0"
                    },
                    "affirmation": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 400,
                      "description": "Specific, one-sentence opener noting what the learner read correctly."
                    },
                    "primary_gaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "concept_slug": {
                            "type": "string",
                            "minLength": 1
                          },
                          "gap_description": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 800
                          },
                          "teaching": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000,
                            "description": "The general skill — transferable to the next strip."
                          },
                          "applied_to_this_strip": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000,
                            "description": "How the general skill applies to THIS image, lead by lead."
                          },
                          "leads_to_examine": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "I",
                                "II",
                                "III",
                                "aVR",
                                "aVL",
                                "aVF",
                                "V1",
                                "V2",
                                "V3",
                                "V4",
                                "V5",
                                "V6",
                                "rhythm_strip"
                              ]
                            }
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "life_threatening_missed",
                              "primary_diagnosis_missed",
                              "secondary_finding_missed",
                              "measurement_off",
                              "stylistic"
                            ]
                          }
                        },
                        "required": [
                          "concept_slug",
                          "gap_description",
                          "teaching",
                          "applied_to_this_strip",
                          "leads_to_examine"
                        ],
                        "additionalProperties": false
                      },
                      "minItems": 0,
                      "maxItems": 3
                    },
                    "next_step_recommendation": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "schema_version",
                    "affirmation",
                    "primary_gaps",
                    "next_step_recommendation"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "duration_ms": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "id",
            "user_id",
            "case_id",
            "learner_response",
            "canonical_snapshot",
            "gap_analysis",
            "tutor_response",
            "duration_ms",
            "created_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "CreateAttemptRequest": {
      "$ref": "#/definitions/CreateAttemptRequest",
      "definitions": {
        "CreateAttemptRequest": {
          "type": "object",
          "properties": {
            "learner_response": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "string",
                  "const": "1.0"
                },
                "final_synthesis": {
                  "type": "object",
                  "properties": {
                    "primary_diagnosis": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "secondary_findings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "overall_confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    }
                  },
                  "required": [
                    "primary_diagnosis"
                  ],
                  "additionalProperties": false
                },
                "image_quality": {
                  "type": "string",
                  "enum": [
                    "good",
                    "marginal",
                    "poor"
                  ]
                },
                "rate": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "measurement_value": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "rhythm": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "diagnosis": {
                      "type": "string"
                    },
                    "regular": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "axis": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "measurement_value": {
                      "type": "number"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "left_deviation",
                        "right_deviation",
                        "extreme",
                        "indeterminate"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "intervals": {
                  "type": "object",
                  "properties": {
                    "pr_ms": {
                      "type": "number"
                    },
                    "qrs_ms": {
                      "type": "number"
                    },
                    "qt_ms": {
                      "type": "number"
                    },
                    "qtc_ms": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "p_wave_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "abnormalities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "qrs_morphology": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "bundle_branch_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "rbbb",
                        "lbbb",
                        "incomplete_rbbb",
                        "incomplete_lbbb",
                        "nonspecific_ivcd"
                      ]
                    },
                    "fascicular_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "lafb",
                        "lpfb",
                        "bifascicular"
                      ]
                    },
                    "pathologic_q_waves_present": {
                      "type": "boolean"
                    },
                    "pathologic_q_waves_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "st_t_changes": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "st_elevation_present": {
                      "type": "boolean"
                    },
                    "st_elevation_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "st_depression_present": {
                      "type": "boolean"
                    },
                    "st_depression_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "t_wave_inverted_leads": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "chamber_enlargement": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "lvh": {
                      "type": "boolean"
                    },
                    "rvh": {
                      "type": "boolean"
                    },
                    "la_enlargement": {
                      "type": "boolean"
                    },
                    "ra_enlargement": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "conduction_abnormalities": {
                  "type": "object",
                  "properties": {
                    "finding": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "reasoning": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "leads_to_examine": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "I",
                          "II",
                          "III",
                          "aVR",
                          "aVL",
                          "aVF",
                          "V1",
                          "V2",
                          "V3",
                          "V4",
                          "V5",
                          "V6",
                          "rhythm_strip"
                        ]
                      }
                    },
                    "av_block": {
                      "type": "string",
                      "enum": [
                        "none",
                        "first_degree",
                        "mobitz_i",
                        "mobitz_ii",
                        "high_grade",
                        "complete"
                      ]
                    },
                    "preexcitation": {
                      "type": "boolean"
                    },
                    "paced": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "schema_version",
                "final_synthesis"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "learner_response"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "CreateAttemptResponse": {
      "$ref": "#/definitions/CreateAttemptResponse",
      "definitions": {
        "CreateAttemptResponse": {
          "type": "object",
          "properties": {
            "attempt_id": {
              "type": "string",
              "format": "uuid"
            },
            "gap_analysis": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "string",
                  "const": "1.0"
                },
                "sections_correct": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Rubric section names the learner got right."
                },
                "sections_partial": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "section": {
                        "type": "string"
                      },
                      "learner_value": {},
                      "canonical_value": {},
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "section"
                    ],
                    "additionalProperties": false
                  }
                },
                "sections_missing": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "section": {
                        "type": "string"
                      },
                      "canonical_value": {}
                    },
                    "required": [
                      "section"
                    ],
                    "additionalProperties": false
                  }
                },
                "sections_wrong": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "section": {
                        "type": "string"
                      },
                      "learner_value": {},
                      "canonical_value": {},
                      "severity": {
                        "type": "string",
                        "enum": [
                          "life_threatening_missed",
                          "primary_diagnosis_missed",
                          "secondary_finding_missed",
                          "measurement_off",
                          "stylistic"
                        ]
                      }
                    },
                    "required": [
                      "section"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "schema_version",
                "sections_correct",
                "sections_partial",
                "sections_missing",
                "sections_wrong"
              ],
              "additionalProperties": false
            },
            "tutor_response": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "string",
                  "const": "1.0"
                },
                "affirmation": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 400,
                  "description": "Specific, one-sentence opener noting what the learner read correctly."
                },
                "primary_gaps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "concept_slug": {
                        "type": "string",
                        "minLength": 1
                      },
                      "gap_description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 800
                      },
                      "teaching": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000,
                        "description": "The general skill — transferable to the next strip."
                      },
                      "applied_to_this_strip": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000,
                        "description": "How the general skill applies to THIS image, lead by lead."
                      },
                      "leads_to_examine": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "I",
                            "II",
                            "III",
                            "aVR",
                            "aVL",
                            "aVF",
                            "V1",
                            "V2",
                            "V3",
                            "V4",
                            "V5",
                            "V6",
                            "rhythm_strip"
                          ]
                        }
                      },
                      "severity": {
                        "type": "string",
                        "enum": [
                          "life_threatening_missed",
                          "primary_diagnosis_missed",
                          "secondary_finding_missed",
                          "measurement_off",
                          "stylistic"
                        ]
                      }
                    },
                    "required": [
                      "concept_slug",
                      "gap_description",
                      "teaching",
                      "applied_to_this_strip",
                      "leads_to_examine"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 0,
                  "maxItems": 3
                },
                "next_step_recommendation": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "required": [
                "schema_version",
                "affirmation",
                "primary_gaps",
                "next_step_recommendation"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "attempt_id",
            "gap_analysis",
            "tutor_response"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "UploadUrlRequest": {
      "$ref": "#/definitions/UploadUrlRequest",
      "definitions": {
        "UploadUrlRequest": {
          "type": "object",
          "properties": {
            "content_type": {
              "type": "string",
              "pattern": "^image\\/"
            },
            "filename": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          "required": [
            "content_type",
            "filename"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "UploadUrlResponse": {
      "$ref": "#/definitions/UploadUrlResponse",
      "definitions": {
        "UploadUrlResponse": {
          "type": "object",
          "properties": {
            "upload_url": {
              "type": "string",
              "format": "uri"
            },
            "storage_key": {
              "type": "string"
            },
            "expires_at": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "upload_url",
            "storage_key",
            "expires_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "CreateCaseRequest": {
      "$ref": "#/definitions/CreateCaseRequest",
      "definitions": {
        "CreateCaseRequest": {
          "type": "object",
          "properties": {
            "storage_key": {
              "type": "string",
              "minLength": 1
            },
            "title": {
              "type": "string",
              "maxLength": 255
            },
            "attestation": {
              "type": "boolean",
              "const": true,
              "description": "User affirms the image is de-identified. Recorded in the audit log."
            }
          },
          "required": [
            "storage_key",
            "attestation"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "Concept": {
      "$ref": "#/definitions/Concept",
      "definitions": {
        "Concept": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "slug": {
              "type": "string",
              "pattern": "^[a-z0-9_]+$"
            },
            "category": {
              "type": "string",
              "enum": [
                "rate",
                "rhythm",
                "axis",
                "intervals",
                "p_wave",
                "qrs",
                "ischemia",
                "chamber",
                "conduction",
                "paced",
                "meta"
              ]
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "description": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            },
            "rubric_section": {
              "type": "string",
              "enum": [
                "rate",
                "rhythm",
                "axis",
                "intervals",
                "p_wave_morphology",
                "qrs_morphology",
                "st_t_changes",
                "chamber_enlargement",
                "conduction_abnormalities",
                "final_synthesis"
              ]
            },
            "difficulty": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            }
          },
          "required": [
            "id",
            "slug",
            "category",
            "title",
            "description",
            "rubric_section",
            "difficulty"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "MasteryEntry": {
      "$ref": "#/definitions/MasteryEntry",
      "definitions": {
        "MasteryEntry": {
          "type": "object",
          "properties": {
            "concept_id": {
              "type": "string",
              "format": "uuid"
            },
            "concept_slug": {
              "type": "string"
            },
            "attempts_count": {
              "type": "integer",
              "minimum": 0
            },
            "correct_count": {
              "type": "integer",
              "minimum": 0
            },
            "ewma_score": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "last_attempt_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "concept_id",
            "concept_slug",
            "attempts_count",
            "correct_count",
            "ewma_score",
            "last_attempt_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "User": {
      "$ref": "#/definitions/User",
      "definitions": {
        "User": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "username": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "display_name": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "training_level": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "nursing_student",
                    "medical_student",
                    "resident",
                    "crna_student",
                    "paramedic_student",
                    "practicing_clinician",
                    "other"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            },
            "last_seen_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "username",
            "display_name",
            "training_level",
            "created_at",
            "last_seen_at"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "ProblemDetails": {
      "$ref": "#/definitions/ProblemDetails",
      "definitions": {
        "ProblemDetails": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "about:blank"
            },
            "title": {
              "type": "string"
            },
            "status": {
              "type": "integer",
              "minimum": 400,
              "maximum": 599
            },
            "detail": {
              "type": "string"
            },
            "instance": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "title",
            "status"
          ],
          "additionalProperties": false
        }
      },
      "$schema": "http://json-schema.org/draft-07/schema#"
    }
  }
}