feat: AI chat scheduling, claim automation, and session improvements
- Internal AI chat: schedule_appointment intent books earliest available slot in Column A using office hours; claim_only intent looks up latest past appointment for service date, asks user when two appointments are within 7 days, auto-triggers correct Selenium worker with mapped prices - Gemini model updated to gemini-flash-latest; conversation history (15 messages) passed for pronoun/reference resolution; history trimmed to start with user turn so Gemini doesn't reject the context - Insurance alias file (insuranceAliases.json) replaces hardcoded siteKey matching; "tufs" now resolves to TUFTS_SCO - DOB format normalized (MM/DD/YYYY → YYYY-MM-DD) before parseLocalDate; autoCheck now fires for all insurance types, not just MH/CMSP - Claim form auto-submit: all handlers (MH, CCA, DDMA, UnitedDH, Tufts) accept formToUse and receive fee-schedule-priced form; prefillDone set after chatbot code prefill so autoSubmit gate opens correctly - Chatbot: chat history persisted in sessionStorage, cleared on logout and auto-logout; Clear button writes fresh state synchronously; message history window increased to 15 - DentaQuest/TuftsSCO Selenium: "Remember me" checkbox clicked before sign-in to persist OTP trust cookie across sessions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
apps/Backend/src/data/insuranceAliases.json
Normal file
32
apps/Backend/src/data/insuranceAliases.json
Normal file
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{ "keyword": "masshealth", "siteKey": "MH" },
|
||||
{ "keyword": "mass health", "siteKey": "MH" },
|
||||
{ "keyword": "mh", "siteKey": "MH" },
|
||||
|
||||
{ "keyword": "commonwealth care alliance", "siteKey": "CCA" },
|
||||
{ "keyword": "cca", "siteKey": "CCA" },
|
||||
|
||||
{ "keyword": "delta dental of massachusetts","siteKey": "DDMA" },
|
||||
{ "keyword": "delta dental ma", "siteKey": "DDMA" },
|
||||
{ "keyword": "ddma", "siteKey": "DDMA" },
|
||||
|
||||
{ "keyword": "delta dental ins", "siteKey": "DELTA_INS" },
|
||||
{ "keyword": "delta ins", "siteKey": "DELTA_INS" },
|
||||
{ "keyword": "delta dental", "siteKey": "DELTA_INS" },
|
||||
|
||||
{ "keyword": "tufts sco", "siteKey": "TUFTS_SCO" },
|
||||
{ "keyword": "tufts", "siteKey": "TUFTS_SCO" },
|
||||
{ "keyword": "tufs", "siteKey": "TUFTS_SCO" },
|
||||
{ "keyword": "dentaquest", "siteKey": "TUFTS_SCO" },
|
||||
{ "keyword": "tuftssco", "siteKey": "TUFTS_SCO" },
|
||||
|
||||
{ "keyword": "united healthone sco", "siteKey": "UNITED_SCO" },
|
||||
{ "keyword": "united sco", "siteKey": "UNITED_SCO" },
|
||||
{ "keyword": "dentalhub", "siteKey": "UNITED_SCO" },
|
||||
{ "keyword": "united_sco", "siteKey": "UNITED_SCO" },
|
||||
|
||||
{ "keyword": "blue cross blue shield", "siteKey": "BCBS_MA" },
|
||||
{ "keyword": "bcbs ma", "siteKey": "BCBS_MA" },
|
||||
{ "keyword": "blue cross", "siteKey": "BCBS_MA" },
|
||||
{ "keyword": "bcbs", "siteKey": "BCBS_MA" }
|
||||
]
|
||||
Reference in New Issue
Block a user