- Replace in-memory Maps in aiHandoffStore with DB-backed async functions using new patient_conversation table (stage + aiHandoff per patient) - Add afterHoursEnabled to ai_settings table (persists across restarts) - Fix runtime crash in reschedule-graph: mon/tue/wed variables were out of scope in the next-week fallback branch (ReferenceError) - Wire rescheduleGreeting and generalFallback chat templates through to LangGraph nodes so user-configured messages take effect - Add otherNode to reminder-graph to handle unclassified patient replies (e.g. "I want another appointment") and route to booking flow - Fetch chatTemplates once per webhook request instead of per stage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import * as z from 'zod';
|
|
export const PatientFindManyResultSchema = z.object({
|
|
data: z.array(z.object({
|
|
id: z.number().int(),
|
|
firstName: z.string(),
|
|
lastName: z.string(),
|
|
dateOfBirth: z.date().optional(),
|
|
gender: z.string(),
|
|
phone: z.string(),
|
|
email: z.string().optional(),
|
|
address: z.string().optional(),
|
|
city: z.string().optional(),
|
|
zipCode: z.string().optional(),
|
|
insuranceProvider: z.string().optional(),
|
|
insuranceId: z.string().optional(),
|
|
groupNumber: z.string().optional(),
|
|
policyHolder: z.string().optional(),
|
|
allergies: z.string().optional(),
|
|
medicalConditions: z.string().optional(),
|
|
preferredLanguage: z.string().optional(),
|
|
status: z.unknown(),
|
|
userId: z.number().int(),
|
|
createdAt: z.date(),
|
|
updatedAt: z.date(),
|
|
user: z.unknown(),
|
|
appointments: z.array(z.unknown()),
|
|
procedures: z.array(z.unknown()),
|
|
claims: z.array(z.unknown()),
|
|
groups: z.array(z.unknown()),
|
|
payment: z.array(z.unknown()),
|
|
communications: z.array(z.unknown()),
|
|
documents: z.array(z.unknown()),
|
|
conversation: z.unknown().optional()
|
|
})),
|
|
pagination: z.object({
|
|
page: z.number().int().min(1),
|
|
pageSize: z.number().int().min(1),
|
|
total: z.number().int().min(0),
|
|
totalPages: z.number().int().min(0),
|
|
hasNext: z.boolean(),
|
|
hasPrev: z.boolean()
|
|
})
|
|
}); |