fix: default tooth # for 2PA and skip PDF popup for AI chat claims

- 2PA with no explicit tooth numbers now defaults to D0220 #8 / D0230 #24
- Claims submitted via the AI chat column no longer auto-open the PDF preview modal

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-05 15:52:31 -04:00
co-authored by Claude Sonnet 5
parent d35efe7366
commit fd2d1e6aba
2 changed files with 10 additions and 4 deletions
+4 -3
View File
@@ -156,7 +156,7 @@ export default function ClaimsPage() {
if (jobResult.pdfFileId) {
advanceAiClaimQueue();
const advancedToNext = advanceChatbotClaimQueue();
if (!advancedToNext) {
if (!advancedToNext && !chatbotAutoSubmitSiteKey) {
setPreviewPdfId(jobResult.pdfFileId);
setPreviewFallbackFilename(jobResult.pdfFilename ?? `cca_claim_${jobResult.claimNumber ?? "unknown"}.pdf`);
setPreviewOpen(true);
@@ -992,8 +992,9 @@ export default function ClaimsPage() {
}
// Pop up the final PDF so the user doesn't need to navigate to Documents
// (skip if we're about to navigate to the next queued patient's claim)
if (result.pdfFileId && !advancedToNext) {
// (skip if we're about to navigate to the next queued patient's claim,
// or if this claim was submitted via the AI chat column)
if (result.pdfFileId && !advancedToNext && !chatbotAutoSubmitSiteKey) {
setPreviewPdfId(result.pdfFileId);
setPreviewFallbackFilename(result.fileName ?? null);
setPreviewOpen(true);