Back to home

Rewriting a 26-year-old dental practice OS

Full migration off a legacy Centura/Gupta SQLBase system to a modern stack. ~36K patients and ~102K visits moved cleanly. Live in production, used daily by doctors, billing, and ops.

Next.js 16
TypeScript
Prisma
SQLite
Bun
Clinic front-desk dashboard with today's appointments, collections, outstanding dues, and pending payments
Click to zoom
Clinical examination page showing interactive dental chart, per-tooth findings, clinical notes, and treatment status sidebar
Click to zoom
Daily appointment schedule with room-based columns, patient context, and status tracking
Click to zoom
Patient detail view with active treatment chain, multi-step plan progress, and balance tracking
Click to zoom
Bills report with payment mode summary and detailed receipt list by date
Click to zoom

The Challenge

Secunderabad Dental Hospital had been running its practice on a custom OS for 26 years — built on Centura/Gupta SQLBase, a stack from the mid-1990s. It worked, until it didn't: the database was hard to back up, the UI was unmaintainable, the original developer was no longer available, and the schema had grown organically through a quarter-century of clinical workflow changes.

The team needed a full rewrite without losing a single patient record. The problems they wanted solved on top of the migration:

  • A modern, maintainable codebase a small team can keep alive for the next decade
  • Clean migration of ~36K patient records and ~102K historical visits with zero data loss
  • A unified front-desk view: appointments, patient records, revenue, and doctor schedules in one interface
  • Reliable operation on clinic hardware and unreliable internet, with sensible offline behavior

Off-the-shelf hospital software exists, but it is built for large institutions, priced for Western markets, and would have meant abandoning 26 years of clinical history. The hospital needed a purpose-built rewrite that respected the workflow they had spent decades refining.

The Solution

We built Clinic—a practice management system tailored to the daily rhythm of a dental hospital. One interface unifies appointments, patient records, revenue, and doctor schedules, replacing the stack of paper registers with a single source of truth the whole team can trust.

Key Features

Appointment Booking

Front desk books, reschedules, and cancels appointments from a calendar view. Conflicts are caught before they happen, not after a patient walks in.

Patient Records

A complete treatment history for every patient, searchable by name or phone number and accessible in seconds from any workstation in the clinic.

Revenue Tracking

Payments are logged at the point of sale and automatically roll up into daily, weekly, and monthly revenue reports—no more end-of-day manual reconciliation.

Doctor Schedules

A single shared schedule for every doctor on staff, so the front desk always knows who is available and patients are routed to the right practitioner.

Role-Based Access

Front desk, doctors, and administrators each see the views and actions relevant to their role, keeping the interface simple and patient data properly scoped.

Built for Low Bandwidth

Server components and a lean Bun runtime keep page loads fast even on unreliable clinic internet, so the system never slows the team down during a busy day.

How a Day at the Clinic Runs

1

Front desk books the appointment: A patient calls in, the receptionist finds an open slot with the right doctor, and the appointment is logged against the patient's record in seconds.

2

Patient arrives, records are pulled: On check-in, the front desk opens the full treatment history and hands it to the attending doctor—no paper file hunt.

3

Doctor logs the treatment: Procedures, notes, and follow-ups are recorded directly against the patient, building a continuous history across every visit.

4

Revenue is captured automatically: Payment at the front desk flows straight into the day's revenue totals, and the administrator sees the numbers update live.

The Outcome

36K
Patients migrated
Off the 26-year-old legacy system
102K
Visits migrated
Full clinical history preserved
Live
Used daily in production
Doctors, billing, ops · weekly product calls

The new Clinic is the operating system for the practice:

  • Every historical patient record from the legacy SQLBase database is searchable in the new system
  • The front desk books and tracks every appointment through one calendar
  • Doctors walk into every visit with the patient's full history already on screen
  • Itamih runs weekly product calls with the hospital team to keep the system evolving with the practice

Technical Implementation

Architecture

Frontend
  • • Next.js App Router with TypeScript end to end
  • • Server components by default for fast first loads on clinic hardware
  • • Tailwind CSS for a consistent, easily maintained UI
  • • Role-aware layouts for front desk, doctors, and administrators
Backend
  • • Bun runtime for fast startup and a lean deployment footprint
  • • Prisma ORM with a strongly typed schema for patients, appointments, treatments, and payments
  • • SQLite for simple, reliable on-prem storage that the clinic team can back up themselves
  • • Server actions for mutations, keeping the client bundle small
Legacy Migration
  • • ETL pipeline from Centura/Gupta SQLBase into the new Prisma schema
  • • ~36K patients and ~102K visits migrated with full clinical history preserved
  • • Reconciliation reports run against the legacy database to verify zero data loss
  • • Cutover staged so the hospital could fall back to the old system if anything broke
Key Design Decisions
  • Migrate, don't replace: 26 years of clinical history was the most valuable asset on the table — the rewrite had to preserve it, not start over
  • Low-bandwidth friendly: Server rendering and minimal client JavaScript keep the app responsive on unreliable clinic internet
  • SQLite over Postgres: Removes operational overhead for the on-site team; backups are a file copy
  • Single source of truth: Appointments, records, and revenue all live in one database, so no team ever has to reconcile across systems

Need a custom operations system for your business?

Whether it's a clinic, a storefront, or a back office—we build tools that fit how your team actually works, and hand them off cleanly when they're ready to run on their own.

Start Your Project