Files
clinicpro/docs/adr/0010-domain-metrics-come-from-tagged-providers.md
T
hamed 2f030edef1 Add dental module phase 4 and phase 5 documentation, including treatment estimates, clinical operations, and preset content
- Introduced phase 4 documentation detailing treatment estimates, data models, state machines, API endpoints, and new dashboard metrics.
- Added phase 5 documentation covering consumables, lab operations, periodontal charts, sterilization cycles, clinical images, and a checklist for professional review.
- Created a preset content document outlining default dental service packages and protocols for clinics.
2026-08-20 16:21:08 +03:30

803 B

Domain-specific dashboard metrics come from tagged providers

DashboardController already serves four role dashboards from 803 lines and fifteen dependencies, so branching each of them on practice domain would double four code paths and make every clinic pay for queries only dentists need. Domain metrics instead come from a DomainMetricProvider interface resolved by a tagged-service registry keyed on the practice domain code — the same shape as TreatmentWorkflow in ADR 0005 — and the role endpoints simply attach whatever the provider returns.

Consequences

Unlike the workflow registry there is no default implementation: a tenant with no domain, or a domain with no provider, gets null and the panel renders no extra section. An empty metrics block is worse than an absent one.