feat: United SCO claim worker rewrite + eligibility/patient-table fixes

- Rewrote UnitedDH claim worker to navigate via eligibility page → Selected Patient → Submit Claim button flow
- Updated helpers_uniteddh_claim.py step names to match new 9-step workflow
- Changed payer selection in both eligibility and claim workers to type + Enter
- Updated patient table column header from 'DOB / Gender' to 'DOB'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ff
2026-05-30 14:46:51 -04:00
parent cda00f5f8a
commit 70f36fc13c
4 changed files with 541 additions and 434 deletions

View File

@@ -250,13 +250,14 @@ async def start_uniteddh_claim_run(sid: str, data: dict, url: str):
# --- Claim steps ---
for step_name, step_fn in [
("step1_search_patient", bot.step1_search_patient),
("step2_open_member_page", bot.step2_open_member_page),
("step3_click_create_claim", bot.step3_click_create_claim),
("step4_fill_claim_form", bot.step4_fill_claim_form),
("step5_attach_files", bot.step5_attach_files),
("step6_click_next", bot.step6_click_next),
("step7_submit_claim", bot.step7_submit_claim),
("step1_search_patient", bot.step1_search_patient),
("step2_click_submit_claim", bot.step2_click_submit_claim),
("step3_continue_prefilled", bot.step3_continue_prefilled),
("step4_select_insurance_ok", bot.step4_select_insurance_ok),
("step5_practitioner_continue", bot.step5_practitioner_continue),
("step6_fill_claim_form", bot.step6_fill_claim_form),
("step7_attach_files", bot.step7_attach_files),
("step8_submit_claim", bot.step8_submit_claim),
]:
result = step_fn()
print(f"[UnitedDH Claim] {step_name} result: {result}")
@@ -267,14 +268,14 @@ async def start_uniteddh_claim_run(sid: str, data: dict, url: str):
asyncio.create_task(_remove_session_later(sid, 30))
return {"status": "error", "message": result}
# --- Step 8: PDF + claim number ---
step8_result = bot.step8_save_confirmation_pdf()
print(f"[UnitedDH Claim] step8 result: {step8_result}")
if isinstance(step8_result, str) and step8_result.startswith("ERROR"):
print(f"[UnitedDH Claim] step8 warning (non-fatal): {step8_result}")
step8_result = {}
# --- Step 9: PDF + claim number ---
step9_result = bot.step9_save_confirmation_pdf()
print(f"[UnitedDH Claim] step9 result: {step9_result}")
if isinstance(step9_result, str) and step9_result.startswith("ERROR"):
print(f"[UnitedDH Claim] step9 warning (non-fatal): {step9_result}")
step9_result = {}
pdf_path = step8_result.get("pdf_path") if isinstance(step8_result, dict) else None
pdf_path = step9_result.get("pdf_path") if isinstance(step9_result, dict) else None
pdf_url = None
if pdf_path:
import os as _os
@@ -284,7 +285,7 @@ async def start_uniteddh_claim_run(sid: str, data: dict, url: str):
pdf_url = f"http://{url_host}:{port}/downloads/{filename}"
print(f"[UnitedDH Claim] pdf_url: {pdf_url}")
claim_number = step8_result.get("claimNumber") if isinstance(step8_result, dict) else None
claim_number = step9_result.get("claimNumber") if isinstance(step9_result, dict) else None
result = {
"status": "success",