February 2026
- Fixed 3 places where milestone template cascade ignored surgeon overrides
- Updated
get_milestone_interval_medians()RPC with 3-tier cascade
This fix ensures that surgeon-specific template overrides are always respected in analytics calculations, not just during case creation.
- New templates auto-populate with 4 phases and 8 required milestones
- Required items are locked in the template builder (lock icon, removal blocked)
- Grandfather logic: enforcement only on templates containing all required milestones
Existing templates with fewer milestones are not retroactively enforced, preventing disruption to active workflows.
- Replaced
phase_definitionstable with template-based phase boundary resolution - New SQL resolver derives phase boundaries from
milestone_template_items - Added
cases.milestone_template_idcolumn stamped on new cases
- Replaced toggle-based milestone config with template-based model
- 7 new database tables for templates, items, phases, and surgeon overrides
- 3-column drag-and-drop template builder with phase-grouped vertical flow
- Template cascade: surgeon override → procedure template → facility default
- Rewrote 4 core RPCs for template awareness
- Complete rebuild: monolithic page → 6-step sidebar wizard
- Standalone outlier engine with per-surgeon frequency/magnitude sliders
- SSE streaming for real-time generation progress
- Per-day room assignments, 3-tier durations, speed profile scaling
- Rebuilt from 1,555-line monolith to 8 decomposed files
- 5-step wizard with vertical sidebar layout
- Extended
seed_facility_with_templates()RPC with JSONB config for 13+ categories
- Removed
cases.anesthesiologist_idcolumn - Unified all anesthesia tracking through
case_stafftable
All anesthesia providers are now managed through the same
case_staff table as nurses and techs, simplifying the data model and UI.- 5 new admin pages: flag rules, phases, analytics, payers, notifications
- Template-to-facility copy pattern for all template categories
- Complete redesign: 2,026-line monolith → 11 focused components
- SVG quality gauge, case-grouped table, inline scan progress
- Review drawer with milestone timeline editing, impact analysis, resolution actions
- Complete rebuild of financial analytics page
- URL-routed procedure and surgeon detail pages
- Dark hero headers, waterfall charts, sparklines, payer mix
- CSS Grid table layout with inline editing
- Custom rule builder drawer with metric catalog
- Extended flag engine for financial and quality metrics
- Removed @tremor/react dependency, unified on Recharts
- Rebuilt flag analytics and chart components
- Consistent header and breadcrumb pattern across all pages
- Complete redesign of the case detail page
- Phase-grouped milestone timeline with inline editing
- Redesigned case drawer with milestone and financial sections