feat: add United Ucard claim worker and fix batch-column site-key routing
Adds a "United Ucard Claim" button (claims/preauth insurance form) that submits through a full Selenium pipeline mirroring the Tufts SCO claim worker: frontend handler -> backend route/queue processor -> Python agent, reusing the persistent login/OTP session from the existing United Ucard eligibility check. Implements the UHC Dental claim wizard end-to-end (Provider Information, Patient Information search/select, Claim Information procedures + questions, Upload Documents, Review and Sign, Submit); the final confirmation-page PDF/claim-number capture is still a TODO stub pending that page's DOM. Also wires United Ucard into the AI chatbot's eligibility flow (insuranceAliases.json, siteKeyToAutoCheck, clarification options), and fixes a bug where the AI-column batch claim feature silently defaulted United Ucard patients to MassHealth because batchColumnDeriveSiteKey had no matching branch and no job-dispatch case for UNITED_UCARD. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import axios from "axios";
|
||||
|
||||
const SELENIUM_BASE = process.env.SELENIUM_SERVICE_URL ?? "http://localhost:5002";
|
||||
|
||||
/**
|
||||
* POST /uniteducard-claim
|
||||
* Returns { status: "started", session_id: "<uuid>" }
|
||||
*/
|
||||
export async function forwardToSeleniumUnitedUcardClaimAgent(
|
||||
data: Record<string, any>
|
||||
): Promise<{ status: string; session_id: string }> {
|
||||
const resp = await axios.post(`${SELENIUM_BASE}/uniteducard-claim`, data);
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /session/{sid}/status
|
||||
*/
|
||||
export async function getSeleniumUnitedUcardClaimSessionStatus(
|
||||
sessionId: string
|
||||
): Promise<Record<string, any>> {
|
||||
const resp = await axios.get(`${SELENIUM_BASE}/session/${sessionId}/status`);
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /submit-otp
|
||||
*/
|
||||
export async function forwardOtpToSeleniumUnitedUcardClaimAgent(
|
||||
sessionId: string,
|
||||
otp: string
|
||||
): Promise<Record<string, any>> {
|
||||
const resp = await axios.post(`${SELENIUM_BASE}/submit-otp`, { session_id: sessionId, otp });
|
||||
return resp.data;
|
||||
}
|
||||
Reference in New Issue
Block a user