fix: allow letters in insurance ID; add patient state (default MA)

- Backend insurance ID check now accepts letters + digits (BCBS IDs have
  a letter prefix), matching the frontend schema; create route validates
  the normalized body
- Patient.state column (default "MA") with State select on the patient
  form; ADA claim form uses the patient's state instead of the office's
- Rebuild stale packages/db compiled .js so the runtime schemas include
  new fields (state, office billing NPI fields, Telnyx settings)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 23:29:27 -04:00
co-authored by Claude Opus 5.5
parent 2c0c595af5
commit 1abc2c705d
664 changed files with 6263 additions and 843 deletions
@@ -9,6 +9,7 @@ export declare const PatientModelSchema: z.ZodObject<{
email: z.ZodNullable<z.ZodString>;
address: z.ZodNullable<z.ZodString>;
city: z.ZodNullable<z.ZodString>;
state: z.ZodNullable<z.ZodString>;
zipCode: z.ZodNullable<z.ZodString>;
insuranceProvider: z.ZodNullable<z.ZodString>;
insuranceId: z.ZodNullable<z.ZodString>;
@@ -18,6 +19,8 @@ export declare const PatientModelSchema: z.ZodObject<{
medicalConditions: z.ZodNullable<z.ZodString>;
preferredLanguage: z.ZodNullable<z.ZodString>;
status: z.ZodEnum<["ACTIVE", "INACTIVE", "UNKNOWN", "PLAN_NOT_ACCEPTED"]>;
remainingBenefit: z.ZodNullable<z.ZodString>;
thirdPartyInsurance: z.ZodNullable<z.ZodString>;
userId: z.ZodNumber;
createdAt: z.ZodDate;
updatedAt: z.ZodDate;
@@ -46,6 +49,7 @@ export declare const PatientModelSchema: z.ZodObject<{
dateOfBirth: Date | null;
insuranceProvider: string | null;
city: string | null;
state: string | null;
zipCode: string | null;
cloudFolders: unknown[];
communications: unknown[];
@@ -59,6 +63,8 @@ export declare const PatientModelSchema: z.ZodObject<{
allergies: string | null;
medicalConditions: string | null;
preferredLanguage: string | null;
remainingBenefit: string | null;
thirdPartyInsurance: string | null;
groups: unknown[];
documents: unknown[];
user?: unknown;
@@ -78,6 +84,7 @@ export declare const PatientModelSchema: z.ZodObject<{
dateOfBirth: Date | null;
insuranceProvider: string | null;
city: string | null;
state: string | null;
zipCode: string | null;
cloudFolders: unknown[];
communications: unknown[];
@@ -91,6 +98,8 @@ export declare const PatientModelSchema: z.ZodObject<{
allergies: string | null;
medicalConditions: string | null;
preferredLanguage: string | null;
remainingBenefit: string | null;
thirdPartyInsurance: string | null;
groups: unknown[];
documents: unknown[];
user?: unknown;