feat(eligibility-check) - enhance DentaQuest and United SCO workflows with flexible input handling; added Selenium session clearing on credential updates and deletions; improved patient name extraction and eligibility checks across services

This commit is contained in:
2026-02-06 08:57:29 -05:00
parent e43329e95f
commit e425a829b2
12 changed files with 418 additions and 224 deletions

View File

@@ -127,6 +127,11 @@ export function DentaQuestEligibilityButton({
const [isStarting, setIsStarting] = useState(false);
const [isSubmittingOtp, setIsSubmittingOtp] = useState(false);
// DentaQuest allows flexible search - only DOB is required, plus at least one identifier
// Can use: memberId, firstName, lastName, or any combination
const hasAnyIdentifier = memberId || firstName || lastName;
const isDentaQuestFormIncomplete = !dateOfBirth || !hasAnyIdentifier;
// Clean up socket on unmount
useEffect(() => {
return () => {
@@ -370,10 +375,13 @@ export function DentaQuestEligibilityButton({
};
const startDentaQuestEligibility = async () => {
if (!memberId || !dateOfBirth) {
// Flexible search - DOB required plus at least one identifier
const hasAnyIdentifier = memberId || firstName || lastName;
if (!dateOfBirth || !hasAnyIdentifier) {
toast({
title: "Missing fields",
description: "Member ID and Date of Birth are required.",
description: "Please provide Date of Birth and at least one of: Member ID, First Name, or Last Name.",
variant: "destructive",
});
return;
@@ -538,7 +546,7 @@ export function DentaQuestEligibilityButton({
<Button
className="w-full"
variant="outline"
disabled={isFormIncomplete || isStarting}
disabled={isDentaQuestFormIncomplete || isStarting}
onClick={startDentaQuestEligibility}
>
{isStarting ? (