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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
// 3. Create Claim(if not)
|
||||||
// Filter out empty service lines (empty procedureCode)
|
// Filter out empty service lines (empty procedureCode)
|
||||||
const {
|
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)
|
// 3. Create Claim(if not)
|
||||||
// Filter out empty service lines (empty procedureCode)
|
// Filter out empty service lines (empty procedureCode)
|
||||||
const { uploadedFiles, insuranceSiteKey, npiProvider: _npi, ...formToCreateClaim } = form;
|
const { uploadedFiles, insuranceSiteKey, npiProvider: _npi, ...formToCreateClaim } = form;
|
||||||
|
|||||||
Reference in New Issue
Block a user