Overview
The jQuery Odontogram plugin uses numeric constants to represent different dental treatments and conditions. These constants are defined globally injquery.odontogram.js (lines 1-35) and are used with the setMode() method.
Using Treatment Modes
Treatment Mode Constants
Control Modes
Default mode - No actionValue:
0Description: Do nothing when clicking on teeth. Used to deselect active modes.Delete modeValue: Visual: Red semi-transparent overlay with X mark
100Symbol: ❌ (Red X overlay)Description: Remove treatments from clicked surfaces or teeth.Surface Treatments (Applied to Individual Surfaces)
Amalgam FillingValue:
1Symbol: /ADescription: Amalgam filling (tambalan amalgam). Displays /A symbol on surface.Color: Layer-based (Red for pre-existing, Blue for required)Composite Filling / ObturaciónValue:
2Symbol: /ObDescription: Composite filling. Displays /Ob symbol on surface.Color: Layer-based (Red/Blue)Pit and Fissure SealantValue:
3Symbol: Purple fillDescription: Pit and fissure sealant. Fills surface with purple color (#ed3bed).Treatable CariesValue: Note: This is a pathology - does NOT use layer colors
10Symbol: Blue fillDescription: Treatable caries. Fills surface with blue (#6896ecff).Untreatable CariesValue: Note: This is a pathology - does NOT use layer colors
27Symbol: Yellow/amber fillDescription: Untreatable caries (intratables). Fills surface with amber (#FFC107).Sellante (Sealant)Value:
28Symbol: /SDescription: Sealant. Displays /S symbol on surface.Color: Layer-based (Red/Blue)Incrustación (Inlay)Value:
29Symbol: IDescription: Inlay. Displays I symbol on surface.Color: Layer-based (Red/Blue)Restauración (Restoration)Value: Note: Always red in visual, regardless of layer
31Symbol: Red fillDescription: Restoration. Fills surface with red (#dc3545).Restauración Filtrada (Filtered Restoration)Value:
32Symbol: /RfDescription: Filtered restoration. Displays /Rf symbol on surface.Color: Layer-based (Red/Blue)Surco Profundo (Deep Groove)Value:
4Symbol: /SpDescription: Deep groove (surco profundo). Displays /Sp symbol on surface.Color: Layer-based (Red/Blue)Whole Tooth Treatments
Root Canal TreatmentValue:
5Symbol: ▼ (filled triangle below tooth)Description: Root canal treatment (perawatan saluran akar). Displays filled triangle.Color: Layer-based (Red/Blue)Tooth Absent (Unknown)Value:
6Symbol: /S in centerDescription: Tooth not present, unknown if it ever existed.UneruptedValue: Note: Always blue in visual
7Symbol: Blue XDescription: Unerupted tooth. Displays X mark in blue (#0066FF).Periodontitis / ParadentosisValue:
8Symbol: PdDescription: Periodontitis. Displays Pd text.Color: Layer-based (Red/Blue)AnomalyValue:
9Symbol: ANO textDescription: Tooth anomaly (peg-shaped, microdontia, fusion, etc.). Displays “ANO”.Fracture / Extraction IndicatedValue:
11Symbol: =Description: Fractured tooth or indicated for extraction. Displays = in center.Color: Layer-based (Red/Blue)Full Metal Crown / Removable ProsthesisValue:
12Symbol: □ (square border)Description: Full metal crown or removable prosthesis. Draws thick square border.Color: Layer-based (Red/Blue)Porcelain CrownValue:
13Symbol: ○ (circle)Description: Porcelain crown. Draws circle in tooth center.Color: Layer-based (Red/Blue)Root RemnantValue:
14Symbol: Angled linesDescription: Root remnant (sisa akar). Draws angled lines.Missing ToothValue: Note: Always red in visual
15Symbol: Red XDescription: Missing tooth. Displays X mark in red (#FF0000).ImplantValue:
16Symbol: IMDescription: Implant with porcelain crown. Displays “IM” text.Color: Layer-based (Red/Blue)Partial/Full Denture (Pivot)Value:
17Symbol: PDescription: Partial or full denture. Displays “P” text.Color: Layer-based (Red/Blue)BridgeValue: Usage: Click first tooth, then click second tooth to create bridge
18Symbol: Π (connected line between teeth)Description: Dental bridge connecting multiple teeth. Draws connecting lines.Color: Layer-based (Red/Blue)OrthodonticsValue:
30Symbol: ~Description: Orthodontic treatment. Displays ~ symbol on top/bottom surfaces.Color: Layer-based (Red/Blue)Arrow Indicators
Top-Left ArrowValue:
19Symbol: ← (arrow pointing left above tooth)Top-Right ArrowValue:
20Symbol: → (arrow pointing right above tooth)Top-Turn-Left ArrowValue:
21Symbol: ↰ (curved arrow turning left above tooth)Top-Turn-Right ArrowValue:
22Symbol: ↱ (curved arrow turning right above tooth)Bottom-Left ArrowValue:
23Symbol: ← (arrow pointing left below tooth)Bottom-Right ArrowValue:
24Symbol: → (arrow pointing right below tooth)Bottom-Turn-Left ArrowValue:
25Symbol: ↲ (curved arrow turning left below tooth)Bottom-Turn-Right ArrowValue:
26Symbol: ↳ (curved arrow turning right below tooth)Layer Color System
Most treatments support a dual-layer color system:Treatments Using Layer Colors
These treatments change color based on the current annotation layer:- AMF, COF, SIL, INC, REF, NVT
- RCT, POC, FMC, IPX, FRM_ACR, CFR
- BRIDGE, ORT, PRE
Treatments With Fixed Colors (Pathologies)
These treatments maintain their original colors regardless of layer:- CARIES: Blue (#6896ecff)
- CARIES_UNTREATABLE: Amber (#FFC107)
- RES: Red (#dc3545)
- MIS: Red (#FF0000)
- UNE: Blue (#0066FF)
- FIS: Purple (#ed3bed)
Usage Example
Fromindex.html:32-114 and dental-app.js:883-892:
Quick Reference Table
| Constant | Value | Symbol | Color | Category |
|---|---|---|---|---|
ODONTOGRAM_MODE_DEFAULT | 0 | - | - | Control |
ODONTOGRAM_MODE_HAPUS | 100 | ❌ | Red | Control |
ODONTOGRAM_MODE_AMF | 1 | /A | Layer | Surface |
ODONTOGRAM_MODE_COF | 2 | /Ob | Layer | Surface |
ODONTOGRAM_MODE_FIS | 3 | Fill | Purple | Surface |
ODONTOGRAM_MODE_CARIES | 10 | Fill | Blue | Surface |
ODONTOGRAM_MODE_CARIES_UNTREATABLE | 27 | Fill | Amber | Surface |
ODONTOGRAM_MODE_SIL | 28 | /S | Layer | Surface |
ODONTOGRAM_MODE_INC | 29 | I | Layer | Surface |
ODONTOGRAM_MODE_RES | 31 | Fill | Red | Surface |
ODONTOGRAM_MODE_REF | 32 | /Rf | Layer | Surface |
ODONTOGRAM_MODE_NVT | 4 | /Sp | Layer | Surface |
ODONTOGRAM_MODE_RCT | 5 | ▼ | Layer | Whole |
ODONTOGRAM_MODE_UNE | 7 | X | Blue | Whole |
ODONTOGRAM_MODE_PRE | 8 | Pd | Layer | Whole |
ODONTOGRAM_MODE_CFR | 11 | = | Layer | Whole |
ODONTOGRAM_MODE_FMC | 12 | □ | Layer | Whole |
ODONTOGRAM_MODE_POC | 13 | ○ | Layer | Whole |
ODONTOGRAM_MODE_MIS | 15 | X | Red | Whole |
ODONTOGRAM_MODE_IPX | 16 | IM | Layer | Whole |
ODONTOGRAM_MODE_FRM_ACR | 17 | P | Layer | Whole |
ODONTOGRAM_MODE_BRIDGE | 18 | Π | Layer | Whole |
ODONTOGRAM_MODE_ORT | 30 | ~ | Layer | Whole |
Next Steps
Plugin Overview
Learn about the plugin architecture
Methods
Explore available plugin methods