DentalChart
<co-dental-chart>DentalChart draws all 32 adult teeth in universal numbering with five surfaces each, marks caries, restorations, crowns, root canals, implants and missing teeth, and lists the phased treatment plan with fees.
import { DentalChart } from 'health-components';
Examples
New Patient Read Only
Usage
<DentalChart teeth={{ 3: { surfaces: { O: "caries", M: "caries" } }, 19: { whole: "rct" } }} plan={[{ phase: 1, tooth: 3, surface: "MO", cdt: "D2392", desc: "Resin composite, 2 surfaces, posterior", status: "planned", fee: 245, insurance: 196 }]} />
When to use
- Dental exam, hygiene recall and treatment planning visits.
- Showing the patient what is planned and what it costs before a pre-treatment estimate.
When not to use
- Periodontal pocket depths: a perio chart.
- Primary (child) teeth A to T: this card charts permanent teeth 1 to 32 only.
Variants and states
| Variant | What it is |
|---|---|
| surface conditions | Caries (danger fill), existing restoration (primary fill), sealant (success), planned work (dashed warning outline). |
| whole tooth | Crown (purple ring), root canal (red root and dot), implant, missing (cross), planned extraction (dashed cross), bridge pontic, impacted. |
| selected tooth | Click a tooth: it highlights and a panel lists its findings and planned procedures. |
| treatment plan | Phase, tooth, surface, CDT code, status, fee, estimated insurance and patient portion, with open totals. |
| empty plan | EmptyState when nothing is planned. |
| readOnly | Hides the add actions. |
Clinical values
Every number goes through the shared clinical value rules (CareOS.fmt and ClinicalValue from the clinical-values card): tabular digits, the unit always shown, a fixed precision per measure, the reference range in the tooltip, and H, L or critical flags. Medication amounts follow the ISMP dose style through fmt.doseNumber: rounded to the stated precision, then shown with no trailing zero (5 mg, never 5.0 mg) and a leading zero (0.5 mL). The specialty measures this card adds sit in CareOS.specialty.MEAS with their precision: fees in US dollars to the cent. Ranges in the previews are sample values for the design system, not clinical guidance; a real deployment passes its own.
Accessibility
- Each tooth is a button whose name lists the tooth, its type and every finding, so the chart reads without the colours.
- Surfaces are drawn facing the patient; mesial flips side at the midline so the drawing matches the mouth.
- The plan is a real table with a caption.
Do and don't
- Do: Show both arches with the patient right on the left of the screen.
- Do: Say that insurance amounts are estimates.
- Don't: Rely on colour alone: the legend and the tooth names carry the meaning.
- Don't: Mix universal and FDI numbering on one screen.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
teeth | Readonly<Record<number, ToothRecord>> | {} | Record<tooth number 1-32, ToothRecord> |
plan | ReadonlyArray<DentalPlanItem> | [] | Treatment plan rows |
selected | number | none | Tooth selected first (uncontrolled) |
selectedTooth | number | null | uncontrolled | Selected tooth (controlled); null for none |
onSelectedChange | (tooth: number | null) => void | none | Called with the tooth number, or null when the selection is cleared |
title | string | 'Dental chart' | Card title |
subtitle | string | 'Universal numbering . viewed facing the patient' | Line under the title |
readOnly | boolean | false | Hides the Perio Chart and Add Procedure actions |
onPerioChart | () => void | none | Perio Chart action |
onAddProcedure | () => void | none | Add Procedure action |
rangeContext | RangeContextId | the global context, else 'outpatient' | Which shared reference range flags use; the lab range on a result still wins |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-dental-chart>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
<co-dental-chart selected="…" selected-tooth="…" [teeth]="teeth" (co-selected-change)="onSelectedChange($event.detail)"></co-dental-chart>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | teeth | Record<tooth number 1-32, ToothRecord>; default {} |
| property / JSON attribute | plan | Treatment plan rows; default [] |
| attribute | selected | Tooth selected first (uncontrolled); default none |
| attribute | selected-tooth / selectedTooth | Selected tooth (controlled); null for none; default uncontrolled |
| attribute | title | Card title; default 'Dental chart' |
| attribute | subtitle | Line under the title; default 'Universal numbering . viewed facing the patient' |
| attribute | read-only / readOnly | Hides the Perio Chart and Add Procedure actions; default false |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-selected-change | Called with the tooth number, or null when the selection is cleared; default none (React: onSelectedChange) |
| event | co-perio-chart | Perio Chart action; default none (React: onPerioChart) |
| event | co-add-procedure | Add Procedure action; default none (React: onAddProcedure) |