feat: add Deltains claim submission flow
Adds a full "Deltains Claim" button next to Delta MA Claim, mirroring the DDMA claim flow across frontend, backend queue/routes, and a new Selenium worker. Reuses the existing Deltains eligibility login/OTP code and was iteratively wired against the live portal (patient roster search, per-service-line fields, tooth number/surface selects, review and submit). Also fixes chatbot/insurance-alias carrier recognition so "deltains" resolves correctly instead of falling back to MassHealth.
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 /deltains-claim
|
||||
* Returns { status: "started", session_id: "<uuid>" }
|
||||
*/
|
||||
export async function forwardToSeleniumDeltainsClaimAgent(
|
||||
data: Record<string, any>
|
||||
): Promise<{ status: string; session_id: string }> {
|
||||
const resp = await axios.post(`${SELENIUM_BASE}/deltains-claim`, data);
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /session/{sid}/status
|
||||
*/
|
||||
export async function getSeleniumDeltainsClaimSessionStatus(
|
||||
sessionId: string
|
||||
): Promise<Record<string, any>> {
|
||||
const resp = await axios.get(`${SELENIUM_BASE}/session/${sessionId}/status`);
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /session/{sid}/submit-otp
|
||||
*/
|
||||
export async function forwardOtpToSeleniumDeltainsClaimAgent(
|
||||
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