feat: Altus Dental eligibility check and ADA paper claim/preauth

Eligibility (no OTP, fresh browser per run like MH): logs in, opens Benefits &
Claims Information, searches by Subscriber ID (or Subscriber Last Name via
"Click Here"), First Name and DOB, picks the matching row from the patient list,
sets ACTIVE/INACTIVE from the Coverage range, reads Group Number into the
patient's Group Number, opens View Details for the last name and plan name,
and saves the details page PDF to the patient's Eligibility folder. A patient
switching plans is matched by name + DOB so Altus overwrites the old insurance
instead of creating a duplicate.

Claims: Altus uses the same 2024 ADA form as BCBS with the Altus payer address
(P.O. Box 1557, Providence, RI 02901-1557). Adds Altus Claim/PreAuth (ADA Form)
buttons, Claim All and AI queue routing, Print ADA Form in the claim viewer, and
an Altus fee schedule (copied from BCBS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 00:47:01 -04:00
co-authored by Claude Opus 5.5
parent fa6c55421c
commit db7d74a13b
21 changed files with 1388 additions and 33 deletions
+37
View File
@@ -12,6 +12,7 @@ from selenium_claimStatusCheckWorker import AutomationMassHealthClaimStatusCheck
from selenium_preAuthWorker import AutomationMassHealthPreAuth
from selenium_MHSinglePaymentCheckWorker import AutomationMassHealthSinglePaymentCheck
from selenium_MHBatchPaymentCheckWorker import AutomationMassHealthBatchPaymentCheck
from selenium_Altus_eligibilityCheckWorker import AutomationAltusEligibilityCheck
import os
import time
import helpers_ddma_eligibility as hddma
@@ -195,6 +196,42 @@ async def mh_eligibility_history_check(request: Request):
async with lock:
active_jobs -= 1
# Endpoint: 2c — Altus Dental eligibility (no OTP, fresh browser per run)
@app.post("/altus-eligibility-check")
async def altus_eligibility_check(request: Request):
global active_jobs, waiting_jobs
data = await request.json()
async with lock:
waiting_jobs += 1
async with semaphore:
async with lock:
waiting_jobs -= 1
active_jobs += 1
try:
bot = AutomationAltusEligibilityCheck(data)
# Selenium is blocking — run off the event loop so /status etc. stay responsive
result = await asyncio.to_thread(
bot.main_workflow, "https://www.altusdental.com/Provider/Login?timedOut=False"
)
if result.get("status") == "error":
return {"status": "error", "message": result.get("message")}
if result.get("pdf_path"):
filename = os.path.basename(result["pdf_path"])
port = os.getenv("PORT", "5002")
url_host = os.getenv("HOST", "localhost")
result["pdf_url"] = f"http://{url_host}:{port}/downloads/{filename}"
return result
except Exception as e:
return {"status": "error", "message": str(e)}
finally:
async with lock:
active_jobs -= 1
# Endpoint: 2b — CMSP Eligibility + Service History + Accumulator (Remaining)
@app.post("/cmsp-eligibility-history-remaining-check")
async def cmsp_eligibility_history_remaining_check(request: Request):