fix: Tufts SCO + UnitedDH pre-auth file upload, tooth fill, PDF and pre-auth number
- Frontend: upload attachments to disk before sending pre-auth payload (same pattern as claims) - cloud-storage: finalizeFileUpload returns diskPath so Python workers get real file paths - upload-to-cloud route: return diskPath instead of API URL - TuftsSCO preAuth worker: skip 'Add a file' button click; send_keys directly to hidden react-aria-Input - TuftsSCO preAuth worker: JS focus() on tooth field to bypass warning-banner overlay - TuftsSCO preAuth worker: 1.5s wait after procedure code for layout shift to settle - TuftsSCO preAuth worker: step8 waits for 'thank' in page_source then extracts via 'submitted pre-authorization' regex - helpers_tuftssco_preauth: convert pdf_path → pdf_url (http://localhost:5002/downloads/...) - tuftsSCOPreAuthProcessor: use pdf_url (not pdf_path), save preAuthNumber to preAuthNumber field - unitedDHPreAuthProcessor: save preAuthNumber to preAuthNumber field (not claimNumber) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -159,14 +159,18 @@ async def start_tuftssco_preauth_run(sid: str, data: dict, url: str):
|
||||
otp_input.send_keys(otp_value)
|
||||
try:
|
||||
verify_btn = driver.find_element(By.XPATH,
|
||||
"//button[@type='submit'] | "
|
||||
"//button[contains(text(),'Verify') or contains(text(),'Submit') or contains(text(),'Confirm')]"
|
||||
)
|
||||
"//button[@type='button' and @aria-label='Verify']")
|
||||
verify_btn.click()
|
||||
print("[TuftsSCO PreAuth OTP] Clicked verify button")
|
||||
except:
|
||||
otp_input.send_keys("\n")
|
||||
print("[TuftsSCO PreAuth OTP] Pressed Enter as fallback")
|
||||
print("[TuftsSCO PreAuth OTP] Clicked Verify button (aria-label)")
|
||||
except Exception:
|
||||
try:
|
||||
verify_btn = driver.find_element(By.XPATH,
|
||||
"//button[contains(text(),'Verify') or contains(text(),'Submit') or @type='submit']")
|
||||
verify_btn.click()
|
||||
print("[TuftsSCO PreAuth OTP] Clicked verify button (text fallback)")
|
||||
except Exception:
|
||||
otp_input.send_keys("\n")
|
||||
print("[TuftsSCO PreAuth OTP] Pressed Enter as fallback")
|
||||
print("[TuftsSCO PreAuth OTP] OTP typed and submitted via app")
|
||||
s["otp_value"] = None
|
||||
await asyncio.sleep(3)
|
||||
@@ -288,11 +292,20 @@ async def start_tuftssco_preauth_run(sid: str, data: dict, url: str):
|
||||
pdf_path = step8_result.get("pdf_path") if isinstance(step8_result, dict) else None
|
||||
preauth_number = step8_result.get("preAuthNumber") if isinstance(step8_result, dict) else None
|
||||
|
||||
pdf_url = None
|
||||
if pdf_path:
|
||||
import os as _os
|
||||
filename = _os.path.basename(pdf_path)
|
||||
port = _os.getenv("PORT", "5002")
|
||||
url_host = _os.getenv("HOST", "localhost")
|
||||
pdf_url = f"http://{url_host}:{port}/downloads/{filename}"
|
||||
print(f"[TuftsSCO PreAuth] pdf_url: {pdf_url}")
|
||||
|
||||
result = {
|
||||
"status": "success",
|
||||
"message": "Tufts SCO pre-authorization submitted successfully",
|
||||
"preAuthNumber": preauth_number,
|
||||
"pdf_path": pdf_path,
|
||||
"pdf_url": pdf_url,
|
||||
}
|
||||
s["status"] = "completed"
|
||||
s["result"] = result
|
||||
|
||||
Reference in New Issue
Block a user