From 4127861d06e3ae8f3052f1d96dff129703f1e57d Mon Sep 17 00:00:00 2001 From: Gitead Date: Sat, 16 May 2026 23:04:57 -0400 Subject: [PATCH] fix: remove patient update calls from claim/preauth handlers to stop validation errors The insuranceId format check on the backend rejected updates when the member ID contained non-digit characters. Tagging insuranceProvider on the patient is not required for selenium to run, so the calls are removed from handleMHSubmit, handleMHPreAuth, and handleAddService. Co-Authored-By: Claude Sonnet 4.6 --- .../src/components/claims/claim-form.tsx | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/apps/Frontend/src/components/claims/claim-form.tsx b/apps/Frontend/src/components/claims/claim-form.tsx index 33e9cda9..4fb83646 100755 --- a/apps/Frontend/src/components/claims/claim-form.tsx +++ b/apps/Frontend/src/components/claims/claim-form.tsx @@ -757,23 +757,6 @@ export function ClaimForm({ } } - // 2. Update patient - if (patient && typeof patient.id === "number") { - const { id, createdAt, userId, ...sanitizedFields } = patient; - const updatedPatientFields = { - id, - ...sanitizedFields, - insuranceProvider: "MassHealth", - }; - onHandleUpdatePatient(updatedPatientFields); - } else { - toast({ - title: "Error", - description: "Cannot update patient: Missing or invalid patient data", - variant: "destructive", - }); - } - // 3. Create Claim(if not) // Filter out empty service lines (empty procedureCode) const { @@ -934,23 +917,6 @@ export function ClaimForm({ } } - // 2. Update patient - if (patient && typeof patient.id === "number") { - const { id, createdAt, userId, ...sanitizedFields } = patient; - const updatedPatientFields = { - id, - ...sanitizedFields, - insuranceProvider: "MassHealth", - }; - onHandleUpdatePatient(updatedPatientFields); - } else { - toast({ - title: "Error", - description: "Cannot update patient: Missing or invalid patient data", - variant: "destructive", - }); - } - // 3. Create Claim(if not) // Filter out empty service lines (empty procedureCode) const { uploadedFiles, insuranceSiteKey, npiProvider: _npi, ...formToCreateClaim } = form;