feat: AI chat file uploads, RCT/PA tooth mapping, check+claim flow, service date column
- Chatbot: add paperclip button to attach X-ray/PDF files to claim submissions; files flow through chatbotFileStore into claim-form uploadedFiles for Selenium - CDT lookup: auto-select D3310/D3320/D3330 by tooth number for RCT; strip #NN from procedure names before alias lookup so "1 pa, #3" → D0220 tooth 3; add "1 pa" alias for D0220; expand multi-PA notation via AI prompt rule - AI classifier: add navigate_eligibility intent ("check mh" → /insurance-status); fix duplicate intent entry; add RCT and multi-PA prompt rules - Check+claim flow: pass serviceDate through check_and_claim_ready actionData; tryClaimFromChatbot skips PDF preview and navigates straight to claims with memberId fallback lookup; wired into all provider onPdfReady callbacks - Claims table: add Service Date column between Patient Name and Submission Date Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,8 @@ export interface CdtResult {
|
||||
code: string | null;
|
||||
description: string;
|
||||
input: string;
|
||||
toothNumber?: string;
|
||||
toothSurface?: string;
|
||||
}
|
||||
|
||||
export interface ChatResponse {
|
||||
@@ -181,6 +183,13 @@ export async function runInternalChatWorkflow(
|
||||
actionData: { url: "/appointments" },
|
||||
};
|
||||
}
|
||||
if (intent === "navigate_eligibility") {
|
||||
return {
|
||||
reply: classification.fallbackReply ?? "Opening the eligibility page...",
|
||||
action: "navigate",
|
||||
actionData: { url: "/insurance-status" },
|
||||
};
|
||||
}
|
||||
|
||||
// ── Find patient (record only, no eligibility) ──────────────────────────────
|
||||
|
||||
@@ -451,6 +460,7 @@ async function handleCheckAndClaim(
|
||||
autoCheck: siteKeyToAutoCheck(siteKey),
|
||||
cdtResults,
|
||||
matchedCodes: matched.map((r) => ({ code: r.code!, description: r.description, toothNumber: r.toothNumber, toothSurface: r.toothSurface })),
|
||||
serviceDate: c.appointmentDate ?? null,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user