Guided tour
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 an Apps Script wrapped around one price list: 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.
- 6 months price, tier, label and price book version saved on every line
- 100% line and branch coverage threshold on the pricing engine
- 14.5 hours live May 8, 2026
- 5 flat, tiered by zone, tiered, range or per surface, one resolver
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
- Price, tier, label and price book version saved on every line
- Estimate revisions snapshot on present
- Append-only audit table, monthly partitioned
Output & quality
- react-pdf patient and clinical variants + ExcelJS
- 100% coverage threshold on the pricing engine
- Snapshot tests on the price book
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, checked by tests in CI. All prices shown here are invented; the real fee schedules are the company's.

