feat: Tufts SCO service/preauth history, chat clear archives history, labeled ID/DOB detection

- AI chat Clear empties the chat box but archives the conversation in the per-user JSON file
- Chat bot detects Member ID/DOB pasted with labels ("Date of Birth ... Member ID ...")
- Tufts SCO (DentaQuest) eligibility saves the member's service history
- Tufts SCO Check PreAuth saves procedure lines (code, tooth, plan payment, status) to a
  new PatientPreauthHistory table, shown as Preauth History in Patient Details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 22:34:27 -05:00
co-authored by Claude Opus 5.5
parent 2352922089
commit 6c98f7f985
182 changed files with 4254 additions and 141 deletions
@@ -14,6 +14,7 @@ import base64
from dentaquest_browser_manager import get_browser_manager
from dentaquest_member_details import extract_member_address
from dentaquest_service_history import extract_service_history
class AutomationDentaQuestEligibilityCheck:
def __init__(self, data):
@@ -680,6 +681,7 @@ class AutomationDentaQuestEligibilityCheck:
# Address from the Member's information block (empty on the search results page)
member_address = extract_member_address(self.driver) if detail_url else {}
service_history = extract_service_history(self.driver) if detail_url else []
# Wait for page to fully load before generating PDF
try:
@@ -739,8 +741,9 @@ class AutomationDentaQuestEligibilityCheck:
"patientName": patientName,
"memberId": foundMemberId, # Member ID extracted from the page
**member_address, # address, city, state, zipCode
"service_history": service_history,
}
print(f"[DentaQuest step2] Success: {output}")
print(f"[DentaQuest step2] Success: { {k: v for k, v in output.items() if k != 'service_history'} }")
return output
except Exception as e: