feat: save claim attachments to cloud storage and documents page
- Claim file uploads (chatbot or manual) now save to both the Cloud Storage patient folder and the Documents page via new POST /api/claims/upload-to-cloud endpoint - MH submit flow now calls uploadAttachmentsToLocalFolder (same as DDMA/United/Tufts) so chatbot-attached X-rays are persisted - Removed old /upload-attachments disk route and attachmentDiskStorage multer config; deleted uploads/patients/ folder - uploadAttachmentsToLocalFolder now points to /upload-to-cloud and sends patientId so the backend can create the patient folder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -720,7 +720,7 @@ export default function InsuranceStatusPage() {
|
||||
try {
|
||||
const raw = sessionStorage.getItem("chatbot_appt_after_eligibility");
|
||||
if (!raw) return;
|
||||
const { memberId: storedMemberId } = JSON.parse(raw);
|
||||
const { memberId: storedMemberId, date: storedDate } = JSON.parse(raw);
|
||||
sessionStorage.removeItem("chatbot_appt_after_eligibility");
|
||||
if (!storedMemberId) return;
|
||||
|
||||
@@ -729,12 +729,15 @@ export default function InsuranceStatusPage() {
|
||||
const patient = await lookupRes.json();
|
||||
if (!patient?.id) return;
|
||||
|
||||
const apptRes = await apiRequest("POST", "/api/ai/create-appointment-today", { patientId: patient.id });
|
||||
const apptRes = await apiRequest("POST", "/api/ai/create-appointment-today", { patientId: patient.id, date: storedDate ?? undefined });
|
||||
const apptData = await apptRes.json();
|
||||
if (apptRes.ok) {
|
||||
const scheduledOn = storedDate
|
||||
? new Date(storedDate + "T00:00:00").toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })
|
||||
: "today";
|
||||
toast({
|
||||
title: "Appointment created",
|
||||
description: `${patient.firstName ?? ""} ${patient.lastName ?? ""} added to today's schedule at ${apptData.startTime} (${apptData.column ?? "Column A"}).`.trim(),
|
||||
description: `${patient.firstName ?? ""} ${patient.lastName ?? ""} added to schedule (${scheduledOn}) at ${apptData.startTime} (${apptData.column ?? "Column A"}).`.trim(),
|
||||
});
|
||||
} else {
|
||||
toast({
|
||||
|
||||
Reference in New Issue
Block a user