Bug #629
openOPD queue (My Queue & My Day) does not update in real-time when a new patient registers — requires manual refresh
0%
Description
Description: When a patient is registered in OPD, the doctor’s “My Queue” and “My Day” dashboard counts do not update live to reflect the new patient. The doctor has to manually refresh the page to see the updated queue count and patient list.
Steps:
Log in as a doctor and open “My Queue” (e.g. https://vvmc.test.clinq.health/doctor/my-queue).
Note the “In queue” count (1 patient — “Jessin”).
In a separate session/tab, register a new patient in OPD (e.g. “fiza”).
Without refreshing, observe the “My Queue” page — the count and patient list remain unchanged.
Manually refresh the page.
Observe the “In queue” count and patient list now update correctly.
Repeat the same check on the “My Day” dashboard.
Expected Result: When a new patient registers in OPD, “My Queue” and “My Day” should update automatically (in real-time or via polling/push) to show the new patient and updated queue count, without requiring a manual page refresh.
Actual Result: The queue count and patient list stay stale after a new OPD registration. Confirmed: “In queue” showed 1 (awaiting triage: Jessin). After registering a second patient (“fiza”) and refreshing, “In queue” jumped to 2 — the update only appeared after a manual refresh, not live.
S- Updated by SK - 14 days ago
- Assignee changed from Fiza M. to Roshni Harish.
Fixed. useQueue (apps/portal/src/lib/queries/queue.ts) had no refetchInterval, unlike useMyDay which already polls every 60s for this exact reason - My Queue only refreshed on navigation. Added the same refetchInterval: 60_000 / refetchIntervalInBackground: false, with a regression test (fake timers, asserts a second fetch after 60s). My Day itself was already fixed before this review (already had the polling). Merged to dev (nuvita-doctor). Reassigning to Roshni to verify and close.
RH Updated by Roshni Harish. 11 days ago
- Assignee changed from Roshni Harish. to Jessin J