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
@@ -38,6 +38,7 @@ const z = __importStar(require("zod"));
const CommunicationChannel_schema_1 = require("../enums/CommunicationChannel.schema");
const CommunicationDirection_schema_1 = require("../enums/CommunicationDirection.schema");
const CommunicationStatus_schema_1 = require("../enums/CommunicationStatus.schema");
const CommunicationProvider_schema_1 = require("../enums/CommunicationProvider.schema");
const makeSchema = () => z.object({
id: z.number().int().optional(),
patientId: z.number().int(),
@@ -45,6 +46,7 @@ const makeSchema = () => z.object({
channel: CommunicationChannel_schema_1.CommunicationChannelSchema,
direction: CommunicationDirection_schema_1.CommunicationDirectionSchema,
status: CommunicationStatus_schema_1.CommunicationStatusSchema,
provider: CommunicationProvider_schema_1.CommunicationProviderSchema.optional(),
body: z.string().optional().nullable(),
callDuration: z.number().int().optional().nullable(),
twilioSid: z.string().optional().nullable(),