feat: teach AI classifier to recognize "comp" and tooth surface notation
Add "comp" as alias for composite in CDT lookup. Update classifier prompt with explicit examples for "claim comp #8 ml for lisa today" and dental surface letter definitions (M/D/L/F/B/O/V/I) so the LLM correctly treats #tooth+surfaces as composite fillings, not insurance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,7 @@ const ALIAS_MAP: Record<string, string> = {
|
||||
// Fillings / restorations
|
||||
"filling": "resin",
|
||||
"composite": "resin",
|
||||
"comp": "resin",
|
||||
"amalgam": "amalgam",
|
||||
"core buildup": "core buildup",
|
||||
"core bu": "core buildup",
|
||||
|
||||
@@ -114,6 +114,9 @@ Intents:
|
||||
e.g. "claim D0120 and D1110 for John Smith today"
|
||||
e.g. "bill adult cleaning for Maria on 05/15/2026"
|
||||
e.g. "claim perio exam, 2BW for John Smith"
|
||||
e.g. "claim #8 ml for lisa" → procedureNames: ["#8 ml"], patientName: "lisa" (tooth+surface = composite filling, NOT insurance)
|
||||
e.g. "claim comp #8 ml for lisa today" → procedureNames: ["comp #8 ml"], patientName: "lisa", appointmentDate: today
|
||||
"comp" is short for "composite" — when followed by #tooth+surfaces, it is a composite filling
|
||||
Use this when no eligibility check is requested — just billing/claiming services
|
||||
Always extract appointmentDate when a date or "today" is mentioned
|
||||
- preauth : submit a pre-authorization request for procedures
|
||||
@@ -137,8 +140,14 @@ Rules:
|
||||
do NOT include it in procedureNames. It refers to a file attachment, not a billable procedure.
|
||||
Only include actual clinical procedures in procedureNames.
|
||||
- For composite fillings with a tooth number, preserve the EXACT notation including tooth# and surfaces:
|
||||
e.g. "composite #29 O", "#8 MO", "composite #11 MOD", "# 10 DL", "# 11 ML" — keep the #number and surface letters together as one entry
|
||||
Note: "# 10 DL" and "composite on # 10 DL" are the same — preserve the space-after-# as-is
|
||||
e.g. "composite #29 O", "#8 MO", "composite #11 MOD", "# 10 DL", "# 11 ML", "#8 ml", "comp #8 ml" — keep the #number and surface letters together as one entry
|
||||
Note: "comp" is short for "composite". "# 10 DL", "composite on # 10 DL", and "comp # 10 DL" are all the same — preserve the space-after-# as-is
|
||||
IMPORTANT: Any letter(s) immediately after a tooth number are DENTAL SURFACE abbreviations indicating a composite filling:
|
||||
M = Mesial, D = Distal, L = Lingual, F = Facial, B = Buccal, O = Occlusal, V = Vestibular, I = Incisal
|
||||
e.g. "#8 ML" → composite on tooth 8, mesial+lingual surfaces (NOT an insurance abbreviation)
|
||||
e.g. "#14 MOD" → composite on tooth 14, mesial+occlusal+distal surfaces
|
||||
e.g. "#5 F" → composite on tooth 5, facial surface
|
||||
Whenever you see #[tooth number] followed by any combination of M/D/L/F/B/O/V/I, it is ALWAYS a composite filling surface notation
|
||||
- #number always means a TOOTH number (never a case or pre-auth reference). When a single #number appears before a comma-separated list of procedures, apply it to EVERY procedure in the list.
|
||||
e.g. "#20 rct, post, crown" → ["#20 rct", "#20 post", "#20 crown"]
|
||||
e.g. "preauth #20 rct, pos, crown" → ["#20 rct", "#20 pos", "#20 crown"]
|
||||
|
||||
Reference in New Issue
Block a user