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

@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.ClaimScalarWhereWithAggregatesInputObjectZodSchema = exports.ClaimScalarWhereWithAggregatesInputObjectSchema = void 0;
const z = __importStar(require("zod"));
const IntWithAggregatesFilter_schema_1 = require("./IntWithAggregatesFilter.schema");
const IntNullableWithAggregatesFilter_schema_1 = require("./IntNullableWithAggregatesFilter.schema");
const StringWithAggregatesFilter_schema_1 = require("./StringWithAggregatesFilter.schema");
const DateTimeWithAggregatesFilter_schema_1 = require("./DateTimeWithAggregatesFilter.schema");
const EnumMissingTeethStatusWithAggregatesFilter_schema_1 = require("./EnumMissingTeethStatusWithAggregatesFilter.schema");
@@ -44,14 +45,13 @@ const JsonNullableWithAggregatesFilter_schema_1 = require("./JsonNullableWithAgg
const EnumClaimStatusWithAggregatesFilter_schema_1 = require("./EnumClaimStatusWithAggregatesFilter.schema");
const ClaimStatus_schema_1 = require("../enums/ClaimStatus.schema");
const StringNullableWithAggregatesFilter_schema_1 = require("./StringNullableWithAggregatesFilter.schema");
const IntNullableWithAggregatesFilter_schema_1 = require("./IntNullableWithAggregatesFilter.schema");
const claimscalarwherewithaggregatesinputSchema = z.object({
AND: z.union([z.lazy(() => exports.ClaimScalarWhereWithAggregatesInputObjectSchema), z.lazy(() => exports.ClaimScalarWhereWithAggregatesInputObjectSchema).array()]).optional(),
OR: z.lazy(() => exports.ClaimScalarWhereWithAggregatesInputObjectSchema).array().optional(),
NOT: z.union([z.lazy(() => exports.ClaimScalarWhereWithAggregatesInputObjectSchema), z.lazy(() => exports.ClaimScalarWhereWithAggregatesInputObjectSchema).array()]).optional(),
id: z.union([z.lazy(() => IntWithAggregatesFilter_schema_1.IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
patientId: z.union([z.lazy(() => IntWithAggregatesFilter_schema_1.IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
appointmentId: z.union([z.lazy(() => IntWithAggregatesFilter_schema_1.IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
appointmentId: z.union([z.lazy(() => IntNullableWithAggregatesFilter_schema_1.IntNullableWithAggregatesFilterObjectSchema), z.number().int().int()]).optional().nullable(),
userId: z.union([z.lazy(() => IntWithAggregatesFilter_schema_1.IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
staffId: z.union([z.lazy(() => IntWithAggregatesFilter_schema_1.IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
patientName: z.union([z.lazy(() => StringWithAggregatesFilter_schema_1.StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
@@ -66,6 +66,7 @@ const claimscalarwherewithaggregatesinputSchema = z.object({
updatedAt: z.union([z.lazy(() => DateTimeWithAggregatesFilter_schema_1.DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
status: z.union([z.lazy(() => EnumClaimStatusWithAggregatesFilter_schema_1.EnumClaimStatusWithAggregatesFilterObjectSchema), ClaimStatus_schema_1.ClaimStatusSchema]).optional(),
claimNumber: z.union([z.lazy(() => StringNullableWithAggregatesFilter_schema_1.StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
preAuthNumber: z.union([z.lazy(() => StringNullableWithAggregatesFilter_schema_1.StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
npiProviderId: z.union([z.lazy(() => IntNullableWithAggregatesFilter_schema_1.IntNullableWithAggregatesFilterObjectSchema), z.number().int()]).optional().nullable()
}).strict();
exports.ClaimScalarWhereWithAggregatesInputObjectSchema = claimscalarwherewithaggregatesinputSchema;