feat: Tufts SCO service/preauth history, chat clear archives history, labeled ID/DOB detection

- AI chat Clear empties the chat box but archives the conversation in the per-user JSON file
- Chat bot detects Member ID/DOB pasted with labels ("Date of Birth ... Member ID ...")
- Tufts SCO (DentaQuest) eligibility saves the member's service history
- Tufts SCO Check PreAuth saves procedure lines (code, tooth, plan payment, status) to a
  new PatientPreauthHistory table, shown as Preauth History in Patient Details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 22:34:27 -05:00
co-authored by Claude Opus 5.5
parent 2352922089
commit 6c98f7f985
182 changed files with 4254 additions and 141 deletions
@@ -0,0 +1,25 @@
import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
import { PatientScalarRelationFilterObjectSchema as PatientScalarRelationFilterObjectSchema } from './PatientScalarRelationFilter.schema';
import { PatientWhereInputObjectSchema as PatientWhereInputObjectSchema } from './PatientWhereInput.schema'
const patientpreauthhistorywhereinputSchema = z.object({
AND: z.union([z.lazy(() => PatientPreauthHistoryWhereInputObjectSchema), z.lazy(() => PatientPreauthHistoryWhereInputObjectSchema).array()]).optional(),
OR: z.lazy(() => PatientPreauthHistoryWhereInputObjectSchema).array().optional(),
NOT: z.union([z.lazy(() => PatientPreauthHistoryWhereInputObjectSchema), z.lazy(() => PatientPreauthHistoryWhereInputObjectSchema).array()]).optional(),
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
patientId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
preAuthNumber: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
submittedCode: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
toothQuadArchSurface: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
paidAmount: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
status: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
patient: z.union([z.lazy(() => PatientScalarRelationFilterObjectSchema), z.lazy(() => PatientWhereInputObjectSchema)]).optional()
}).strict();
export const PatientPreauthHistoryWhereInputObjectSchema: z.ZodType<Prisma.PatientPreauthHistoryWhereInput> = patientpreauthhistorywhereinputSchema as unknown as z.ZodType<Prisma.PatientPreauthHistoryWhereInput>;
export const PatientPreauthHistoryWhereInputObjectZodSchema = patientpreauthhistorywhereinputSchema;