feat: chatbot CDT lookup — SRP quad, 4-digit auto-prefix, quad field to Selenium

- parseSrpCode: recognize "D4341 UL" / "4341 LR" etc., store quadrant in quad field
- matchOne: auto-prefix D for 4-digit inputs like "0120" → D0120
- LLM prompt: keep SRP code and quadrant together as one procedureName entry
- CdtMatch / CdtResult: add quad field, thread through matchedCodes action data
- claim-form.tsx: include quad in chatbot_claim_prefill type and spread to service line
- selenium_claimSubmitWorker.py: pass quad to fill_service_line, select quadrant
  dropdown by index (UR=1, UL=2, LL=3, LR=4) matching MassHealth form structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-06-11 22:14:50 -04:00
co-authored by Claude Sonnet 4.6
parent 6cfca0d015
commit 831f67b093
9 changed files with 81 additions and 26 deletions
@@ -101,6 +101,8 @@ Rules:
e.g. "composite #29 O", "#8 MO", "composite #11 MOD" — keep the #number and surface letters together as one entry
- For RCT/root canal with a tooth number, preserve the tooth# in the entry:
e.g. "rct #29", "#14 root canal", "rct #6" — keep the #number with the procedure so the correct code can be selected
- For SRP with a quadrant abbreviation (UL, UR, LL, LR), keep the code and quadrant together as one entry:
e.g. "D4341 UL", "4341 LR", "D4342 UR" — the quadrant always travels with the SRP code
- For multiple PA X-rays with tooth numbers, expand each PA into its own entry:
"1 pa, #T" for the first tooth, "2nd pa, #T" for each additional tooth
e.g. "2 PA (#30, 15)" → ["1 pa, #30", "2nd pa, #15"]