CNC Trust Medical Institute
End-to-end patient lifecycle in a single Next.js app — registration → invoice → feedback.
CNC Trust Medical Institute is a diagnostics and radiology clinic in Chandigarh. Their operations — patient registration, investigation pricing, invoicing, receipts, financial reconciliation — were scattered across paper and spreadsheets. We built a complete clinic operations platform that handles the full patient lifecycle in one place, with audit trails and soft deletes that make their data trustworthy enough to base business decisions on.
What we built
Patient registration with mobile search, investigation catalog with dynamic pricing, invoice + receipt workflow with discounts and approvals, financial dashboards, expense and clinic-cash ledgers, vendor invoicing, inventory tracking, feedback collection with token-based forms, and dedicated print routes for slips, consent forms, and receipts.
Why it works
Soft deletes preserve historical data without surfacing it. Audit triggers log every insert, update, and delete to a single audit table — so compliance reviews and 'what changed when' questions take seconds, not days. Server-side auth means no flash of unauthenticated content. Operators trust the numbers because the system tells them where every number came from.
How it's built
- 01Postgres trigger-based audit_logs table capturing changed_data, changed_by, and changed_at on every mutation across the system.
- 02Soft-delete patterns on patients, expenses, and registrations (is_deleted/deleted_at) to preserve history while hiding inactive records.
- 03Automated payment-sync triggers keep vendor invoice status in lockstep with expense payments — no manual reconciliation drift.
- 04Server-side Supabase auth in middleware with role hydration before render — no flash of wrong-state content.
- 05~50 RESTful API endpoints with consistent error shapes; Vercel-deployed with Speed Insights.
Replaced spreadsheets and paper with a single source of truth for patient, financial, and inventory data.
Audit-grade data discipline (triggers + soft deletes) without burdening operators with extra steps.
End-to-end coverage: registration → investigation → invoice → receipt → feedback in one Next.js app.
Let's talk for 25 minutes. No pitch.