Live demo
Treatment Estimator. Estimates built live in the consult, with prices that never move.
A treatment coordinator builds multi-option estimates live during the consult, clicking teeth on a chart and dragging treatments onto option cards while prices compute from that clinic's own versioned price book. Every saved line freezes its price at capture, so the document a patient signs is still reproducible six months later.
Walk through it, six steps
Start from the doctor's handoff
The doctor finishes the exam: upper full-arch, lower conventional, show both a fixed and a removable option. The coordinator picks the patient, sets the arch scope, selects the consulting doctors, and gets a draft estimate while the patient is still in the chair.
- Upper + Lower
- Dr. Sam Placeholder ★ primary
- EST-100377 · Draft · Revision 1
- Northside Clinic (Demo)
The problem.
The old tool was a 10-year-old script wrapped around one spreadsheet: a rigid 14-step questionnaire that could not express a real consult, where treatments get added in minute 20 and dropped in minute 25. Coordinators hand-checked the math, and a price change silently rewrote history on past estimates.
- DB property write-once capture columns, trigger-enforced
- 100% line and branch coverage is a CI gate
- 316 incl. 11 golden fixtures from the legacy tool
- 3 weeks v1 to production, ~77 PRs over 3.5 months
How it fits together.
Frontend
- Next.js App Router, server components for reads
- Zustand workspace store + TanStack Query
- Debounced live pricing preview (~200 ms)
Pricing core
- Shared procedure catalog: zones, tooth maps, caps
- Per-location immutable price book versions
- One resolver, five pricing models, resettable tier counters
Integrity
- Write-once *_at_capture columns, trigger-enforced
- Estimate revisions snapshot on present
- Append-only audit table, monthly partitioned
Output & quality
- react-pdf patient and clinical variants + ExcelJS
- 100% pricing coverage gate · property-based invariants
- 11 golden fixtures replayed from the legacy tool
Where it landed.
Coordinators build estimates the way consults actually flow instead of fighting a 14-step form, and the math stopped being anyone's job to double-check: lines must sum to subtotals, caps can never be exceeded, and every line carries the price book version that produced it, invariants enforced by property-based tests in CI and triggers in the database. All prices shown here are invented; the real fee schedules are the company's.
