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
@@ -45,6 +45,7 @@ exports.PatientGroupByResultSchema = z.array(z.object({
email: z.string(),
address: z.string(),
city: z.string(),
state: z.string(),
zipCode: z.string(),
insuranceProvider: z.string(),
insuranceId: z.string(),
@@ -53,6 +54,8 @@ exports.PatientGroupByResultSchema = z.array(z.object({
allergies: z.string(),
medicalConditions: z.string(),
preferredLanguage: z.string(),
remainingBenefit: z.string(),
thirdPartyInsurance: z.string(),
userId: z.number().int(),
createdAt: z.date(),
updatedAt: z.date(),
@@ -66,6 +69,7 @@ exports.PatientGroupByResultSchema = z.array(z.object({
email: z.number(),
address: z.number(),
city: z.number(),
state: z.number(),
zipCode: z.number(),
insuranceProvider: z.number(),
insuranceId: z.number(),
@@ -75,6 +79,8 @@ exports.PatientGroupByResultSchema = z.array(z.object({
medicalConditions: z.number(),
preferredLanguage: z.number(),
status: z.number(),
remainingBenefit: z.number(),
thirdPartyInsurance: z.number(),
userId: z.number(),
createdAt: z.number(),
updatedAt: z.number(),
@@ -107,6 +113,7 @@ exports.PatientGroupByResultSchema = z.array(z.object({
email: z.string().nullable(),
address: z.string().nullable(),
city: z.string().nullable(),
state: z.string().nullable(),
zipCode: z.string().nullable(),
insuranceProvider: z.string().nullable(),
insuranceId: z.string().nullable(),
@@ -115,6 +122,8 @@ exports.PatientGroupByResultSchema = z.array(z.object({
allergies: z.string().nullable(),
medicalConditions: z.string().nullable(),
preferredLanguage: z.string().nullable(),
remainingBenefit: z.string().nullable(),
thirdPartyInsurance: z.string().nullable(),
userId: z.number().int().nullable(),
createdAt: z.date().nullable(),
updatedAt: z.date().nullable()
@@ -129,6 +138,7 @@ exports.PatientGroupByResultSchema = z.array(z.object({
email: z.string().nullable(),
address: z.string().nullable(),
city: z.string().nullable(),
state: z.string().nullable(),
zipCode: z.string().nullable(),
insuranceProvider: z.string().nullable(),
insuranceId: z.string().nullable(),
@@ -137,6 +147,8 @@ exports.PatientGroupByResultSchema = z.array(z.object({
allergies: z.string().nullable(),
medicalConditions: z.string().nullable(),
preferredLanguage: z.string().nullable(),
remainingBenefit: z.string().nullable(),
thirdPartyInsurance: z.string().nullable(),
userId: z.number().int().nullable(),
createdAt: z.date().nullable(),
updatedAt: z.date().nullable()