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
+12 -3
View File
@@ -11,6 +11,7 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
email: z.ZodOptional<z.ZodBoolean>;
address: z.ZodOptional<z.ZodBoolean>;
city: z.ZodOptional<z.ZodBoolean>;
state: z.ZodOptional<z.ZodBoolean>;
zipCode: z.ZodOptional<z.ZodBoolean>;
insuranceProvider: z.ZodOptional<z.ZodBoolean>;
insuranceId: z.ZodOptional<z.ZodBoolean>;
@@ -20,6 +21,8 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
medicalConditions: z.ZodOptional<z.ZodBoolean>;
preferredLanguage: z.ZodOptional<z.ZodBoolean>;
status: z.ZodOptional<z.ZodBoolean>;
remainingBenefit: z.ZodOptional<z.ZodBoolean>;
thirdPartyInsurance: z.ZodOptional<z.ZodBoolean>;
userId: z.ZodOptional<z.ZodBoolean>;
createdAt: z.ZodOptional<z.ZodBoolean>;
updatedAt: z.ZodOptional<z.ZodBoolean>;
@@ -50,6 +53,7 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
dateOfBirth?: boolean | undefined;
insuranceProvider?: boolean | undefined;
city?: boolean | undefined;
state?: boolean | undefined;
zipCode?: boolean | undefined;
cloudFolders?: boolean | undefined;
communications?: boolean | undefined;
@@ -63,6 +67,8 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
allergies?: boolean | undefined;
medicalConditions?: boolean | undefined;
preferredLanguage?: boolean | undefined;
remainingBenefit?: boolean | undefined;
thirdPartyInsurance?: boolean | undefined;
groups?: boolean | undefined;
documents?: boolean | undefined;
conversation?: boolean | undefined;
@@ -83,6 +89,7 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
dateOfBirth?: boolean | undefined;
insuranceProvider?: boolean | undefined;
city?: boolean | undefined;
state?: boolean | undefined;
zipCode?: boolean | undefined;
cloudFolders?: boolean | undefined;
communications?: boolean | undefined;
@@ -96,6 +103,8 @@ export declare const PatientFindFirstSelectZodSchema: z.ZodObject<{
allergies?: boolean | undefined;
medicalConditions?: boolean | undefined;
preferredLanguage?: boolean | undefined;
remainingBenefit?: boolean | undefined;
thirdPartyInsurance?: boolean | undefined;
groups?: boolean | undefined;
documents?: boolean | undefined;
conversation?: boolean | undefined;
@@ -110,7 +119,7 @@ export declare const PatientFindFirstZodSchema: z.ZodObject<{
cursor: z.ZodOptional<z.ZodType<Prisma.PatientWhereUniqueInput, z.ZodTypeDef, Prisma.PatientWhereUniqueInput>>;
take: z.ZodOptional<z.ZodNumber>;
skip: z.ZodOptional<z.ZodNumber>;
distinct: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["id", "firstName", "lastName", "dateOfBirth", "gender", "phone", "email", "address", "city", "zipCode", "insuranceProvider", "insuranceId", "groupNumber", "policyHolder", "allergies", "medicalConditions", "preferredLanguage", "status", "userId", "createdAt", "updatedAt"]>, 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">]>>;
distinct: z.ZodOptional<z.ZodUnion<[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"]>, 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">]>>;
}, "strict", z.ZodTypeAny, {
where?: Prisma.PatientWhereInput | undefined;
include?: Prisma.PatientInclude<import("../../generated/prisma/runtime/client").DefaultArgs> | undefined;
@@ -119,7 +128,7 @@ export declare const PatientFindFirstZodSchema: z.ZodObject<{
cursor?: Prisma.PatientWhereUniqueInput | undefined;
take?: number | undefined;
skip?: number | undefined;
distinct?: "status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage")[] | undefined;
distinct?: "status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance" | ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance")[] | undefined;
}, {
where?: Prisma.PatientWhereInput | undefined;
include?: Prisma.PatientInclude<import("../../generated/prisma/runtime/client").DefaultArgs> | undefined;
@@ -128,6 +137,6 @@ export declare const PatientFindFirstZodSchema: z.ZodObject<{
cursor?: Prisma.PatientWhereUniqueInput | undefined;
take?: number | undefined;
skip?: number | undefined;
distinct?: "status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage")[] | undefined;
distinct?: "status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance" | ("status" | "id" | "createdAt" | "userId" | "email" | "phone" | "updatedAt" | "dateOfBirth" | "insuranceProvider" | "city" | "state" | "zipCode" | "firstName" | "lastName" | "gender" | "address" | "insuranceId" | "groupNumber" | "policyHolder" | "allergies" | "medicalConditions" | "preferredLanguage" | "remainingBenefit" | "thirdPartyInsurance")[] | undefined;
}>;
//# sourceMappingURL=findFirstPatient.schema.d.ts.map