- Add 3-message intro (self-intro → empathetic ack → new/existing question) via single TwiML response to guarantee delivery order - Detect reschedule intent from first message; look up existing appointment date - New patient flow: ask insurance type → MassHealth consent → member ID + DOB → Selenium eligibility check - Post-eligibility: active → ask appointment date/time with office-hours validation; inactive → ask other insurance or collect contact info - Date/time collection mirrors reschedule flow: check office day open, ask time, validate against office hours - Auto-create appointment in schedule for known patients on confirmation; use first available staff member - Add openPhoneReply toggle (Settings → AI Chat) to respond to any number at any time - Add 5-minute inactivity timeout: reset conversation to initial stage and clear pending state - Normalize MassHealth DOB to zero-padded MM/DD/YYYY before Selenium submission - Expand isExistingPatient classifier to recognize "old patient", "old", "previous", "prior" - Existing patient confirmation message now acknowledges patient type before asking about insurance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
1.9 KiB
TypeScript
24 lines
1.9 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { SortOrderSchema } from '../enums/SortOrder.schema';
|
|
import { AiSettingsCountOrderByAggregateInputObjectSchema as AiSettingsCountOrderByAggregateInputObjectSchema } from './AiSettingsCountOrderByAggregateInput.schema';
|
|
import { AiSettingsAvgOrderByAggregateInputObjectSchema as AiSettingsAvgOrderByAggregateInputObjectSchema } from './AiSettingsAvgOrderByAggregateInput.schema';
|
|
import { AiSettingsMaxOrderByAggregateInputObjectSchema as AiSettingsMaxOrderByAggregateInputObjectSchema } from './AiSettingsMaxOrderByAggregateInput.schema';
|
|
import { AiSettingsMinOrderByAggregateInputObjectSchema as AiSettingsMinOrderByAggregateInputObjectSchema } from './AiSettingsMinOrderByAggregateInput.schema';
|
|
import { AiSettingsSumOrderByAggregateInputObjectSchema as AiSettingsSumOrderByAggregateInputObjectSchema } from './AiSettingsSumOrderByAggregateInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: SortOrderSchema.optional(),
|
|
userId: SortOrderSchema.optional(),
|
|
apiKey: SortOrderSchema.optional(),
|
|
afterHoursEnabled: SortOrderSchema.optional(),
|
|
openPhoneReply: SortOrderSchema.optional(),
|
|
_count: z.lazy(() => AiSettingsCountOrderByAggregateInputObjectSchema).optional(),
|
|
_avg: z.lazy(() => AiSettingsAvgOrderByAggregateInputObjectSchema).optional(),
|
|
_max: z.lazy(() => AiSettingsMaxOrderByAggregateInputObjectSchema).optional(),
|
|
_min: z.lazy(() => AiSettingsMinOrderByAggregateInputObjectSchema).optional(),
|
|
_sum: z.lazy(() => AiSettingsSumOrderByAggregateInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AiSettingsOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.AiSettingsOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.AiSettingsOrderByWithAggregationInput>;
|
|
export const AiSettingsOrderByWithAggregationInputObjectZodSchema = makeSchema();
|