fix: allow claims without appointment + support post/core multi-tooth input

- Make appointmentId nullable/optional in Prisma Zod schema via @zod rich
  comment so claims can be submitted without an existing appointment
- Convert undefined appointmentId to null in all claim form handlers and
  the backend claim creation endpoint
- Add AI classifier rule for expanding one procedure across multiple
  comma-separated tooth numbers (e.g. "post/core on #23, 24, 25, 26")
- Add "post/core" (slash) alias to CDT lookup maps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 22:57:24 -04:00
parent c9d08028a9
commit e1fe4862d5
1613 changed files with 59200 additions and 422 deletions

View File

@@ -43,6 +43,8 @@ const PdfGroupCreateNestedManyWithoutPatientInput_schema_1 = require("./PdfGroup
const PaymentCreateNestedManyWithoutPatientInput_schema_1 = require("./PaymentCreateNestedManyWithoutPatientInput.schema");
const CommunicationCreateNestedManyWithoutPatientInput_schema_1 = require("./CommunicationCreateNestedManyWithoutPatientInput.schema");
const PatientDocumentCreateNestedManyWithoutPatientInput_schema_1 = require("./PatientDocumentCreateNestedManyWithoutPatientInput.schema");
const PatientConversationCreateNestedOneWithoutPatientInput_schema_1 = require("./PatientConversationCreateNestedOneWithoutPatientInput.schema");
const CloudFolderCreateNestedManyWithoutPatientInput_schema_1 = require("./CloudFolderCreateNestedManyWithoutPatientInput.schema");
const makeSchema = () => z.object({
firstName: z.string(),
lastName: z.string(),
@@ -59,15 +61,19 @@ const makeSchema = () => z.object({
policyHolder: z.string().optional().nullable(),
allergies: z.string().optional().nullable(),
medicalConditions: z.string().optional().nullable(),
preferredLanguage: z.string().optional().nullable(),
status: PatientStatus_schema_1.PatientStatusSchema.optional(),
createdAt: z.coerce.date().optional(),
updatedAt: z.coerce.date().optional(),
user: z.lazy(() => UserCreateNestedOneWithoutPatientsInput_schema_1.UserCreateNestedOneWithoutPatientsInputObjectSchema),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutPatientInput_schema_1.AppointmentCreateNestedManyWithoutPatientInputObjectSchema).optional(),
claims: z.lazy(() => ClaimCreateNestedManyWithoutPatientInput_schema_1.ClaimCreateNestedManyWithoutPatientInputObjectSchema).optional(),
groups: z.lazy(() => PdfGroupCreateNestedManyWithoutPatientInput_schema_1.PdfGroupCreateNestedManyWithoutPatientInputObjectSchema).optional(),
payment: z.lazy(() => PaymentCreateNestedManyWithoutPatientInput_schema_1.PaymentCreateNestedManyWithoutPatientInputObjectSchema).optional(),
communications: z.lazy(() => CommunicationCreateNestedManyWithoutPatientInput_schema_1.CommunicationCreateNestedManyWithoutPatientInputObjectSchema).optional(),
documents: z.lazy(() => PatientDocumentCreateNestedManyWithoutPatientInput_schema_1.PatientDocumentCreateNestedManyWithoutPatientInputObjectSchema).optional()
documents: z.lazy(() => PatientDocumentCreateNestedManyWithoutPatientInput_schema_1.PatientDocumentCreateNestedManyWithoutPatientInputObjectSchema).optional(),
conversation: z.lazy(() => PatientConversationCreateNestedOneWithoutPatientInput_schema_1.PatientConversationCreateNestedOneWithoutPatientInputObjectSchema).optional(),
cloudFolders: z.lazy(() => CloudFolderCreateNestedManyWithoutPatientInput_schema_1.CloudFolderCreateNestedManyWithoutPatientInputObjectSchema).optional()
}).strict();
exports.PatientCreateWithoutProceduresInputObjectSchema = makeSchema();
exports.PatientCreateWithoutProceduresInputObjectZodSchema = makeSchema();