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:
@@ -8,6 +8,7 @@ import os
|
||||
import time
|
||||
|
||||
from selenium_DentaQuest_eligibilityCheckWorker import AutomationDentaQuestEligibilityCheck
|
||||
from tuftssco_preauth_procedures import extract_preauth_procedures
|
||||
|
||||
SUBMITTED_URL = "https://providers.dentaquest.com/pre-auth-claims/submitted/"
|
||||
|
||||
@@ -20,7 +21,8 @@ class AutomationTuftsSCOPreAuthCheck(AutomationDentaQuestEligibilityCheck):
|
||||
step1: open Pre-authorizations and Claims > Submitted, clear the date range,
|
||||
search by pre-auth / claim number.
|
||||
step2: open the pre-auth from the result row and save its detail page as a PDF
|
||||
(filed under the patient's Approval folder by the backend).
|
||||
(filed under the patient's Approval folder by the backend), and read its
|
||||
procedure lines for the patient's Preauth History.
|
||||
"""
|
||||
|
||||
def __init__(self, data):
|
||||
@@ -111,6 +113,9 @@ class AutomationTuftsSCOPreAuthCheck(AutomationDentaQuestEligibilityCheck):
|
||||
return {"status": "error", "message": f"Detail page for #{number} did not load."}
|
||||
time.sleep(2) # let the procedure table finish rendering
|
||||
|
||||
# Procedure lines for the patient's Preauth History
|
||||
procedures = extract_preauth_procedures(self.driver)
|
||||
|
||||
# 3) The page's Print button opens Chrome's print dialog, which Selenium can't drive;
|
||||
# printing to PDF through DevTools produces the same printable page.
|
||||
pdf = self.driver.execute_cdp_cmd("Page.printToPDF", {
|
||||
@@ -141,6 +146,7 @@ class AutomationTuftsSCOPreAuthCheck(AutomationDentaQuestEligibilityCheck):
|
||||
"message": f"Tufts SCO pre-auth #{number}" + (f": {status}." if status else "."),
|
||||
"preAuthNumber": number,
|
||||
"preAuthStatus": status,
|
||||
"procedures": procedures,
|
||||
"approval_pdf_path": pdf_path,
|
||||
}
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user