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
+3 -3
View File
@@ -7,14 +7,14 @@ export declare const PatientGroupByZodSchema: z.ZodObject<{
having: z.ZodOptional<z.ZodType<Prisma.PatientScalarWhereWithAggregatesInput, z.ZodTypeDef, Prisma.PatientScalarWhereWithAggregatesInput>>;
take: z.ZodOptional<z.ZodNumber>;
skip: z.ZodOptional<z.ZodNumber>;
by: z.ZodArray<z.ZodEnum<["id", "firstName", "lastName", "dateOfBirth", "gender", "phone", "email", "address", "city", "zipCode", "insuranceProvider", "insuranceId", "groupNumber", "policyHolder", "allergies", "medicalConditions", "preferredLanguage", "status", "userId", "createdAt", "updatedAt"]>, "many">;
by: z.ZodArray<z.ZodEnum<["id", "firstName", "lastName", "dateOfBirth", "gender", "phone", "email", "address", "city", "state", "zipCode", "insuranceProvider", "insuranceId", "groupNumber", "policyHolder", "allergies", "medicalConditions", "preferredLanguage", "status", "remainingBenefit", "thirdPartyInsurance", "userId", "createdAt", "updatedAt"]>, "many">;
_count: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<true>, z.ZodType<Prisma.PatientCountAggregateInputType, z.ZodTypeDef, Prisma.PatientCountAggregateInputType>]>>;
_min: z.ZodOptional<z.ZodType<Prisma.PatientMinAggregateInputType, z.ZodTypeDef, Prisma.PatientMinAggregateInputType>>;
_max: z.ZodOptional<z.ZodType<Prisma.PatientMaxAggregateInputType, z.ZodTypeDef, Prisma.PatientMaxAggregateInputType>>;
_avg: z.ZodOptional<z.ZodType<Prisma.PatientAvgAggregateInputType, z.ZodTypeDef, Prisma.PatientAvgAggregateInputType>>;
_sum: z.ZodOptional<z.ZodType<Prisma.PatientSumAggregateInputType, z.ZodTypeDef, Prisma.PatientSumAggregateInputType>>;
}, "strict", z.ZodTypeAny, {
by: ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage")[];
by: ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance")[];
where?: Prisma.PatientWhereInput | undefined;
_count?: true | Prisma.PatientCountAggregateInputType | undefined;
orderBy?: Prisma.PatientOrderByWithAggregationInput | Prisma.PatientOrderByWithAggregationInput[] | undefined;
@@ -26,7 +26,7 @@ export declare const PatientGroupByZodSchema: z.ZodObject<{
_sum?: Prisma.PatientSumAggregateInputType | undefined;
having?: Prisma.PatientScalarWhereWithAggregatesInput | undefined;
}, {
by: ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage")[];
by: ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance")[];
where?: Prisma.PatientWhereInput | undefined;
_count?: true | Prisma.PatientCountAggregateInputType | undefined;
orderBy?: Prisma.PatientOrderByWithAggregationInput | Prisma.PatientOrderByWithAggregationInput[] | undefined;