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:
@@ -38,6 +38,7 @@ const z = __importStar(require("zod"));
|
||||
const PatientStatus_schema_1 = require("../enums/PatientStatus.schema");
|
||||
const AppointmentProcedureUncheckedCreateNestedManyWithoutAppointmentInput_schema_1 = require("./AppointmentProcedureUncheckedCreateNestedManyWithoutAppointmentInput.schema");
|
||||
const ClaimUncheckedCreateNestedManyWithoutAppointmentInput_schema_1 = require("./ClaimUncheckedCreateNestedManyWithoutAppointmentInput.schema");
|
||||
const AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInput_schema_1 = require("./AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInput.schema");
|
||||
const makeSchema = () => z.object({
|
||||
id: z.number().int().optional(),
|
||||
patientId: z.number().int(),
|
||||
@@ -47,13 +48,16 @@ const makeSchema = () => z.object({
|
||||
startTime: z.string(),
|
||||
endTime: z.string(),
|
||||
type: z.string(),
|
||||
typeLocked: z.boolean().optional(),
|
||||
notes: z.string().optional().nullable(),
|
||||
procedureCodeNotes: z.string().optional().nullable(),
|
||||
status: z.string().optional(),
|
||||
movedByAi: z.boolean().optional(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
eligibilityStatus: PatientStatus_schema_1.PatientStatusSchema.optional(),
|
||||
procedures: z.lazy(() => AppointmentProcedureUncheckedCreateNestedManyWithoutAppointmentInput_schema_1.AppointmentProcedureUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional(),
|
||||
claims: z.lazy(() => ClaimUncheckedCreateNestedManyWithoutAppointmentInput_schema_1.ClaimUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional()
|
||||
claims: z.lazy(() => ClaimUncheckedCreateNestedManyWithoutAppointmentInput_schema_1.ClaimUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional(),
|
||||
files: z.lazy(() => AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInput_schema_1.AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional()
|
||||
}).strict();
|
||||
exports.AppointmentUncheckedCreateWithoutUserInputObjectSchema = makeSchema();
|
||||
exports.AppointmentUncheckedCreateWithoutUserInputObjectZodSchema = makeSchema();
|
||||
|
||||
Reference in New Issue
Block a user