fix: DentaQuest eligibility marked Inactive members as active
"active" substring matched "inactive" (and "eligible" matched "not eligible"); check negative statuses first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -502,10 +502,15 @@ class AutomationDentaQuestEligibilityCheck:
|
|||||||
)
|
)
|
||||||
status_text = status_elem.text.strip().lower()
|
status_text = status_elem.text.strip().lower()
|
||||||
print(f"[DentaQuest step2] Found eligibility status: '{status_text}'")
|
print(f"[DentaQuest step2] Found eligibility status: '{status_text}'")
|
||||||
if "active" in status_text or ("eligible" in status_text and "ineligible" not in status_text):
|
# Check negatives first: "inactive" contains "active" and
|
||||||
eligibilityText = "active"
|
# "not eligible"/"ineligible" contain "eligible".
|
||||||
elif "plan not accepted" in status_text:
|
if "plan not accepted" in status_text:
|
||||||
eligibilityText = "plan not accepted"
|
eligibilityText = "plan not accepted"
|
||||||
|
elif ("inactive" in status_text or "ineligible" in status_text
|
||||||
|
or "not eligible" in status_text or "not active" in status_text):
|
||||||
|
eligibilityText = "inactive"
|
||||||
|
elif "active" in status_text or "eligible" in status_text:
|
||||||
|
eligibilityText = "active"
|
||||||
else:
|
else:
|
||||||
eligibilityText = "inactive"
|
eligibilityText = "inactive"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user