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:
@@ -43,6 +43,8 @@ const ClaimCreateNestedManyWithoutPatientInput_schema_1 = require("./ClaimCreate
|
||||
const PdfGroupCreateNestedManyWithoutPatientInput_schema_1 = require("./PdfGroupCreateNestedManyWithoutPatientInput.schema");
|
||||
const PaymentCreateNestedManyWithoutPatientInput_schema_1 = require("./PaymentCreateNestedManyWithoutPatientInput.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(),
|
||||
procedures: z.lazy(() => AppointmentProcedureCreateNestedManyWithoutPatientInput_schema_1.AppointmentProcedureCreateNestedManyWithoutPatientInputObjectSchema).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(),
|
||||
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.PatientCreateWithoutCommunicationsInputObjectSchema = makeSchema();
|
||||
exports.PatientCreateWithoutCommunicationsInputObjectZodSchema = makeSchema();
|
||||
|
||||
Reference in New Issue
Block a user