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

@@ -54,6 +54,7 @@ export function PdfPreviewModal({
autoDownload = false,
}: Props) {
const [fileBlobUrl, setFileBlobUrl] = useState<string | null>(null);
const [isImage, setIsImage] = useState(false);
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const [resolvedFilename, setResolvedFilename] = useState<string | null>(null);
@@ -98,8 +99,13 @@ export function PdfPreviewModal({
const arrayBuffer = await res.arrayBuffer();
if (aborted) return;
const blob = new Blob([arrayBuffer], { type: "application/pdf" });
const lowerName = finalName.toLowerCase();
const isPng = lowerName.endsWith(".png");
const isJpg = lowerName.endsWith(".jpg") || lowerName.endsWith(".jpeg");
const mimeType = isPng ? "image/png" : isJpg ? "image/jpeg" : "application/pdf";
const blob = new Blob([arrayBuffer], { type: mimeType });
objectUrl = URL.createObjectURL(blob);
setIsImage(isPng || isJpg);
setFileBlobUrl(objectUrl);
if (autoDownload) {
@@ -132,6 +138,7 @@ export function PdfPreviewModal({
controller.abort();
if (objectUrl) URL.revokeObjectURL(objectUrl);
setFileBlobUrl(null);
setIsImage(false);
setError(null);
setLoading(false);
setResolvedFilename(null);
@@ -194,12 +201,20 @@ export function PdfPreviewModal({
{loading && <div>Loading PDF</div>}
{error && <div className="text-destructive">Error: {error}</div>}
{fileBlobUrl && (
<iframe
title="PDF Preview"
src={fileBlobUrl}
className="w-full h-full border"
style={{ minHeight: 0 }}
/>
isImage ? (
<img
src={fileBlobUrl}
alt={resolvedFilename ?? "Preview"}
className="max-w-full max-h-full object-contain mx-auto"
/>
) : (
<iframe
title="PDF Preview"
src={fileBlobUrl}
className="w-full h-full border"
style={{ minHeight: 0 }}
/>
)
)}
</div>
</div>