From a99aa32463f10a04d19f71a8f62ca22ccc5dc522 Mon Sep 17 00:00:00 2001 From: Gitead Date: Sun, 22 Nov 2026 22:07:23 -0500 Subject: [PATCH] feat: chat member ID/DOB eligibility defaults to DDMA, MassHealth moved to end of insurance dropdown Co-Authored-By: Claude Opus 5.5 --- apps/Backend/src/ai/internal-chat-workflow.ts | 10 +++++----- apps/Frontend/src/components/layout/chatbot.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/Backend/src/ai/internal-chat-workflow.ts b/apps/Backend/src/ai/internal-chat-workflow.ts index c183ac3a..cbe81a28 100644 --- a/apps/Backend/src/ai/internal-chat-workflow.ts +++ b/apps/Backend/src/ai/internal-chat-workflow.ts @@ -462,11 +462,11 @@ async function handleEligibilityById( }; } - // Determine siteKey (defaults to MassHealth when no payer is specified) - const siteKey = resolveSiteKey( - patient?.insuranceProvider ?? null, - c.insuranceHint ?? null - ); + // Determine siteKey (defaults to DDMA when no payer is specified) + const siteKey = + patient?.insuranceProvider || c.insuranceHint + ? resolveSiteKey(patient?.insuranceProvider ?? null, c.insuranceHint ?? null) + : "DDMA"; const label = patient ? `${patient.firstName ?? ""} ${patient.lastName ?? ""}`.trim() diff --git a/apps/Frontend/src/components/layout/chatbot.tsx b/apps/Frontend/src/components/layout/chatbot.tsx index 0a5e27cc..e93b0d26 100644 --- a/apps/Frontend/src/components/layout/chatbot.tsx +++ b/apps/Frontend/src/components/layout/chatbot.tsx @@ -134,7 +134,6 @@ function mdyToISO(mdy: string): string { } const INSURANCE_TYPE_OPTIONS: { value: string; label: string }[] = [ - { value: "mh", label: "MassHealth" }, { value: "ddma", label: "DDMA" }, { value: "ddwa", label: "Delta WA" }, { value: "delta-ins", label: "Deltains" }, @@ -146,6 +145,7 @@ const INSURANCE_TYPE_OPTIONS: { value: string; label: string }[] = [ { value: "bcbs-ma", label: "BCBS MA" }, { value: "metlife", label: "MetLife" }, { value: "altus", label: "Altus" }, + { value: "mh", label: "MassHealth" }, ]; function getAutoCheck(_dobISO: string): "mh" {