casebook
Open sourceOne place for every medical report — synced hourly from the TMC Punjab Saarthi portal, searchable end to end, and readable by an AI assistant. Built by a caregiver, for caregivers. Free and open source.
- Next.js
- PostgreSQL
- Zilliz
- Cloudflare R2
- MCP
- TypeScript

Every report from TMC Punjab, on one timeline.
Casebook connects to your Saarthi login, pulls in new reports as they're published, and emails you when they land — so you stop checking the app. Search the whole record. Ask questions in plain language. Free, and open source.
Use it free → · Run your own copy →
Independent project — not affiliated with Tata Memorial Centre or the Saarthi app. Not medical advice; every decision belongs to your care team.
If you're the one holding the folder
Treatment produces paper at a rate nobody warns you about. Scans, blood work, pathology, discharge summaries — some in the Saarthi app, some as PDFs in a WhatsApp thread, some existing only as a photo of a printout taken in a corridor.
And the app only shows you what's there when you open it. So you reopen it all evening, waiting for the morning's ultrasound to appear. The download fails the one time you need to show someone. And when the doctor asks “what was the creatinine before cycle three?”, someone starts scrolling a phone.
The information isn't missing. It just can't be held all at once, by anyone. That's the job Casebook does.
Saarthi publishes. Casebook keeps.
You'll keep using Saarthi — appointments, payments, and the hospital's official record all live there, and nothing about that changes. Casebook sits beside it and does the part nobody has hands free for: keeping every report, from every source, in one place you can actually use.
New reports arrive on their own. Connect your Saarthi login once. Casebook checks every hour and sends one email when something new lands — never one email per report, and never a report's contents inside the mail. To be clear about what this is not: reports appear at the same time they appear on the portal. You don't get them faster. You just never have to go looking.
Nothing gets lost. Every report sits on one timeline, by date, newest first — and reports without a clear date surface at the top instead of sinking, so nothing quietly disappears. The original PDF is stored untouched and is always there to open, download, or hand to a doctor.
Search that forgives typing. Type CA 19-9, CA19.9, or CA-19-9 — they all find each other. One search box across every report you've ever added.
Ask questions in plain language. Connect Casebook to Claude and ask things like “what have the reports since Tuesday said?” or “show me every mention of the liver lesion.” Every answer comes back with the exact report and date it came from, so you can check it yourself. Setup takes a couple of clicks from the app's Connect to Claude page.
Outside reports come too. The private-lab PDF from WhatsApp, the old file from a different hospital, the photo of a printout — upload them and they join the same timeline.
How it works
- Sign up. Free, no card.
- Connect your Saarthi login — or just upload PDFs.
- The timeline builds itself. You get one email when new reports arrive.
Why this exists
Someone close to me is being treated for cancer at TMC Punjab.
Within a couple of months there were files in a WhatsApp thread, files in an email folder, files behind the Saarthi login, and files that existed only as photos of printouts. I'm an engineer, so I built the thing I needed: a place where every report lands automatically, stays searchable, and can answer a plain question late at night — what has moved, what hasn't, how is the current line tracking — without opening six PDFs and comparing numbers by hand.
It has run for my family for months. Now I've open-sourced the code, and the copy you can sign up for above is the same instance my own family's record lives in. I'm not asking anyone to trust something I don't use for the people I love most.
Is my data safe?
Fair question — this is health data, and you should ask it of everything, including this.
Your Saarthi password is encrypted and used for exactly one thing: fetching your own reports, the same way you would by hand. If the password stops working, the sync halts and tells you instead of retrying.
Emails never contain medical content. A name, a count, a sign-in link — that is all that ever passes through a mail server.
The code is public. Anyone — your engineer cousin included — can read exactly what it does: github.com/geetansh/Casebook.
The hosted copy is run by one person: me. It's the same instance my family uses. There's no company behind it, no ads, and nothing is ever sold or shared. If you want out, take your PDFs and ask me to delete the account — everything goes with it.
And if “one person runs it” isn't comfortable — good. That's exactly why the code is open. Run your own copy on your own computer, and the record never leaves it.
What it is, and isn't
Casebook organises and recalls. It will make sure that whoever walks into the next appointment has read everything, in order, and knows which question to ask. It will not diagnose, and it should never change a treatment decision — the oncologist reading the actual films is doing something this cannot do. Anything it tells you, check against the source report it cites, and take to your care team.
Questions people ask
Is this an official TMC or Saarthi app?
No. It's an independent open-source project built by a patient's family member. It isn't affiliated with, endorsed by, or connected to Tata Memorial Centre. You keep using Saarthi exactly as before.
Which hospitals does it work with?
Automatic sync works with the TMC Punjab Saarthi portal today — Homi Bhabha Cancer Hospital, Sangrur, and HBCH & RC, New Chandigarh (Mullanpur), the hospitals most people in Punjab just call “Tata Hospital.” Reports from anywhere else — TMH Mumbai, ACTREC, private labs — can be uploaded and live on the same timeline. Developers can add other hospitals' portals.
Will I get reports faster than on the Saarthi app?
No — Casebook reads the same portal, so reports appear at the same time they're published. The difference is that it checks every hour and emails you when something lands, so you don't spend the evening reopening the app.
Is it really free?
Yes. I built it for my own family and run it regardless. The code is open source under AGPL, so you're never locked in — you can always take your PDFs and run your own copy.
Is my Saarthi password safe?
It's encrypted at rest and used only to fetch your own reports — never logged, never shared. If it stops working, the sync stops and asks you rather than retrying.
Can I add old paper reports?
Yes. Upload a PDF or a photo of the printout and it joins the timeline like everything else.
What does the AI actually do?
It reads the reports you've collected and answers questions about them, always citing the specific report and date. It doesn't give medical advice, and it can only read — it can't change or delete anything.
I'm a developer, or I'd rather not use a hosted service.
Right instinct. The whole thing is open source — docker compose up and it runs on your machine, and the record never leaves it. Start at the README.
आम सवाल (हिन्दी में)
क्या यह TMC या Saarthi का official app है?
नहीं। यह एक स्वतंत्र open-source project है, जिसे एक मरीज़ के परिवार के सदस्य ने अपनी ज़रूरत के लिए बनाया है। Saarthi app आप पहले की तरह इस्तेमाल करते रहेंगे — appointment, payment, hospital का official record सब वहीं रहेगा। Casebook बस सारी reports को एक जगह, एक timeline पर संभालकर रखता है।
क्या यह free है?
हाँ, पूरी तरह। मैंने इसे अपने परिवार के लिए बनाया है और वैसे भी चलाता हूँ। Code open source है — चाहें तो अपने computer पर ख़ुद भी चला सकते हैं।
क्या मेरा Saarthi password सुरक्षित है?
Password encrypted रहता है और सिर्फ़ आपकी अपनी reports लाने के काम आता है — वही काम जो आप app खोलकर ख़ुद करते हैं। ग़लत password पर बार-बार कोशिश नहीं होती — sync रुक जाता है और आपको बताता है।
क्या reports Saarthi app से पहले मिल जाएँगी?
नहीं — reports वहीं से, उसी समय आती हैं। फ़र्क़ सिर्फ़ इतना है कि Casebook हर घंटे ख़ुद check करता है और नई report आते ही आपको email भेज देता है। बार-बार app खोलने की ज़रूरत ख़त्म।
एक ज़रूरी बात: यह app डॉक्टर की सलाह की जगह नहीं है। Reports को संभालना और ढूँढना इसका काम है; इलाज का हर फ़ैसला आपकी medical team का है।
Engineering notes
The rest of this page is for engineers. If you just wanted the reports in one place, you already have everything you need.
The shape is ingest → store → extract → confirm → index → serve.
Ingest. Two doors. A provider logs into the hospital portal on an hourly schedule and picks up reports as they're published — the reference provider was built against the TMC Punjab Saarthi portal, and adding a hospital means implementing one interface. Everything else comes in by upload: outside labs, older scans, the photo of the discharge summary. Failing connections back off (1h → 12h) and alert after about a day; a wrong password is never retried on a schedule, because only a human can fix it.
Store. The original PDF is the source of truth and is never mutated. Local disk by default, Cloudflare R2 if configured. If everything downstream burned down, the record itself would still be intact.
Extract. Text, structured lab observations, and — with an LLM key configured — the report's date and type come out at ingest. The date matters more than it sounds: a report filed under the wrong date silently reorders the timeline, and nobody notices until an answer comes back wrong. Which is why there's a light confirm step: filing is automatic, but a human glances at date and type before a report becomes part of the record the AI can see.
Index. Postgres full-text by default — a complete install runs on Postgres alone. Add an embedding key and a vector store and search turns semantic; one half without the other stays off, and the app says so at startup rather than pretending. Both indexes are derived and disposable. Only the raw PDFs are precious, and they're the one thing the system never touches.
Serve. Two front doors onto the same store: a dashboard for people, an MCP server for models — three read-only tools (list_documents, get_document, search), only confirmed reports, and provenance on every response: document, date, centre, and a link to the source. That matters more here than in most retrieval systems: an interpretation nobody can trace back to a specific page on a specific date is one nobody can check.
Decisions worth arguing with. One record, one account — no roles, no admin panel, no sharing model to reason about. Reads are scoped and fail closed; a torn scope raises rather than quietly returning nothing. Optional dependencies come in all-or-nothing groups that throw on partial config instead of degrading silently. And the confirm gate is deliberate: automatic filing keeps the system alive when your days are spent in a hospital corridor, and the gate keeps the model from ever reading something no human has seen.
Stack: TypeScript monorepo — Next.js dashboard, Postgres + pg-boss worker, MCP over stdio and HTTP, optional Zilliz / R2 / OpenRouter. Code, architecture docs, and the contribution path for new hospital providers: github.com/geetansh/Casebook. AGPL-3.0 — run it for yourself or your family; run a modified service for others, publish your changes.
All projects