fix: AI claim queue restart from first patient; recognize D7210 # 32 in notes
- appointments-page: save full queue from current patient on confirm so that
cancelling the claim form resumes at the same patient instead of skipping it
- claims-page: advance ai_claim_queue only after successful submission (CCA,
MH selenium PDF download, or direct non-draft submit) via new advanceAiClaimQueue()
- cdt-lookup: fix extractToothSurface regex to allow space between # and digit
(e.g. "# 32") so tooth number is correctly captured
- cdt-lookup: silently skip bare tooth-number tokens ("# 32", "#32") that the
LLM may emit as standalone items, preventing false "unrecognized procedure" errors
- internal-chat-graph: add explicit rule that a CDT code followed by # NN
(e.g. "D7210 # 32") must stay as one entry and not spread to other procedures
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1577,11 +1577,11 @@ export default function AppointmentsPage() {
|
||||
const handleAiClaimConfirm = () => {
|
||||
if (!aiClaimCurrentData) return;
|
||||
const { matchedCodes, siteKey, serviceDate, appointmentId } = aiClaimCurrentData;
|
||||
const nextIndex = aiClaimCurrentIndex + 1;
|
||||
const remaining = aiClaimQueue.slice(nextIndex);
|
||||
if (remaining.length > 0) {
|
||||
// Include current patient in queue; claims-page advances it only on successful submit.
|
||||
const fromCurrent = aiClaimQueue.slice(aiClaimCurrentIndex);
|
||||
if (fromCurrent.length > 0) {
|
||||
sessionStorage.setItem("ai_claim_queue", JSON.stringify({
|
||||
appointments: remaining,
|
||||
appointments: fromCurrent,
|
||||
date: formattedSelectedDate,
|
||||
pendingResume: true,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user