import { type FdiId } from '../tooth-scheme/tooth-data'; import { PERIODONTAL_SITE_ORDER, type PeriodontalSiteId, type PeriodontalMobility, type PeriodontalSite } from '../periodontal-chart-card/periodontal-chart-card'; export type { FdiId, PeriodontalSiteId, PeriodontalMobility, PeriodontalSite }; export { PERIODONTAL_SITE_ORDER }; /** The two probing aspects of a tooth. */ export type PeriodontalSide = 'buccal' | 'lingual'; /** Buccal (facial) probing sites, in display order. */ export declare const PERIODONTAL_BUCCAL_SITES: readonly ["db", "b", "mb"]; /** Lingual (palatal) probing sites, in display order. */ export declare const PERIODONTAL_LINGUAL_SITES: readonly ["dl", "l", "ml"]; /** The three site ids for a given aspect. */ export declare function sitesForSide(side: PeriodontalSide): readonly PeriodontalSiteId[]; /** One probing-site reading. Every field is optional — a blank site. */ export interface PeriodontalSiteState { /** Probing pocket depth (PPD) in millimetres. */ pocketDepthMm?: number; /** * Gingival margin / recession in millimetres. May be negative when the * margin sits coronal to the CEJ (i.e. gingival overgrowth). */ recessionMm?: number; /** Bleeding on probing (BoP) at this site. */ bleeding?: boolean; /** Visible plaque at this site. */ plaque?: boolean; /** Suppuration (pus) at this site. */ suppuration?: boolean; } /** Full editable state for one tooth. */ export interface PeriodontalToothState { /** Tooth is absent — hides its probing inputs. */ missing?: boolean; /** Tooth is an implant. */ implant?: boolean; /** Miller mobility grade (0–3). */ mobility?: PeriodontalMobility; /** Free-text clinical note. Treated as PHI — never exposed to agents. */ note?: string; /** Per-site probing readings, keyed by site id. */ sites?: Partial>; /** * Furcation involvement per aspect. The array length matches the number * of anatomical furcation entry points for the tooth on that aspect (see * {@link PERIODONTAL_FURCATION_MAP}); each boolean flags one entry. */ furcation?: Partial>; } /** The whole-mouth editable value, keyed by FDI tooth number. */ export type PeriodontalChartValue = Record; /** Probing depth (mm) at/above which a site is flagged moderate. */ export declare const MODERATE_POCKET_MM = 4; /** Probing depth (mm) at/above which a site is flagged severe. */ export declare const SEVERE_POCKET_MM = 6; /** Plaque score (% of sites) above which the index reads elevated. */ export declare const PLAQUE_WARN_PERCENT = 20; /** Bleeding score (% of sites) above which the index reads elevated. */ export declare const BLEEDING_WARN_PERCENT = 5; /** Classify a probing depth into a severity band. */ export declare function pocketSeverity(depth: number | undefined, moderate?: number, severe?: number): 'normal' | 'moderate' | 'severe'; export declare const PERIODONTAL_FURCATION_MAP: Record; /** Number of furcation entry points for a tooth on a given aspect (0–2). */ export declare function furcationSlots(fdi: string, side: PeriodontalSide): number; export type PeriodontalDentition = 'permanent' | 'primary'; /** Upper then lower arch, each in clinical left-to-right order. */ export interface PeriodontalArches { upper: FdiId[]; lower: FdiId[]; } /** The 16 permanent teeth of the upper arch (18→11, 21→28). */ export declare const PERIODONTAL_PERMANENT_UPPER: string[]; /** The 16 permanent teeth of the lower arch (48→41, 31→38). */ export declare const PERIODONTAL_PERMANENT_LOWER: string[]; /** The 10 primary teeth of the upper arch. */ export declare const PERIODONTAL_PRIMARY_UPPER: string[]; /** The 10 primary teeth of the lower arch. */ export declare const PERIODONTAL_PRIMARY_LOWER: string[]; /** The upper + lower tooth ids for a dentition, in display order. */ export declare function periodontalArches(dentition: PeriodontalDentition): PeriodontalArches; export type PeriodontalNumbering = 'fdi' | 'universal' | 'palmer'; /** * The visible column label for a tooth. FDI is canonical; Universal (ADA) * and Palmer are label-only projections — the value model always keys by * FDI regardless of the chosen numbering. */ export declare function periodontalToothLabel(fdi: string, numbering: PeriodontalNumbering): string; /** Whole-mouth summary indices derived from a chart value. */ export interface PeriodontalIndices { /** Mean probing depth across scored sites, or null when none scored. */ meanPocketDepthMm: number | null; /** Mean clinical attachment level (PPD + recession), or null. */ meanAttachmentLevelMm: number | null; /** Plaque score as a percentage of scored sites (0–100), or null. */ plaquePercent: number | null; /** Bleeding-on-probing as a percentage of scored sites (0–100), or null. */ bleedingPercent: number | null; /** Number of sites carrying a probing depth (the scored denominator). */ scoredSiteCount: number; /** Number of scored sites at/above the severe threshold. */ deepPocketCount: number; } /** * Derive the whole-mouth indices. A site is "scored" when it carries a * probing depth; percentages are taken over scored sites. Missing teeth * are skipped entirely. */ export declare function computePeriodontalIndices(value: PeriodontalChartValue): PeriodontalIndices; /** Structural status worth narrating for a tooth. */ export type PeriodontalToothStatus = 'present' | 'missing' | 'implant'; /** One flagged probing site within a tooth finding. */ export interface PeriodontalSiteFinding { site: PeriodontalSiteId; pocketDepthMm: number; severity: 'moderate' | 'severe'; } /** A single tooth's notable findings — one narratable problem-list entry. */ export interface PeriodontalToothFinding { /** FDI tooth id. */ fdi: string; /** Structural status. `'present'` teeth appear only when they carry a finding. */ status: PeriodontalToothStatus; /** Worst severity band across the tooth's scored sites. */ severity: 'normal' | 'moderate' | 'severe'; /** Deepest probing depth on the tooth (mm), or null when unscored. */ maxPocketDepthMm: number | null; /** Sites at/above the moderate threshold, deepest first. */ pockets: PeriodontalSiteFinding[]; /** Sites bleeding on probing. */ bleedingSites: PeriodontalSiteId[]; /** Sites with visible plaque. */ plaqueSites: PeriodontalSiteId[]; /** Sites with suppuration. */ suppurationSites: PeriodontalSiteId[]; /** Greatest *positive* recession on the tooth (mm); ≤ 0 values ignored. Null when none. */ maxRecessionMm: number | null; /** Miller mobility grade when ≥ 1, else null. */ mobility: PeriodontalMobility | null; /** Aspects with any furcation involvement flagged. */ furcation: PeriodontalSide[]; } /** * Derive the narratable per-tooth problem list from a chart value. A tooth is * included only when it carries a notable finding — missing, implant, a pocket * at/above the moderate threshold, bleeding, suppuration, mobility ≥ 1, or * furcation involvement. Entries are returned in clinical (arch) order; each * tooth's `pockets` are ordered deepest first. Plaque and shallow recession are * reported as detail on already-flagged teeth but never flag a tooth alone. */ export declare function computePeriodontalFindings(value: PeriodontalChartValue, options?: { moderate?: number; severe?: number; }): PeriodontalToothFinding[]; /** An empty chart with every tooth present but unscored. */ export declare function emptyPeriodontalChart(dentition?: PeriodontalDentition): PeriodontalChartValue; /** * Flatten a chart value into the display-only card's `PeriodontalSite[]` * so a captured chart can be handed straight to `PeriodontalChartCard`. */ export declare function toPeriodontalSiteList(value: PeriodontalChartValue): PeriodontalSite[]; /** Per-tooth mobility map (FDI → grade) for handing to the card. */ export declare function toMobilityMap(value: PeriodontalChartValue): Record; //# sourceMappingURL=periodontal-chart-data.d.ts.map