Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Interface PhysicianWorkspace

    Everything a clinician's screen needs, in ONE call — the polling target of GET /v1/physicians/{id}/workspace.

    Built for the integration this API is meant to make easy: a physician opens your portal and needs their presence, the live queue, the call they are on, today's appointments and their messaging inbox, refreshed every few seconds. Rather than fanning out across six reads and diffing, ask for the workspace and render it. Lists are capped at PHYSICIAN_WORKSPACE_LIST_CAP; truncated names any that were cut.

    interface PhysicianWorkspace {
        physician: PhysicianResource;
        telehealth: {
            waiting: number;
            readyPhysicians: number;
            visible: boolean;
            queue: TelehealthQueueEntry[];
            active: TelehealthConsultResource | null;
            upcoming: TelehealthConsultResource[];
        };
        async: {
            available: boolean;
            queued: AsyncConsultResource[];
            mine: AsyncConsultResource[];
            overdue: AsyncConsultResource[];
        };
        truncated?: PhysicianWorkspaceList[];
        generatedAt: string;
    }
    Index

    The acting physician, including their live-queue presence.

    telehealth: {
        waiting: number;
        readyPhysicians: number;
        visible: boolean;
        queue: TelehealthQueueEntry[];
        active: TelehealthConsultResource | null;
        upcoming: TelehealthConsultResource[];
    }

    The live video queue and the physician's own calls.

    Type Declaration

    • waiting: number

      Patients waiting in the tenant's live queue right now.

    • readyPhysicians: number

      Physicians of the tenant currently ready (fresh heartbeat).

    • visible: boolean

      Whether THIS physician currently counts among readyPhysicians — i.e. their ready is fresh enough for the matcher to see. False while busy/offline, and the tell-tale of a heartbeat that stopped.

    • queue: TelehealthQueueEntry[]

      The waiting patients, in position order.

    • active: TelehealthConsultResource | null

      The consult this physician is on or being rung for (ringing or in_progress), or null when idle. When in_progress, call /room for the LiveKit grant; when ringing, keep polling — the patient's client is confirming.

    • upcoming: TelehealthConsultResource[]

      This physician's booked appointments from now through the next 7 days, soonest first. The full agenda with a chosen window is GET /v1/physicians/{id}/agenda.

    async: {
        available: boolean;
        queued: AsyncConsultResource[];
        mine: AsyncConsultResource[];
        overdue: AsyncConsultResource[];
    }

    The messaging inbox.

    Type Declaration

    • available: boolean

      Whether auto-assignment may hand this physician new threads (asyncAvailable).

    • queued: AsyncConsultResource[]

      Tenant threads waiting for a clinician (queued) — claimable. Oldest first.

    • mine: AsyncConsultResource[]

      This physician's open threads (active / resolve_requested), the ones awaiting their reply first (then by last activity).

    • overdue: AsyncConsultResource[]

      Tenant threads held by SOMEONE ELSE whose response SLA has lapsed — takeover candidates. Empty when the rota is keeping up.

    Lists that hit PHYSICIAN_WORKSPACE_LIST_CAP and were cut. Absent when every list is complete — the normal case; a clinic that fills one is a clinic that should page the corresponding list endpoint instead.

    generatedAt: string

    When this snapshot was taken — the clock waitedSeconds is relative to.