{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-patient-note-response-schema.json",
  "title": "PatientNoteResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-m42-api-openapi.yml#/components/schemas/PatientNoteResponse",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "title": "Workspace Id"
    },
    "patient_id": {
      "type": "string",
      "title": "Patient Id"
    },
    "authored_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Authored At"
    },
    "author": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Author"
    },
    "note_text": {
      "type": "string",
      "title": "Note Text"
    },
    "extractions": {
      "$ref": "#/$defs/PatientNoteExtractions"
    }
  },
  "type": "object",
  "required": [
    "workspace_id",
    "patient_id",
    "note_text",
    "extractions"
  ],
  "$defs": {
    "PatientNoteExtractions": {
      "properties": {
        "symptoms": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Symptoms"
        },
        "concerns": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Concerns"
        },
        "medications_planned": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Medications Planned"
        },
        "hba1c_sentiment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hba1C Sentiment"
        },
        "activity_level": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Activity Level"
        },
        "smoking_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Smoking Status"
        },
        "food_pattern": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Food Pattern"
        },
        "n_symptoms": {
          "type": "integer",
          "title": "N Symptoms",
          "default": 0
        },
        "n_concerns": {
          "type": "integer",
          "title": "N Concerns",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "symptoms",
        "concerns",
        "medications_planned"
      ],
      "title": "PatientNoteExtractions"
    }
  }
}