feat: Delta Indiv eligibility on coversme portal and ADA paper claim/preauth

Eligibility: rebuilt the Delta Indiv worker for my.deltadentalcoversme.com —
Dentist tab -> Universal Delta Sign In -> username/Next -> password -> SIGN IN,
confirmation-code (MFA) page detected by URL so the app's OTP popup shows,
then Search for Patient -> Last Name + DOB -> Submit. On the "Benefits for"
details page it reads the patient name, Subscriber # and Eligible through
(active while that date is today or later) and saves the PDF downloaded by
the Print link. Session persists: login is skipped while Search for Patient
is reachable, and Delta Indiv cookies are no longer wiped on agent startup.
The button needs Last Name + DOB (member ID optional; backend falls back to
the scraped Subscriber #). Chatbot gains a Delta Indiv option and aliases.

Claims: Delta Indiv uses the same 2024 ADA form as BCBS with the payer
address Delta Dental, P.O. Box 103, Stevens Point, WI 54481-0103. Adds Delta
Indiv Claim/PreAuth (ADA Form) buttons, Claim All and AI queue routing, Print
ADA Form in the claim viewer, a Delta Indiv fee schedule (copied from BCBS),
and Delta Indiv as its own insurance type so it is no longer treated as
Deltains.

Also renames eligibility buttons: Delta Indiv (Last name, DOB or ID),
Metlife Dental (ID or SSN), Altus (ID, First name, DOB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 22:03:30 -04:00
co-authored by Claude Opus 5.5
parent a5beeb7ba9
commit 0082b7bd53
19 changed files with 714 additions and 462 deletions
@@ -828,6 +828,7 @@ export function ClaimForm({
if (!p) return "";
if (p.includes("masshealth") || p === "mh" || p === "mass health" || p.includes("cmsp")) return "MH";
if (p.includes("commonwealth care alliance") || p === "cca") return "CCA";
if (p.includes("indiv")) return "DeltaIndiv";
if (p.includes("ddma") || p.includes("delta dental ma")) return "DDMA";
if (p.includes("delta ins") || p === "deltains") return "DeltaIns";
if (p.includes("tufts") || p.includes("dentaquest") || p === "tuftssco") return "TuftsSCO";
@@ -1660,6 +1661,8 @@ export function ClaimForm({
runWithPriceCheck(() => handleBCBSClaim());
} else if (siteKey === "ALTUS") {
runWithPriceCheck(() => handleAltusClaim());
} else if (siteKey === "DELTAINDIV" || siteKey === "DELTA_INDIV") {
runWithPriceCheck(() => handleDeltaIndivClaim());
} else {
toast({
title: "No automated claim for this insurance",
@@ -1997,6 +2000,7 @@ export function ClaimForm({
const ADA_PAPER_PAYERS = {
BCBS_MA: { label: "BCBS", insuranceProvider: "BCBS MA", mailTo: "BCBS MA" },
ALTUS: { label: "Altus", insuranceProvider: "Altus Dental", mailTo: "Altus Dental" },
DELTA_INDIV: { label: "Delta Indiv", insuranceProvider: "Delta Dental Indiv", mailTo: "Delta Dental" },
} as const;
const handleAdaPaperClaim = async (
@@ -2093,6 +2097,11 @@ export function ClaimForm({
opts?: { auto?: boolean; preauth?: boolean },
) => handleAdaPaperClaim("ALTUS", formToUse, opts);
const handleDeltaIndivClaim = (
formToUse?: ClaimFormData & { uploadedFiles?: File[] },
opts?: { auto?: boolean; preauth?: boolean },
) => handleAdaPaperClaim("DELTA_INDIV", formToUse, opts);
const handleClaimSaved = async () => {
const missingFields: string[] = [];
if (!form.memberId?.trim()) missingFields.push("Member ID");
@@ -2244,6 +2253,8 @@ export function ClaimForm({
handleBCBSClaim(pricedForm, { auto: true });
} else if (key === "altus") {
handleAltusClaim(pricedForm, { auto: true });
} else if (key === "deltaindiv" || key === "delta_indiv") {
handleDeltaIndivClaim(pricedForm, { auto: true });
} else {
handleMHSubmit(pricedForm);
}
@@ -2278,6 +2289,13 @@ export function ClaimForm({
insuranceSiteKey: "altus",
});
handleAltusClaim(pricedForm, { auto: true, preauth: true });
} else if (key === "deltaindiv" || key === "delta_indiv") {
const pricedForm = mapPricesForForm({
form: { ...form, insuranceSiteKey: "deltaindiv" },
patientDOB: patient?.dateOfBirth ?? "",
insuranceSiteKey: "deltaindiv",
});
handleDeltaIndivClaim(pricedForm, { auto: true, preauth: true });
} else {
// Re-apply fee-schedule prices with the now-loaded patient DOB before submitting —
// the earlier chatbot-prefill pass may have run before `patient` finished loading,
@@ -2421,6 +2439,7 @@ export function ClaimForm({
<SelectItem value="CCA">CCA</SelectItem>
<SelectItem value="DDMA">DDMA</SelectItem>
<SelectItem value="DeltaIns">Delta Ins</SelectItem>
<SelectItem value="DeltaIndiv">Delta Indiv</SelectItem>
<SelectItem value="TuftsSCO">Tufts SCO</SelectItem>
<SelectItem value="UnitedSCO">United SCO</SelectItem>
<SelectItem value="BCBS">BCBS</SelectItem>
@@ -2945,6 +2964,13 @@ export function ClaimForm({
>
Altus Claim (ADA Form)
</Button>
<Button
className="w-44 bg-teal-700 hover:bg-teal-800 text-white"
onClick={() => runWithPriceCheck(() => handleDeltaIndivClaim())}
title="Save the claim and open a filled ADA paper form to print and mail to Delta Dental (P.O. Box 103, Stevens Point, WI)"
>
Delta Indiv Claim (ADA Form)
</Button>
<Button
className="w-36 bg-emerald-600 hover:bg-emerald-700 text-white"
onClick={() => runWithPriceCheck(handleClaimSaved)}
@@ -3046,6 +3072,7 @@ export function ClaimForm({
<SelectItem value="CCA">CCA</SelectItem>
<SelectItem value="DDMA">DDMA</SelectItem>
<SelectItem value="DeltaIns">Delta Ins</SelectItem>
<SelectItem value="DeltaIndiv">Delta Indiv</SelectItem>
<SelectItem value="TuftsSCO">Tufts SCO</SelectItem>
<SelectItem value="UnitedSCO">United SCO</SelectItem>
<SelectItem value="BCBS">BCBS</SelectItem>
@@ -3494,6 +3521,13 @@ export function ClaimForm({
>
Altus PreAuth (ADA Form)
</Button>
<Button
className="w-44 bg-teal-700 hover:bg-teal-800 text-white"
onClick={() => handleDeltaIndivClaim(undefined, { preauth: true })}
title="Save the preauth and open a filled ADA form (Request for Predetermination/Preauthorization) to print and mail to Delta Dental (P.O. Box 103, Stevens Point, WI)"
>
Delta Indiv PreAuth (ADA Form)
</Button>
</div>
</div>
</div>
@@ -354,7 +354,7 @@ export default function ClaimViewModal({
<Button variant="outline" onClick={() => onOpenChange(false)}>
Close
</Button>
{/bcbs|blue cross|altus/i.test(claim.insuranceProvider ?? "") && (
{/bcbs|blue cross|altus|indiv/i.test(claim.insuranceProvider ?? "") && (
<Button
variant="outline"
onClick={() => {
@@ -362,7 +362,11 @@ export default function ClaimViewModal({
showAdaClaimForm(
claim.id!,
tab,
/altus/i.test(claim.insuranceProvider ?? "") ? "ALTUS" : "BCBS_MA",
/altus/i.test(claim.insuranceProvider ?? "")
? "ALTUS"
: /indiv/i.test(claim.insuranceProvider ?? "")
? "DELTA_INDIV"
: "BCBS_MA",
).catch((err) =>
toast({
title: "ADA form failed",
@@ -194,7 +194,7 @@ export function AltusEligibilityButton({
) : (
<>
<CheckCircle className="h-4 w-4 mr-2" />
Altus
Altus (ID, First name, DOB)
</>
)}
</Button>
@@ -116,10 +116,10 @@ export function DeltaIndivEligibilityButton({
// ── Socket event handlers ─────────────────────────────────────────────────
const handleDeltaIndivStart = async () => {
if (!memberId || !dateOfBirth) {
if (!lastName || !dateOfBirth) {
toast({
title: "Missing fields",
description: "Member ID and Date of Birth are required.",
description: "Last Name and Date of Birth are required.",
variant: "destructive",
});
return;
@@ -419,7 +419,7 @@ export function DeltaIndivEligibilityButton({
) : (
<>
<CheckCircle className="h-4 w-4 mr-2" />
Delta Indiv
Delta Indiv (Last name, DOB or ID)
</>
)}
</Button>
@@ -355,7 +355,7 @@ export function MetLifeEligibilityButton({
) : (
<>
<CheckCircle className="h-4 w-4 mr-2" />
Metlife Dental
Metlife Dental (ID or SSN)
</>
)}
</Button>
@@ -137,6 +137,7 @@ const INSURANCE_TYPE_OPTIONS: { value: string; label: string }[] = [
{ value: "mh", label: "MassHealth" },
{ value: "ddma", label: "DDMA" },
{ value: "delta-ins", label: "Deltains" },
{ value: "delta-indiv", label: "Delta Indiv" },
{ value: "united-sco", label: "United SCO" },
{ value: "united-ucard", label: "United Ucard" },
{ value: "tufts-sco", label: "Tufts SCO" },
@@ -601,13 +602,17 @@ export function ChatbotButton() {
if (!eligibilityIdData) return;
addMsg("user", "Check eligibility now");
addMsg("bot", "Opening the eligibility check page...");
if (eligibilityIdData.memberId) {
await syncEditedPatientFields(eligibilityIdData.memberId, eligibilityIdData.dob, eligibilityIdData.patient?.id);
let { memberId, firstName, lastName } = eligibilityIdData;
// Delta Indiv searches by last name + DOB: a letters-only "Member ID"
// (e.g. "MOUSSAID 01/22/1991") is really the last name.
if (eligibilityIdData.autoCheck === "delta-indiv" && /^[A-Za-z'\- ]+$/.test(memberId) && !lastName) {
lastName = memberId;
memberId = "";
}
prefillAndNavigate(eligibilityIdData.memberId, eligibilityIdData.dob, eligibilityIdData.autoCheck, {
firstName: eligibilityIdData.firstName,
lastName: eligibilityIdData.lastName,
});
if (memberId) {
await syncEditedPatientFields(memberId, eligibilityIdData.dob, eligibilityIdData.patient?.id);
}
prefillAndNavigate(memberId, eligibilityIdData.dob, eligibilityIdData.autoCheck, { firstName, lastName });
};
const handleBatchEligibilityRun = () => {
@@ -1186,7 +1191,15 @@ export function ChatbotButton() {
<Select
value={eligibilityIdData.autoCheck}
onValueChange={(value) =>
setEligibilityIdData((prev) => (prev ? { ...prev, autoCheck: value } : prev))
setEligibilityIdData((prev) => {
if (!prev) return prev;
// Delta Indiv searches by last name + DOB: a letters-only "Member ID"
// (e.g. "MOUSSAID 01/22/1991") is really the last name.
if (value === "delta-indiv" && /^[A-Za-z'\- ]+$/.test(prev.memberId) && !prev.lastName) {
return { ...prev, autoCheck: value, lastName: prev.memberId, firstName: prev.firstName ?? "", memberId: "" };
}
return { ...prev, autoCheck: value };
})
}
>
<SelectTrigger className="h-7 text-xs bg-white">
@@ -89,6 +89,7 @@ export const PatientForm = forwardRef<PatientFormRef, PatientFormProps>(
const p = (val || "").toLowerCase().trim();
if (p.includes("masshealth") || p === "mh" || p === "mass health" || p.includes("cmsp")) return "MassHealth";
if (p.includes("commonwealth care alliance") || p === "cca") return "CCA";
if (p.includes("indiv")) return "Delta Dental Indiv";
if (p.includes("ddma")) return "DDMA";
if (p.includes("delta dental") || p.includes("delta ins") || p === "deltains") return "DeltaIns";
if (p.includes("tufts") || p.includes("dentaquest") || p === "tuftssco") return "TuftsSCO";
@@ -504,6 +505,7 @@ export const PatientForm = forwardRef<PatientFormRef, PatientFormProps>(
<SelectItem value="CCA">CCA</SelectItem>
<SelectItem value="DDMA">DDMA</SelectItem>
<SelectItem value="DeltaIns">Delta Ins</SelectItem>
<SelectItem value="Delta Dental Indiv">Delta Indiv</SelectItem>
<SelectItem value="TuftsSCO">Tufts SCO</SelectItem>
<SelectItem value="UnitedSCO">United SCO</SelectItem>
<SelectItem value="BCBS">BCBS</SelectItem>