Skip to content

Appointment waitlist — fill cancellations, get pets seen sooner#6

Open
evangauer wants to merge 3 commits into
mainfrom
feat/appointment-waitlist
Open

Appointment waitlist — fill cancellations, get pets seen sooner#6
evangauer wants to merge 3 commits into
mainfrom
feat/appointment-waitlist

Conversation

@evangauer
Copy link
Copy Markdown
Owner

What this does for clinics

When an appointment is cancelled, the freed slot usually goes to waste and a pet waits longer than it should. This adds a waitlist: front desk can add a client/pet (with an optional appointment type and date window), and when a slot opens, OpenVPM surfaces the waiting clients who fit — oldest request first, so it's fair.

A roadmap Next item, built to progress everyday clinic workflows.

What's included

  • appointment_waitlist table (client, optional patient + appointment type, optional preferred date window, status).
  • Pure matchWaitlist() — returns waiting entries that fit a freed slot's date + type, FIFO ordered. Fully unit-tested (6 tests).
  • waitlist tRPC router: add, list, setStatus, and matchesForSlot (the 'a slot opened — who fits?' query).

Notes

Verified

pnpm test (125 passing), pnpm type-check, pnpm build all green.

🤖 Generated with Claude Code

evangauer and others added 3 commits June 2, 2026 14:16
Two pre-existing breakages on main (from the TipTap PR) that fail CI and Vercel:

1. pnpm-lock.yaml was missing the @tiptap/* dependencies declared in
   apps/web/package.json, so 'pnpm install --frozen-lockfile' (CI + Vercel)
   failed with ERR_PNPM_OUTDATED_LOCKFILE. Regenerated the lockfile.
2. records/new-soap imported '@/components/SoapNoteEditor', but the component
   lived in app/components/ (the @/ alias resolves to the app root, not app/).
   Moved SoapNoteEditor + SoapNoteDisplay into components/ to match the
   repo convention (components/{ui,layout,common}) so the import resolves.

Verified: pnpm install --frozen-lockfile, type-check, test (119), and build
all pass for both apps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A visitor who came straight to demo.openvpm.com hit a 307 to the marketing
site (unauthenticated root -> NEXT_PUBLIC_WWW_URL), which dead-ended anyone
trying to actually try the demo. Now unauthenticated root redirects to /login,
which offers one-click demo access. Removes the funnel leak on the demo
subdomain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A roadmap 'Next' item that progresses clinic workflows: when an appointment is
cancelled and a slot opens, clinics can find waiting clients who fit the freed
date and appointment type — so pets get seen sooner and the slot isn't wasted.

- appointment_waitlist table (client/patient/type, optional date window, status)
- pure matchWaitlist() — waiting + type-compatible + within window, oldest
  request first (FIFO fairness); 6 unit tests
- waitlist router: add, list, setStatus, matchesForSlot

Additive schema — run pnpm db:push on deploy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openvpm Ready Ready Preview, Comment Jun 3, 2026 12:43am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant