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:
@@ -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 ? (
|
||||
|
||||
@@ -19,6 +19,7 @@ const SITE_KEY_OPTIONS = [
|
||||
{ value: "MH", label: "MassHealth" },
|
||||
{ value: "DDMA", label: "Delta Dental MA" },
|
||||
{ value: "DENTAQUEST", label: "Tufts SCO / DentaQuest" },
|
||||
{ value: "UNITEDSCO", label: "United SCO" },
|
||||
];
|
||||
|
||||
export function CredentialForm({ onClose, userId, defaultValues }: CredentialFormProps) {
|
||||
|
||||
@@ -18,6 +18,7 @@ const SITE_KEY_LABELS: Record<string, string> = {
|
||||
MH: "MassHealth",
|
||||
DDMA: "Delta Dental MA",
|
||||
DENTAQUEST: "Tufts SCO / DentaQuest",
|
||||
UNITEDSCO: "United SCO",
|
||||
};
|
||||
|
||||
function getSiteKeyLabel(siteKey: string): string {
|
||||
|
||||
Reference in New Issue
Block a user