- 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>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import * as z from 'zod';
|
|
import { MissingTeethStatusSchema } from '../../enums/MissingTeethStatus.schema';
|
|
import { ClaimStatusSchema } from '../../enums/ClaimStatus.schema';
|
|
// prettier-ignore
|
|
export const ClaimModelSchema = z.object({
|
|
id: z.number().int(),
|
|
patientId: z.number().int(),
|
|
appointmentId: z.number().int().int().nullable(),
|
|
userId: z.number().int(),
|
|
staffId: z.number().int(),
|
|
patientName: z.string(),
|
|
memberId: z.string(),
|
|
dateOfBirth: z.date(),
|
|
remarks: z.string(),
|
|
missingTeethStatus: MissingTeethStatusSchema,
|
|
missingTeeth: z.unknown().nullable(),
|
|
serviceDate: z.date(),
|
|
insuranceProvider: z.string(),
|
|
createdAt: z.date(),
|
|
updatedAt: z.date(),
|
|
status: ClaimStatusSchema,
|
|
claimNumber: z.string().nullable(),
|
|
preAuthNumber: z.string().nullable(),
|
|
npiProviderId: z.number().int().nullable(),
|
|
patient: z.unknown(),
|
|
appointment: z.unknown().nullable(),
|
|
user: z.unknown().nullable(),
|
|
staff: z.unknown().nullable(),
|
|
npiProvider: z.unknown().nullable(),
|
|
serviceLines: z.array(z.unknown()),
|
|
claimFiles: z.array(z.unknown()),
|
|
payment: z.unknown().nullable()
|
|
}).strict();
|
|
|
|
export type ClaimPureType = z.infer<typeof ClaimModelSchema>;
|