{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/healthtensor/json-schema/healthtensor-notes-response-schema.json",
  "title": "NotesResponse",
  "description": "Response body for the GET /notes endpoint.",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/healthtensor-openapi.json#/components/schemas/NotesResponse",
  "properties": {
    "notes": {
      "items": {
        "$ref": "#/$defs/NoteItem"
      },
      "type": "array",
      "title": "Notes",
      "description": "List of practitioner notes for the patient"
    },
    "regardPatientId": {
      "type": "string",
      "title": "Regardpatientid",
      "description": "The Regard patient ID (echoed from request)"
    },
    "count": {
      "type": "integer",
      "title": "Count",
      "description": "Total number of notes returned"
    }
  },
  "type": "object",
  "required": [
    "notes",
    "regardPatientId",
    "count"
  ],
  "$defs": {
    "NoteItem": {
      "properties": {
        "sourceId": {
          "type": "string",
          "title": "Sourceid",
          "description": "DocumentReference note identifier used as note identity in findings"
        },
        "binarySourceId": {
          "type": "string",
          "title": "Binarysourceid",
          "description": "FHIR Binary identifier of the note's parsed text"
        },
        "effectiveAt": {
          "type": "string",
          "title": "Effectiveat",
          "description": "ISO 8601 datetime when the note was created"
        },
        "authorId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authorid",
          "description": "Identifier of the note author, if available"
        },
        "authorName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authorname",
          "description": "Human-readable name of the note author, if resolvable"
        },
        "authorCredentials": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authorcredentials",
          "description": "Comma-separated credentials of the note author (e.g., 'MD, FACP')"
        },
        "noteTypes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Notetypes",
          "description": "Human-readable note type labels (from note_kinds concepts)"
        },
        "status": {
          "type": "string",
          "title": "Status",
          "description": "Status of the note (e.g., 'final', 'preliminary', 'amended')"
        },
        "encounterId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Encounterid",
          "description": "Encounter ID associated with the note, if any"
        }
      },
      "type": "object",
      "required": [
        "sourceId",
        "binarySourceId",
        "effectiveAt",
        "authorId",
        "noteTypes",
        "status",
        "encounterId"
      ],
      "title": "NoteItem",
      "description": "A single practitioner note in the notes list."
    }
  }
}