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 PatientInputSchema: z.ZodObject<{
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
state: z.ZodNullable<z.ZodOptional<z.ZodString>>;
zipCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
insuranceProvider: z.ZodNullable<z.ZodOptional<z.ZodString>>;
insuranceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -18,6 +19,8 @@ export declare const PatientInputSchema: z.ZodObject<{
medicalConditions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
preferredLanguage: z.ZodNullable<z.ZodOptional<z.ZodString>>;
status: z.ZodEnum<["ACTIVE", "INACTIVE", "UNKNOWN", "PLAN_NOT_ACCEPTED"]>;
remainingBenefit: z.ZodNullable<z.ZodOptional<z.ZodString>>;
thirdPartyInsurance: z.ZodNullable<z.ZodOptional<z.ZodString>>;
userId: z.ZodNumber;
createdAt: z.ZodDate;
updatedAt: z.ZodDate;
@@ -54,6 +57,7 @@ export declare const PatientInputSchema: z.ZodObject<{
dateOfBirth?: Date | null | undefined;
insuranceProvider?: string | null | undefined;
city?: string | null | undefined;
state?: string | null | undefined;
zipCode?: string | null | undefined;
address?: string | null | undefined;
insuranceId?: string | null | undefined;
@@ -62,6 +66,8 @@ export declare const PatientInputSchema: z.ZodObject<{
allergies?: string | null | undefined;
medicalConditions?: string | null | undefined;
preferredLanguage?: string | null | undefined;
remainingBenefit?: string | null | undefined;
thirdPartyInsurance?: string | null | undefined;
conversation?: unknown;
}, {
status: "ACTIVE" | "INACTIVE" | "UNKNOWN" | "PLAN_NOT_ACCEPTED";
@@ -86,6 +92,7 @@ export declare const PatientInputSchema: z.ZodObject<{
dateOfBirth?: Date | null | undefined;
insuranceProvider?: string | null | undefined;
city?: string | null | undefined;
state?: string | null | undefined;
zipCode?: string | null | undefined;
address?: string | null | undefined;
insuranceId?: string | null | undefined;
@@ -94,6 +101,8 @@ export declare const PatientInputSchema: z.ZodObject<{
allergies?: string | null | undefined;
medicalConditions?: string | null | undefined;
preferredLanguage?: string | null | undefined;
remainingBenefit?: string | null | undefined;
thirdPartyInsurance?: string | null | undefined;
conversation?: unknown;
}>;
export type PatientInputType = z.infer<typeof PatientInputSchema>;