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:
Gitead
2026-05-23 22:01:52 -04:00
parent 0e664e4813
commit 5ceecbeb7f
8 changed files with 1707 additions and 13 deletions

View File

@@ -76,6 +76,7 @@ interface ClaimFormProps {
onHandleForMHSeleniumClaim: (data: ClaimFormData) => void;
onHandleForMHSeleniumClaimPreAuth: (data: ClaimPreAuthData) => void;
onHandleForCCASeleniumClaim: (data: ClaimFormData) => void;
onHandleForCCASeleniumPreAuth: (data: ClaimPreAuthData) => void;
onClose: () => void;
}
@@ -89,6 +90,7 @@ export function ClaimForm({
onHandleForMHSeleniumClaim,
onHandleForMHSeleniumClaimPreAuth,
onHandleForCCASeleniumClaim,
onHandleForCCASeleniumPreAuth,
onSubmit,
onClose,
}: ClaimFormProps) {
@@ -974,6 +976,44 @@ export function ClaimForm({
onClose();
};
const handleCCAPreAuth = async () => {
const missingFields: string[] = [];
if (!form.memberId?.trim()) missingFields.push("Member ID");
if (!form.dateOfBirth?.trim()) missingFields.push("Date of Birth");
if (!patient?.firstName?.trim()) missingFields.push("First Name");
if (missingFields.length > 0) {
toast({
title: "Missing Required Fields",
description: `Please fill out the following field(s): ${missingFields.join(", ")}`,
variant: "destructive",
});
return;
}
const filteredServiceLines = (form.serviceLines || []).filter(
(line) => (line.procedureCode ?? "").trim() !== "",
);
if (filteredServiceLines.length === 0) {
toast({
title: "No procedure codes",
description: "Please add at least one procedure code before submitting the pre-authorization.",
variant: "destructive",
});
return;
}
onHandleForCCASeleniumPreAuth({
...form,
serviceLines: filteredServiceLines,
staffId: appointmentStaffId ?? Number(staff?.id),
patientId,
insuranceProvider: "CCA",
insuranceSiteKey: "CCA",
});
onClose();
};
const uploadAttachmentsToLocalFolder = async (files: File[]): Promise<ClaimFileMeta[]> => {
if (!files.length) return [];
@@ -1824,7 +1864,7 @@ export function ClaimForm({
</Button>
</div>
) : (
<div className="flex justify-between">
<div className="flex flex-wrap gap-2 justify-center">
<Button
className="w-32 bg-blue-600 hover:bg-blue-700 text-white"
onClick={() => handleMHSubmit()}
@@ -1837,8 +1877,14 @@ export function ClaimForm({
>
CCA Claim
</Button>
<Button className="w-36" variant="outline">
Delta MA Claim
</Button>
<Button className="w-44" variant="outline">
United/DentalHub Claim
</Button>
<Button className="w-32" variant="outline">
Delta MA
Tufts Claim
</Button>
<Button
className="w-36 bg-emerald-600 hover:bg-emerald-700 text-white"
@@ -1954,7 +2000,7 @@ export function ClaimForm({
<SelectItem value="Others">Others</SelectItem>
</SelectContent>
</Select>
<Label className="flex items-center">Service Date</Label>
<Label className="flex items-center">Tentative Service Date</Label>
<Popover
open={serviceDateOpen}
onOpenChange={setServiceDateOpen}
@@ -2342,14 +2388,31 @@ export function ClaimForm({
<h3 className="text-xl font-semibold mb-4 text-center">
PreAuth
</h3>
<div className="flex justify-center">
<div className="flex flex-wrap gap-2 justify-center">
<Button
className="w-32"
variant="secondary"
className="w-32 bg-blue-600 hover:bg-blue-700 text-white"
onClick={() => handleMHPreAuth()}
>
MH PreAuth
</Button>
<Button
className="w-32 bg-blue-600 hover:bg-blue-700 text-white"
onClick={handleCCAPreAuth}
>
CCA PreAuth
</Button>
<Button
className="w-44"
variant="secondary"
>
United/DentalHub PreAuth
</Button>
<Button
className="w-32"
variant="secondary"
>
Tufts PreAuth
</Button>
</div>
</div>
</div>