/** * Input model for the Dental Chart SHA-256 extension codec. * Full 32-tooth adult periodontal and restorative dental examination findings * using Universal Numbering (1..32); decoder emits Universal, ISO 3950 FDI, * and SNOMED CT tooth structure codings. */ export type ToothStatus = "present" | "missing" | "implant" | "unerupted" | "root-tip"; /** 5 tooth surfaces: M (mesial), O (occlusal/incisal), D (distal), B (buccal/facial), L (lingual/palatal). */ export type Surface = "M" | "O" | "D" | "B" | "L"; export type RestorativeKind = | "amalgam" | "composite" | "crown" | "veneer" | "pontic" | "root-canal" | "sealant"; export interface ToothRestoration { kind: RestorativeKind; /** Optional non-empty subset of tooth surfaces (canonical order: M, O, D, B, L). */ surfaces?: Surface[]; } export interface ToothFinding { /** Universal tooth number 1..32 (1=UR 3rd molar .. 16=UL 3rd molar, 17=LL 3rd molar .. 32=LR 3rd molar). */ tooth: number; status: ToothStatus; /** 6-site probing depths in whole mm [MB, B, DB, ML, L, DL] (0..15 mm). Present when tooth is present or implant. */ probingMm?: [number, number, number, number, number, number]; /** 6-site gingival margin in mm (-10..+10; negative = recession, positive = hyperplasia). Optional. */ marginMm?: [number, number, number, number, number, number]; /** 6-site bleeding on probing booleans [MB, B, DB, ML, L, DL]. Optional. */ bop?: [boolean, boolean, boolean, boolean, boolean, boolean]; /** Mobility grade 0..3 (Miller). */ mobility?: 0 | 1 | 2 | 3; /** Furcation grade 0..3 (molars/premolars). */ furcation?: 0 | 1 | 2 | 3; /** Active caries surfaces, if any (non-empty subset of M, O, D, B, L). */ caries?: Surface[]; /** Existing restorations / endodontic treatment on this tooth (up to 6 entries). */ restorations?: ToothRestoration[]; } export interface DentalChart { patient: { family?: string; given?: string[]; birthDate?: string }; provider?: { name: string }; /** Examination date in ISO YYYY-MM-DD (2000-01-01..2099-12-31). */ examDate: string; /** Up to 32 teeth (omitted teeth are not charted). */ teeth: ToothFinding[]; /** Optional clinical summary note (<= 128 UTF-8 bytes). */ note?: string; } export interface PeriodontalSummary { teethPresent: number; teethMissing: number; teethImplants: number; sitesProbed: number; bopSites: number; bopEvaluatedSites: number; /** Bleeding on probing percentage rounded to 1 decimal place (e.g. 2.4). */ bopPercent: number; sitesGe4mm: number; sitesGe6mm: number; maxProbingDepthMm: number; activeCariesTeeth: number; }