feat: Check DDMA Payments reads Plan Pays from DDMA claim status, fills app payments and saves a PDF
Adds a Check DDMA Payments card (date range, Go, auto-check schedule) above Check MH Payments. Go logs into DDMA (with OTP), searches Check Claim Status by service date range, reads claim numbers and Plan Pays across pages, matches them to app claims to fill the paid amount, creates patient + payment for unmatched paid claims, and saves the results page as a PDF in uploads/DDMAPayment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,24 @@ export async function forwardToSeleniumDdmaEligibilityAgent(
|
||||
return r.data;
|
||||
}
|
||||
|
||||
export async function forwardToSeleniumDdmaPaymentAgent(
|
||||
paymentCheckData: any
|
||||
): Promise<any> {
|
||||
const payload = { data: paymentCheckData };
|
||||
const url = `/ddma-payment-check`;
|
||||
log("selenium-client", "POST ddma-payment-check", {
|
||||
url: SELENIUM_AGENT_BASE + url,
|
||||
});
|
||||
const r = await requestWithRetries({ url, method: "POST", data: payload }, 4);
|
||||
log("selenium-client", "agent response", {
|
||||
status: r.status,
|
||||
dataKeys: r.data ? Object.keys(r.data) : null,
|
||||
});
|
||||
if (r.status >= 500)
|
||||
throw new Error(`Selenium agent server error: ${r.status}`);
|
||||
return r.data;
|
||||
}
|
||||
|
||||
export async function forwardOtpToSeleniumDdmaAgent(
|
||||
sessionId: string,
|
||||
otp: string
|
||||
|
||||
Reference in New Issue
Block a user