feat: improve CCA preauth cell filling, implants category, preauth no recording
- Selenium: bulletproof Wait→Click→Clear→Type→Verify for tooth, billed amt cells - Selenium: fix billed amt to click td[23] (correct column) to trigger edit mode - Selenium: skip tentative date (auto-filled by page after tooth entry) - Frontend: add Implants category with Implant/Abut/Crown, Fixture, Abutment, Crown buttons (D6010/D6057/D6058) - Frontend: pdf-preview-modal renders PNG screenshots as <img> instead of PDF iframe - Backend: CCA preauth route creates claim record if none exists - Backend: CCA preauth processor saves authNumber into claimNumber column after submission Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -454,6 +454,34 @@ export default function ClaimsPage() {
|
||||
}
|
||||
};
|
||||
|
||||
// CCA pre-auth selenium handler
|
||||
const handleCCAPreAuthSubmitSelenium = async (data: any) => {
|
||||
const formData = new FormData();
|
||||
formData.append("data", JSON.stringify(data));
|
||||
if (socketId) formData.append("socketId", socketId);
|
||||
const uploadedFiles: File[] = data.uploadedFiles ?? [];
|
||||
uploadedFiles.forEach((file: File) => {
|
||||
if (file.type === "application/pdf") {
|
||||
formData.append("pdfs", file);
|
||||
} else if (file.type.startsWith("image/")) {
|
||||
formData.append("images", file);
|
||||
}
|
||||
});
|
||||
try {
|
||||
dispatch(setTaskStatus({ key: "claimSubmit", status: "pending", message: "Submitting CCA PreAuth..." }));
|
||||
const response = await apiRequest("POST", "/api/claims/cca-preauth", formData);
|
||||
const result = await response.json();
|
||||
if (result.error) throw new Error(result.error);
|
||||
pendingClaimMeta.current = { patientId: selectedPatientId, groupKey: "INSURANCE_CLAIM_PREAUTH" };
|
||||
setPendingClaimJobId(result.jobId);
|
||||
dispatch(setTaskStatus({ key: "claimSubmit", status: "pending", message: "CCA PreAuth queued. Awaiting Selenium..." }));
|
||||
toast({ title: "CCA PreAuth queued", description: "Selenium is processing the pre-authorization.", variant: "default" });
|
||||
} catch (error: any) {
|
||||
dispatch(setTaskStatus({ key: "claimSubmit", status: "error", message: error.message || "CCA PreAuth failed" }));
|
||||
toast({ title: "CCA PreAuth error", description: error.message || "An error occurred.", variant: "destructive" });
|
||||
}
|
||||
};
|
||||
|
||||
// 5. selenium pdf download handler
|
||||
const handleMHSeleniumPdfDownload = async (
|
||||
data: any,
|
||||
@@ -666,6 +694,7 @@ export default function ClaimsPage() {
|
||||
onHandleForMHSeleniumClaim={handleMHClaimSubmitSelenium}
|
||||
onHandleForMHSeleniumClaimPreAuth={handleMHClaimPreAuthSubmitSelenium}
|
||||
onHandleForCCASeleniumClaim={handleCCAClaimSubmitSelenium}
|
||||
onHandleForCCASeleniumPreAuth={handleCCAPreAuthSubmitSelenium}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user