fix: pass DOB from chatbot through to claim form for DDMA claims
The chatbot-extracted DOB was stored in chatbot_claim_codes but never forwarded to chatbot_claim_prefill, leaving the claim form DOB empty when the patient DB record lacked it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -865,6 +865,7 @@ export function ChatbotButton() {
|
||||
siteKey: apptSelectionData.siteKey,
|
||||
serviceDate: opt.serviceDate,
|
||||
autoSubmit: true,
|
||||
dob: apptSelectionData.patient?.dateOfBirth ?? null,
|
||||
})
|
||||
);
|
||||
setChatbotPendingFiles(pendingFiles);
|
||||
@@ -919,7 +920,7 @@ export function ChatbotButton() {
|
||||
if (patient?.id && matchedCodes.length > 0) {
|
||||
sessionStorage.setItem(
|
||||
"chatbot_claim_prefill",
|
||||
JSON.stringify({ codes: matchedCodes, siteKey, serviceDate, autoSubmit: true, renderingProvider: renderingProvider ?? null })
|
||||
JSON.stringify({ codes: matchedCodes, siteKey, serviceDate, autoSubmit: true, renderingProvider: renderingProvider ?? null, dob: patient?.dateOfBirth ?? null })
|
||||
);
|
||||
}
|
||||
setChatbotPendingFiles(pendingFiles);
|
||||
@@ -1036,7 +1037,7 @@ export function ChatbotButton() {
|
||||
if (data.action === "claim_only_ready" && data.actionData) {
|
||||
const { patient, matchedCodes, siteKey, serviceDate, appointmentId, renderingProvider } = data.actionData;
|
||||
if (patient?.id && matchedCodes?.length > 0) {
|
||||
sessionStorage.setItem("chatbot_claim_prefill", JSON.stringify({ codes: matchedCodes, siteKey, serviceDate, autoSubmit: true, renderingProvider: renderingProvider ?? null }));
|
||||
sessionStorage.setItem("chatbot_claim_prefill", JSON.stringify({ codes: matchedCodes, siteKey, serviceDate, autoSubmit: true, renderingProvider: renderingProvider ?? null, dob: patient?.dateOfBirth ?? null }));
|
||||
}
|
||||
setChatbotPendingFiles(pendingFiles);
|
||||
const url = appointmentId ? `/claims?appointmentId=${appointmentId}` : `/claims?newPatient=${patient?.id}`;
|
||||
|
||||
Reference in New Issue
Block a user