{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/suki/main/json-schema/suki-clinical-note-schema.json",
  "title": "Suki Clinical Note",
  "description": "A specialty-specific clinical note generated by the Suki Ambient API. Organized into LOINC-coded sections; supports problem-based charting and SOAP formats.",
  "type": "object",
  "required": ["sessionId", "encounterId", "sections", "generatedAt"],
  "properties": {
    "sessionId": { "type": "string", "format": "uuid" },
    "encounterId": { "type": "string" },
    "specialty": { "type": "string" },
    "format": { "type": "string", "enum": ["soap", "problem-based", "narrative"] },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["title", "text"],
        "properties": {
          "loinc": { "type": "string", "description": "LOINC code identifying the note section." },
          "title": { "type": "string" },
          "text": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "structuredData": {
      "type": "object",
      "properties": {
        "problems": { "type": "array", "items": { "type": "string" } },
        "medications": { "type": "array", "items": { "type": "string" } },
        "orders": { "type": "array", "items": { "type": "object" } }
      }
    },
    "generatedAt": { "type": "string", "format": "date-time" }
  },
  "additionalProperties": false
}
