React Advanced Odontogram - v2.2.1
    Preparing search index...

    Function surfaceLabelKey

    • Maps a caries surface identifier to its existing i18n surface-label key, so the popup header can read e.g. "Caries details – Buccal". Falls back to the raw surface string for any (unexpected) unmapped value.

      SP6 Task 4 (§8): when toothNo is given and is an anterior tooth (incisor/canine), the "occlusal" surface DISPLAYS as "incisal" (surface.incisal) instead of surface.occlusal — the stored surface value is unaffected, this only changes which i18n key the label resolves to.

      SP16 Task 2: extended to be arch/anterior-aware for ALL of occlusal/buccal/lingual, gated on the surfaceNotation setting. In "full" mode (default): occlusal -> incisal (anterior), buccal -> labial (anterior), lingual -> palatal (upper) / lingual (lower, a NEW key separate from the combined surface.lingualPalatal). In "simple" mode the generic, tooth-independent keys are always used (buccal/occlusal/lingualPalatal). Exported so it can be unit-tested directly.

      Parameters

      • surface: string
      • OptionaltoothNo: number

      Returns string