尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Reschedules patients when a doctor is pulled into emergency surgery. MVP with simulated calls in English, Tamil and Hindi (fictional data).
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
▶ Live demo: docdelay-three.vercel.app — every visitor gets their own private demo; press "Reset demo" to start over.
When a doctor is suddenly pulled into emergency surgery, DocDelay finds every affected patient, calls them in their own language, and rebooks them — later today, with another doctor today, or on another day — so nobody is left waiting in the lobby.
MVP — all hospital, doctor and patient data is fictional; calls and texts are simulated.
No real phone calls are made and no real text messages are sent. Phone numbers are placeholders (+91 90000 00001, …).查看完整 README ↗▶ Live demo: docdelay-three.vercel.app — every visitor gets their own private demo; press "Reset demo" to start over.
When a doctor is suddenly pulled into emergency surgery, DocDelay finds every affected patient, calls them in their own language, and rebooks them — later today, with another doctor today, or on another day — so nobody is left waiting in the lobby.
MVP — all hospital, doctor and patient data is fictional; calls and texts are simulated. No real phone calls are made and no real text messages are sent. Phone numbers are placeholders (
+91 90000 00001, …).
A cardiologist has a full afternoon clinic. At 10 AM they're called into emergency surgery and won't be back until 1 PM. Twelve patients are booked in that window — some already travelling to the hospital.
Today, the front desk has to work this out by hand: find the affected appointments, phone each patient, find new slots without double-booking, and let everyone else know if their time moves. It's slow, stressful, and patients often just wait for hours.
DocDelay plugs into the hospital's management system (HMS), finds the affected appointments automatically, and contacts each patient to ask: wait for a later slot today, move to another day, or cancel? If another doctor from the same department is free today, the patient can also choose to see them.
checkFreeSlots, bookSlot, and for another doctor checkAnotherDoctorSlots, bookWithAnotherDoctor) that apply all the hospital's rules — the AI only talks, it never decides, and any AI reply that sounds like a confirmation without a real booking is never shown (confirmations always use DocDelay's fixed wording). Without a key (as on the live demo) a free rule-based stand-in does the same job. If the AI fails, that message falls back to the stand-in.src/lib/clock.ts plus each visitor's own demo), which can be switched to the real time later.Alongside calls, DocDelay can reach patients on WhatsApp. Nothing is really sent: the WhatsApp screen is a phone-style chat in your browser, and you play the patient.
| Decision | Why |
|---|---|
| Use free slots first; only then push others back. | Filling a gap moves nobody else. Pushing later patients back 15 minutes is a last resort. |
| Patients are placed in the order they answer. | First come, first served. Someone who said "later today" first shouldn't be bumped by someone who answered after them. |
45-minute fairness cap (MAX_PUSH_MINUTES) | Patients who weren't affected shouldn't pay for the delay. No unaffected patient is ever pushed more than 45 minutes past their original time (all pushes counted together). |
7 PM hard limit (LATEST_APPOINTMENT_END) | The day may run late, but not indefinitely. If fitting someone in would run past 7 PM, it's "no room today". |
| Other days: empty slots only | Moving someone on another day to fit a delayed patient would just spread the disruption. Every slot DocDelay offers comes from the same empty-slot search (checkFreeSlots in chat), and it's re-checked just before booking — if two patients pick the same slot, the first wins and the second gets fresh options. |
| Another doctor: approved, same specialty, empty slots only | Only doctors the hospital has approved to cover for the unavailable doctor, of the same specialty, are offered — the list lives in the hospital data, not the screens. Slots are today, at or after the patient's original time, ending by 5 PM, and the other doctor's patients are never moved. If no such slot exists, the option isn't shown. |
| Health concerns always go to a person | Software must never judge how serious a symptom is. The check is deliberately broad (false alarms are cheap; staff clear them with one click), and it runs before any AI, so obvious concerns never depend on a model. |
| "No room today" → offer other days straight away | The patient is already on the phone. Offering three concrete choices beats "someone will call you back". |
| Morning ↔ morning, afternoon ↔ afternoon | A patient booked at 10 AM probably arranged their day around a morning visit. Offers match the part of the day first, then the earliest days, then the closest time. |
| Staff-approved texts | Changes are queued as pending updates (one per patient, always holding the latest time). Staff review and press "Send updates". This avoids a flood of messages when someone is moved several times, and keeps a human in the loop. |
The Tamil and Hindi wording was written for this demo and is marked in the code as needing review by native speakers before any real use.
src/hms/mockData.json. Each visitor's demo is kept in a small cookie in their own browser — it stores the list of steps they took (not the data), and the server replays them on every request — so every visitor gets a private demo and "Reset demo" just clears the cookie.You'll need Node.js 20.9 or newer.
git clone https://github.com/tarunrambabu-lab/docdelay.git
cd docdelay
npm install
npm run dev
Then open http://localhost:3000.
Optional — to use the Claude-powered chat, create a .env.local file with ANTHROPIC_API_KEY=your-key (it's git-ignored). Each AI message's token use and estimated cost is printed in the terminal.
The demo data is always relative to today, and every demo starts at 9:00 AM, so it works on any day and at any time.
src/
hms/
mockHms.ts ← the only code that reads/writes hospital data (swap for a real HMS)
visitorState.ts ← keeps each visitor's demo steps in a cookie
mockData.json ← fictional hospital, 4 doctors (2 cardiologists), patients, 8 days of appointments
types.ts ← shared data shapes
lib/
reschedulingRules.ts ← all rescheduling rules and hospital settings
clock.ts ← the demo clock: the only place the app reads the time
understanding/ ← turns a chat message into an intent (rules today; Claude later — one setting)
chatReplies.ts ← chat-only lines (incl. the fixed urgent line)
callScript.ts ← what the call says, in English / Tamil / Hindi
smsText.ts ← text-message wording
whatsappStatus.ts ← the dashboard's WhatsApp labels (read-only)
app/
page.tsx ← front-desk dashboard
calls/[id]/ ← call simulator
messages/ ← outbox: WhatsApp and SMS updates (pending + sent)
whatsapp/[id]/ ← simulated WhatsApp chat
src/lib/understanding/); before switching it on publicly, move the site-wide spending counter to a shared store and set a spend limit on the API key.hms interface.Smaller items are tracked in BACKLOG.md.
Built with Claude Code as an AI pair-programmer: I described each stage and its product rules; Claude Code wrote and tested the code, and I reviewed and steered the decisions. The project's working rules for the AI are in CLAUDE.md.
© 2026 Tarun Ramesh Babu. All rights reserved. This code is shared for portfolio viewing only and may not be copied, reused or redistributed without permission.
| The hospital system sits behind one module | All data access lives in src/hms/mockHms.ts. A real HMS (FHIR or a custom API) can replace the mock without touching the screens. |
| A fixed demo clock | A demo visited at 11 PM shouldn't behave differently from one at 10 AM. Fixing the clock at 9:00 AM — the first slot of the day — also means nothing can ever be offered in the past. |
| Rules live in one file | Every rescheduling rule and setting (slot length, 5 PM / 7 PM, 45 minutes, closed days…) is in src/lib/reschedulingRules.ts, so a hospital can tune them in one place. |