ready — accepting live patients; the matcher may ring them. Requires
a fresh heartbeat (within the TTL) on top of the stored flag.busy — on a call, or explicitly paused; the matcher skips them.offline — not on the live queue, OR ready whose heartbeat lapsed
(then stale is true so a UI can say "you were signed off" rather than
"you are off").OptionalreadyWhen they last went ready. Cleared on busy/offline.
OptionallastTheir last heartbeat, whatever the status.
OptionalactiveThe telehealth consult they are currently on (or being rung for) — the
id to feed POST /v1/telehealth-consults/{id}/room. Absent when idle.
OptionalstaleTrue when the stored flag says ready but the heartbeat is older than the
TTL, so the platform treats them as offline. Resume by posting presence
{ready: true} again (a heartbeat alone does not revive a stale row).
A physician's LIVE-QUEUE presence — whether the telehealth matcher may hand them a waiting patient right now. Independent of
asyncAvailable(the messaging inbox) and of the booked-appointment rota: a physician can be off the live queue and still receive async threads or keep appointments.Presence is a HEARTBEAT:
readyholds only while heartbeats keep arriving. The TTL is PHYSICIAN_PRESENCE_TTL_SECONDS (45 s); beat every PHYSICIAN_HEARTBEAT_INTERVAL_SECONDS (15 s) viaPOST /v1/physicians/{id}/heartbeat, and a client that simply stops beating drops toofflineon its own — a closed laptop never keeps a physician on the rota.