feat: add Lab RX feature with template management and auto-seed defaults

- New lab_rx_template table with sortOrder and Prisma migrations
- Backend CRUD + reorder routes at /api/lab-rx/templates
- Auto-seeds 3 Highland Dental Studio defaults on first use per user
- LabRxModal: template picker, inline rename, up/down reorder, full
  template form with sections (Template Name / Lab Info / Case Details)
- RX popup: Tooth Number, Shade, Due Date, Doctor (from NPI providers),
  Instructions pre-filled with "Please make / Thank you!", print output
- lab-rx-templates.ts config file for future git-managed additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 23:20:44 -04:00
co-authored by Claude Sonnet 4.6
parent ac4d8c4c74
commit abb2a0ac96
908 changed files with 4858 additions and 14271 deletions
@@ -1,8 +0,0 @@
/**
* Schema Variants Index
* Auto-generated - do not edit manually
*/
export * from './pure';
export * from './input';
export * from './result';
@@ -1,22 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AiSettingsInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
apiKey: z.string(),
aiEnabled: z.boolean(),
openAiKey: z.string(),
openAiEnabled: z.boolean(),
claudeAiKey: z.string(),
claudeAiEnabled: z.boolean(),
claudeAiModel: z.string(),
openAiModel: z.string(),
googleAiModel: z.string(),
dentalMgmtKey: z.string(),
dentalMgmtEnabled: z.boolean(),
afterHoursEnabled: z.boolean(),
openPhoneReply: z.boolean(),
user: z.unknown()
}).strict();
export type AiSettingsInputType = z.infer<typeof AiSettingsInputSchema>;
@@ -1,29 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const AppointmentInputSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
staffId: z.number().int(),
title: z.string(),
date: z.date(),
startTime: z.string(),
endTime: z.string(),
type: z.string(),
typeLocked: z.boolean(),
notes: z.string().optional().nullable(),
procedureCodeNotes: z.string().optional().nullable(),
status: z.string(),
movedByAi: z.boolean(),
createdAt: z.date(),
eligibilityStatus: PatientStatusSchema,
patient: z.unknown(),
user: z.unknown(),
staff: z.unknown().optional().nullable(),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
files: z.array(z.unknown())
}).strict();
export type AppointmentInputType = z.infer<typeof AppointmentInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AppointmentFileInputSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
filename: z.string(),
mimeType: z.string().optional().nullable(),
filePath: z.string().optional().nullable(),
appointment: z.unknown()
}).strict();
export type AppointmentFileInputType = z.infer<typeof AppointmentFileInputSchema>;
@@ -1,24 +0,0 @@
import * as z from 'zod';
import { ProcedureSourceSchema } from '../../enums/ProcedureSource.schema';
// prettier-ignore
export const AppointmentProcedureInputSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
patientId: z.number().int(),
npiProviderId: z.number().int().optional().nullable(),
procedureCode: z.string(),
procedureLabel: z.string().optional().nullable(),
fee: z.number().optional().nullable(),
category: z.string().optional().nullable(),
toothNumber: z.string().optional().nullable(),
toothSurface: z.string().optional().nullable(),
oralCavityArea: z.string().optional().nullable(),
source: ProcedureSourceSchema,
comboKey: z.string().optional().nullable(),
createdAt: z.date(),
appointment: z.unknown(),
patient: z.unknown(),
npiProvider: z.unknown().optional().nullable()
}).strict();
export type AppointmentProcedureInputType = z.infer<typeof AppointmentProcedureInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const BackupDestinationInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
path: z.string(),
isActive: z.boolean(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type BackupDestinationInputType = z.infer<typeof BackupDestinationInputSchema>;
@@ -1,35 +0,0 @@
import * as z from 'zod';
import { MissingTeethStatusSchema } from '../../enums/MissingTeethStatus.schema';
import { ClaimStatusSchema } from '../../enums/ClaimStatus.schema';
// prettier-ignore
export const ClaimInputSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
appointmentId: z.number().int().int().optional().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().optional().nullable(),
serviceDate: z.date(),
insuranceProvider: z.string(),
createdAt: z.date(),
updatedAt: z.date(),
status: ClaimStatusSchema,
claimNumber: z.string().optional().nullable(),
preAuthNumber: z.string().optional().nullable(),
npiProviderId: z.number().int().optional().nullable(),
patient: z.unknown(),
appointment: z.unknown().optional().nullable(),
user: z.unknown().optional().nullable(),
staff: z.unknown().optional().nullable(),
npiProvider: z.unknown().optional().nullable(),
serviceLines: z.array(z.unknown()),
claimFiles: z.array(z.unknown()),
payment: z.unknown().optional().nullable()
}).strict();
export type ClaimInputType = z.infer<typeof ClaimInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ClaimFileInputSchema = z.object({
id: z.number().int(),
claimId: z.number().int(),
filename: z.string(),
mimeType: z.string(),
filePath: z.string().optional().nullable(),
claim: z.unknown()
}).strict();
export type ClaimFileInputType = z.infer<typeof ClaimFileInputSchema>;
@@ -1,20 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
mimeType: z.string().optional().nullable(),
fileSize: z.bigint(),
folderId: z.number().int().optional().nullable(),
isComplete: z.boolean(),
totalChunks: z.number().int().optional().nullable(),
diskPath: z.string().optional().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
folder: z.unknown().optional().nullable(),
chunks: z.array(z.unknown())
}).strict();
export type CloudFileInputType = z.infer<typeof CloudFileInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileChunkInputSchema = z.object({
id: z.number().int(),
fileId: z.number().int(),
seq: z.number().int(),
data: z.instanceof(Uint8Array),
createdAt: z.date(),
file: z.unknown()
}).strict();
export type CloudFileChunkInputType = z.infer<typeof CloudFileChunkInputSchema>;
@@ -1,18 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFolderInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
parentId: z.number().int().optional().nullable(),
patientId: z.number().int().optional().nullable(),
parent: z.unknown().optional().nullable(),
children: z.array(z.unknown()),
user: z.unknown(),
patient: z.unknown().optional().nullable(),
files: z.array(z.unknown()),
createdAt: z.date(),
updatedAt: z.date()
}).strict();
export type CloudFolderInputType = z.infer<typeof CloudFolderInputSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchInputSchema = z.object({
id: z.number().int(),
npiProviderId: z.number().int(),
totalCollection: z.number(),
commissionAmount: z.number(),
notes: z.string().optional().nullable(),
createdAt: z.date(),
npiProvider: z.unknown(),
items: z.array(z.unknown())
}).strict();
export type CommissionBatchInputType = z.infer<typeof CommissionBatchInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchItemInputSchema = z.object({
id: z.number().int(),
commissionBatchId: z.number().int(),
paymentId: z.number().int(),
collectionAmount: z.number(),
commissionBatch: z.unknown(),
payment: z.unknown()
}).strict();
export type CommissionBatchItemInputType = z.infer<typeof CommissionBatchItemInputSchema>;
@@ -1,21 +0,0 @@
import * as z from 'zod';
import { CommunicationChannelSchema } from '../../enums/CommunicationChannel.schema';
import { CommunicationDirectionSchema } from '../../enums/CommunicationDirection.schema';
import { CommunicationStatusSchema } from '../../enums/CommunicationStatus.schema';
// prettier-ignore
export const CommunicationInputSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int().optional().nullable(),
channel: CommunicationChannelSchema,
direction: CommunicationDirectionSchema,
status: CommunicationStatusSchema,
body: z.string().optional().nullable(),
callDuration: z.number().int().optional().nullable(),
twilioSid: z.string().optional().nullable(),
createdAt: z.date(),
patient: z.unknown(),
user: z.unknown().optional().nullable()
}).strict();
export type CommunicationInputType = z.infer<typeof CommunicationInputSchema>;
@@ -1,13 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CronJobLogInputSchema = z.object({
id: z.number().int(),
jobName: z.string(),
status: z.string(),
startedAt: z.date(),
completedAt: z.date().optional().nullable(),
durationMs: z.number().int().optional().nullable(),
errorMessage: z.string().optional().nullable()
}).strict();
export type CronJobLogInputType = z.infer<typeof CronJobLogInputSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const DatabaseBackupInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type DatabaseBackupInputType = z.infer<typeof DatabaseBackupInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceContactInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
phoneNumber: z.string().optional().nullable(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type InsuranceContactInputType = z.infer<typeof InsuranceContactInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceCredentialInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
siteKey: z.string(),
username: z.string(),
password: z.string(),
user: z.unknown()
}).strict();
export type InsuranceCredentialInputType = z.infer<typeof InsuranceCredentialInputSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { NotificationTypesSchema } from '../../enums/NotificationTypes.schema';
// prettier-ignore
export const NotificationInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
type: NotificationTypesSchema,
message: z.string(),
createdAt: z.date(),
read: z.boolean(),
user: z.unknown()
}).strict();
export type NotificationInputType = z.infer<typeof NotificationInputSchema>;
@@ -1,17 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const NpiProviderInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
npiNumber: z.string(),
providerName: z.string(),
sortOrder: z.number().int(),
createdAt: z.date(),
user: z.unknown(),
claims: z.array(z.unknown()),
payments: z.array(z.unknown()),
commissionBatches: z.array(z.unknown()),
appointmentProcedures: z.array(z.unknown())
}).strict();
export type NpiProviderInputType = z.infer<typeof NpiProviderInputSchema>;
@@ -1,19 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeContactInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
officeName: z.string().optional().nullable(),
receptionistName: z.string().optional().nullable(),
dentistName: z.string().optional().nullable(),
phoneNumber: z.string().optional().nullable(),
email: z.string().optional().nullable(),
fax: z.string().optional().nullable(),
streetAddress: z.string().optional().nullable(),
city: z.string().optional().nullable(),
state: z.string().optional().nullable(),
zipCode: z.string().optional().nullable(),
user: z.unknown()
}).strict();
export type OfficeContactInputType = z.infer<typeof OfficeContactInputSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeHoursInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type OfficeHoursInputType = z.infer<typeof OfficeHoursInputSchema>;
@@ -1,38 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const PatientInputSchema = z.object({
id: z.number().int(),
firstName: z.string(),
lastName: z.string(),
dateOfBirth: z.date().optional().nullable(),
gender: z.string(),
phone: z.string(),
email: z.string().optional().nullable(),
address: z.string().optional().nullable(),
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable(),
insuranceProvider: z.string().optional().nullable(),
insuranceId: z.string().optional().nullable(),
groupNumber: z.string().optional().nullable(),
policyHolder: z.string().optional().nullable(),
allergies: z.string().optional().nullable(),
medicalConditions: z.string().optional().nullable(),
preferredLanguage: z.string().optional().nullable(),
status: PatientStatusSchema,
userId: z.number().int(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
appointments: z.array(z.unknown()),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
groups: z.array(z.unknown()),
payment: z.array(z.unknown()),
communications: z.array(z.unknown()),
documents: z.array(z.unknown()),
conversation: z.unknown().optional().nullable(),
cloudFolders: z.array(z.unknown())
}).strict();
export type PatientInputType = z.infer<typeof PatientInputSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientConversationInputSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
stage: z.string(),
aiHandoff: z.boolean(),
updatedAt: z.date(),
patient: z.unknown(),
user: z.unknown()
}).strict();
export type PatientConversationInputType = z.infer<typeof PatientConversationInputSchema>;
@@ -1,16 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientDocumentInputSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
filename: z.string(),
originalName: z.string(),
mimeType: z.string(),
fileSize: z.bigint(),
filePath: z.string(),
uploadedAt: z.date(),
updatedAt: z.date(),
patient: z.unknown()
}).strict();
export type PatientDocumentInputType = z.infer<typeof PatientDocumentInputSchema>;
@@ -1,32 +0,0 @@
import * as z from 'zod';
import { PaymentStatusSchema } from '../../enums/PaymentStatus.schema';
// prettier-ignore
export const PaymentInputSchema = z.object({
id: z.number().int(),
claimId: z.number().int().optional().nullable(),
patientId: z.number().int(),
userId: z.number().int(),
updatedById: z.number().int().optional().nullable(),
npiProviderId: z.number().int().optional().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
mhPaidAmount: z.number().optional().nullable(),
copayment: z.number(),
adjustment: z.number(),
status: PaymentStatusSchema,
notes: z.string().optional().nullable(),
icn: z.string().optional().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
claim: z.unknown().optional().nullable(),
patient: z.unknown(),
updatedBy: z.unknown().optional().nullable(),
npiProvider: z.unknown().optional().nullable(),
serviceLineTransactions: z.array(z.unknown()),
serviceLines: z.array(z.unknown()),
commissionBatchItems: z.array(z.unknown())
}).strict();
export type PaymentInputType = z.infer<typeof PaymentInputSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PdfFileInputSchema = z.object({
id: z.number().int(),
filename: z.string(),
pdfData: z.instanceof(Uint8Array),
uploadedAt: z.date(),
groupId: z.number().int(),
group: z.unknown()
}).strict();
export type PdfFileInputType = z.infer<typeof PdfFileInputSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { PdfTitleKeySchema } from '../../enums/PdfTitleKey.schema';
// prettier-ignore
export const PdfGroupInputSchema = z.object({
id: z.number().int(),
title: z.string(),
titleKey: PdfTitleKeySchema,
createdAt: z.date(),
patientId: z.number().int(),
patient: z.unknown(),
pdfs: z.array(z.unknown())
}).strict();
export type PdfGroupInputType = z.infer<typeof PdfGroupInputSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ProcedureTimeslotInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type ProcedureTimeslotInputType = z.infer<typeof ProcedureTimeslotInputSchema>;
@@ -1,27 +0,0 @@
import * as z from 'zod';
import { ServiceLineStatusSchema } from '../../enums/ServiceLineStatus.schema';
// prettier-ignore
export const ServiceLineInputSchema = z.object({
id: z.number().int(),
claimId: z.number().int().optional().nullable(),
paymentId: z.number().int().optional().nullable(),
procedureCode: z.string(),
procedureDate: z.date(),
quad: z.string().optional().nullable(),
arch: z.string().optional().nullable(),
toothNumber: z.string().optional().nullable(),
toothSurface: z.string().optional().nullable(),
icn: z.string().optional().nullable(),
paidCode: z.string().optional().nullable(),
allowedAmount: z.number().optional().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
status: ServiceLineStatusSchema,
claim: z.unknown().optional().nullable(),
payment: z.unknown().optional().nullable(),
serviceLineTransactions: z.array(z.unknown())
}).strict();
export type ServiceLineInputType = z.infer<typeof ServiceLineInputSchema>;
@@ -1,20 +0,0 @@
import * as z from 'zod';
import { PaymentMethodSchema } from '../../enums/PaymentMethod.schema';
// prettier-ignore
export const ServiceLineTransactionInputSchema = z.object({
id: z.number().int(),
paymentId: z.number().int(),
serviceLineId: z.number().int(),
transactionId: z.string().optional().nullable(),
paidAmount: z.number(),
adjustedAmount: z.number(),
method: PaymentMethodSchema,
receivedDate: z.date(),
payerName: z.string().optional().nullable(),
notes: z.string().optional().nullable(),
createdAt: z.date(),
payment: z.unknown(),
serviceLine: z.unknown()
}).strict();
export type ServiceLineTransactionInputType = z.infer<typeof ServiceLineTransactionInputSchema>;
@@ -1,13 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ShoppingVendorInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
vendorName: z.string(),
websiteUrl: z.string(),
loginUsername: z.string(),
loginPassword: z.string(),
user: z.unknown()
}).strict();
export type ShoppingVendorInputType = z.infer<typeof ShoppingVendorInputSchema>;
@@ -1,16 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const StaffInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
email: z.string().optional().nullable(),
role: z.string(),
phone: z.string().optional().nullable(),
createdAt: z.date(),
user: z.unknown().optional().nullable(),
appointments: z.array(z.unknown()),
claims: z.array(z.unknown())
}).strict();
export type StaffInputType = z.infer<typeof StaffInputSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const TwilioSettingsInputSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
accountSid: z.string(),
authToken: z.string(),
phoneNumber: z.string(),
greetingMessage: z.string().optional().nullable(),
templates: z.unknown().optional().nullable(),
user: z.unknown()
}).strict();
export type TwilioSettingsInputType = z.infer<typeof TwilioSettingsInputSchema>;
@@ -1,37 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const UserInputSchema = z.object({
id: z.number().int(),
username: z.string(),
password: z.string(),
autoBackupEnabled: z.boolean(),
autoBackupHour: z.number().int(),
usbBackupEnabled: z.boolean(),
usbBackupHour: z.number().int(),
autoMhCheckEnabled: z.boolean(),
autoMhCheckDayOfWeek: z.number().int(),
autoMhCheckHour: z.number().int(),
patients: z.array(z.unknown()),
appointments: z.array(z.unknown()),
staff: z.array(z.unknown()),
npiProviders: z.array(z.unknown()),
claims: z.array(z.unknown()),
insuranceCredentials: z.array(z.unknown()),
shoppingVendors: z.array(z.unknown()),
updatedPayments: z.array(z.unknown()),
backups: z.array(z.unknown()),
backupDestinations: z.array(z.unknown()),
notifications: z.array(z.unknown()),
cloudFolders: z.array(z.unknown()),
cloudFiles: z.array(z.unknown()),
communications: z.array(z.unknown()),
twilioSettings: z.unknown().optional().nullable(),
aiSettings: z.unknown().optional().nullable(),
officeHours: z.unknown().optional().nullable(),
officeContact: z.unknown().optional().nullable(),
procedureTimeslot: z.unknown().optional().nullable(),
insuranceContacts: z.array(z.unknown()),
patientConversations: z.array(z.unknown())
}).strict();
export type UserInputType = z.infer<typeof UserInputSchema>;
@@ -1,39 +0,0 @@
/**
* Input Variant Schemas
* Auto-generated - do not edit manually
*/
export { UserInputSchema } from './User.input';
export { PatientInputSchema } from './Patient.input';
export { AppointmentInputSchema } from './Appointment.input';
export { AppointmentFileInputSchema } from './AppointmentFile.input';
export { StaffInputSchema } from './Staff.input';
export { NpiProviderInputSchema } from './NpiProvider.input';
export { AppointmentProcedureInputSchema } from './AppointmentProcedure.input';
export { ClaimInputSchema } from './Claim.input';
export { ServiceLineInputSchema } from './ServiceLine.input';
export { ClaimFileInputSchema } from './ClaimFile.input';
export { InsuranceCredentialInputSchema } from './InsuranceCredential.input';
export { ShoppingVendorInputSchema } from './ShoppingVendor.input';
export { PdfGroupInputSchema } from './PdfGroup.input';
export { PdfFileInputSchema } from './PdfFile.input';
export { PaymentInputSchema } from './Payment.input';
export { ServiceLineTransactionInputSchema } from './ServiceLineTransaction.input';
export { DatabaseBackupInputSchema } from './DatabaseBackup.input';
export { BackupDestinationInputSchema } from './BackupDestination.input';
export { NotificationInputSchema } from './Notification.input';
export { CronJobLogInputSchema } from './CronJobLog.input';
export { CloudFolderInputSchema } from './CloudFolder.input';
export { CloudFileInputSchema } from './CloudFile.input';
export { CloudFileChunkInputSchema } from './CloudFileChunk.input';
export { CommunicationInputSchema } from './Communication.input';
export { PatientDocumentInputSchema } from './PatientDocument.input';
export { TwilioSettingsInputSchema } from './TwilioSettings.input';
export { AiSettingsInputSchema } from './AiSettings.input';
export { OfficeHoursInputSchema } from './OfficeHours.input';
export { OfficeContactInputSchema } from './OfficeContact.input';
export { InsuranceContactInputSchema } from './InsuranceContact.input';
export { ProcedureTimeslotInputSchema } from './ProcedureTimeslot.input';
export { PatientConversationInputSchema } from './PatientConversation.input';
export { CommissionBatchInputSchema } from './CommissionBatch.input';
export { CommissionBatchItemInputSchema } from './CommissionBatchItem.input';
@@ -1,22 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AiSettingsModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
apiKey: z.string(),
aiEnabled: z.boolean(),
openAiKey: z.string(),
openAiEnabled: z.boolean(),
claudeAiKey: z.string(),
claudeAiEnabled: z.boolean(),
claudeAiModel: z.string(),
openAiModel: z.string(),
googleAiModel: z.string(),
dentalMgmtKey: z.string(),
dentalMgmtEnabled: z.boolean(),
afterHoursEnabled: z.boolean(),
openPhoneReply: z.boolean(),
user: z.unknown()
}).strict();
export type AiSettingsPureType = z.infer<typeof AiSettingsModelSchema>;
@@ -1,29 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const AppointmentModelSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
staffId: z.number().int(),
title: z.string(),
date: z.date(),
startTime: z.string(),
endTime: z.string(),
type: z.string(),
typeLocked: z.boolean(),
notes: z.string().nullable(),
procedureCodeNotes: z.string().nullable(),
status: z.string(),
movedByAi: z.boolean(),
createdAt: z.date(),
eligibilityStatus: PatientStatusSchema,
patient: z.unknown(),
user: z.unknown(),
staff: z.unknown().nullable(),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
files: z.array(z.unknown())
}).strict();
export type AppointmentPureType = z.infer<typeof AppointmentModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AppointmentFileModelSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
filename: z.string(),
mimeType: z.string().nullable(),
filePath: z.string().nullable(),
appointment: z.unknown()
}).strict();
export type AppointmentFilePureType = z.infer<typeof AppointmentFileModelSchema>;
@@ -1,24 +0,0 @@
import * as z from 'zod';
import { ProcedureSourceSchema } from '../../enums/ProcedureSource.schema';
// prettier-ignore
export const AppointmentProcedureModelSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
patientId: z.number().int(),
npiProviderId: z.number().int().nullable(),
procedureCode: z.string(),
procedureLabel: z.string().nullable(),
fee: z.number().nullable(),
category: z.string().nullable(),
toothNumber: z.string().nullable(),
toothSurface: z.string().nullable(),
oralCavityArea: z.string().nullable(),
source: ProcedureSourceSchema,
comboKey: z.string().nullable(),
createdAt: z.date(),
appointment: z.unknown(),
patient: z.unknown(),
npiProvider: z.unknown().nullable()
}).strict();
export type AppointmentProcedurePureType = z.infer<typeof AppointmentProcedureModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const BackupDestinationModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
path: z.string(),
isActive: z.boolean(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type BackupDestinationPureType = z.infer<typeof BackupDestinationModelSchema>;
@@ -1,35 +0,0 @@
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>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ClaimFileModelSchema = z.object({
id: z.number().int(),
claimId: z.number().int(),
filename: z.string(),
mimeType: z.string(),
filePath: z.string().nullable(),
claim: z.unknown()
}).strict();
export type ClaimFilePureType = z.infer<typeof ClaimFileModelSchema>;
@@ -1,20 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
mimeType: z.string().nullable(),
fileSize: z.bigint(),
folderId: z.number().int().nullable(),
isComplete: z.boolean(),
totalChunks: z.number().int().nullable(),
diskPath: z.string().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
folder: z.unknown().nullable(),
chunks: z.array(z.unknown())
}).strict();
export type CloudFilePureType = z.infer<typeof CloudFileModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileChunkModelSchema = z.object({
id: z.number().int(),
fileId: z.number().int(),
seq: z.number().int(),
data: z.instanceof(Uint8Array),
createdAt: z.date(),
file: z.unknown()
}).strict();
export type CloudFileChunkPureType = z.infer<typeof CloudFileChunkModelSchema>;
@@ -1,18 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFolderModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
parentId: z.number().int().nullable(),
patientId: z.number().int().nullable(),
parent: z.unknown().nullable(),
children: z.array(z.unknown()),
user: z.unknown(),
patient: z.unknown().nullable(),
files: z.array(z.unknown()),
createdAt: z.date(),
updatedAt: z.date()
}).strict();
export type CloudFolderPureType = z.infer<typeof CloudFolderModelSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchModelSchema = z.object({
id: z.number().int(),
npiProviderId: z.number().int(),
totalCollection: z.number(),
commissionAmount: z.number(),
notes: z.string().nullable(),
createdAt: z.date(),
npiProvider: z.unknown(),
items: z.array(z.unknown())
}).strict();
export type CommissionBatchPureType = z.infer<typeof CommissionBatchModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchItemModelSchema = z.object({
id: z.number().int(),
commissionBatchId: z.number().int(),
paymentId: z.number().int(),
collectionAmount: z.number(),
commissionBatch: z.unknown(),
payment: z.unknown()
}).strict();
export type CommissionBatchItemPureType = z.infer<typeof CommissionBatchItemModelSchema>;
@@ -1,21 +0,0 @@
import * as z from 'zod';
import { CommunicationChannelSchema } from '../../enums/CommunicationChannel.schema';
import { CommunicationDirectionSchema } from '../../enums/CommunicationDirection.schema';
import { CommunicationStatusSchema } from '../../enums/CommunicationStatus.schema';
// prettier-ignore
export const CommunicationModelSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int().nullable(),
channel: CommunicationChannelSchema,
direction: CommunicationDirectionSchema,
status: CommunicationStatusSchema,
body: z.string().nullable(),
callDuration: z.number().int().nullable(),
twilioSid: z.string().nullable(),
createdAt: z.date(),
patient: z.unknown(),
user: z.unknown().nullable()
}).strict();
export type CommunicationPureType = z.infer<typeof CommunicationModelSchema>;
@@ -1,13 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CronJobLogModelSchema = z.object({
id: z.number().int(),
jobName: z.string(),
status: z.string(),
startedAt: z.date(),
completedAt: z.date().nullable(),
durationMs: z.number().int().nullable(),
errorMessage: z.string().nullable()
}).strict();
export type CronJobLogPureType = z.infer<typeof CronJobLogModelSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const DatabaseBackupModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type DatabaseBackupPureType = z.infer<typeof DatabaseBackupModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceContactModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
phoneNumber: z.string().nullable(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type InsuranceContactPureType = z.infer<typeof InsuranceContactModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceCredentialModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
siteKey: z.string(),
username: z.string(),
password: z.string(),
user: z.unknown()
}).strict();
export type InsuranceCredentialPureType = z.infer<typeof InsuranceCredentialModelSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { NotificationTypesSchema } from '../../enums/NotificationTypes.schema';
// prettier-ignore
export const NotificationModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
type: NotificationTypesSchema,
message: z.string(),
createdAt: z.date(),
read: z.boolean(),
user: z.unknown()
}).strict();
export type NotificationPureType = z.infer<typeof NotificationModelSchema>;
@@ -1,17 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const NpiProviderModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
npiNumber: z.string(),
providerName: z.string(),
sortOrder: z.number().int(),
createdAt: z.date(),
user: z.unknown(),
claims: z.array(z.unknown()),
payments: z.array(z.unknown()),
commissionBatches: z.array(z.unknown()),
appointmentProcedures: z.array(z.unknown())
}).strict();
export type NpiProviderPureType = z.infer<typeof NpiProviderModelSchema>;
@@ -1,19 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeContactModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
officeName: z.string().nullable(),
receptionistName: z.string().nullable(),
dentistName: z.string().nullable(),
phoneNumber: z.string().nullable(),
email: z.string().nullable(),
fax: z.string().nullable(),
streetAddress: z.string().nullable(),
city: z.string().nullable(),
state: z.string().nullable(),
zipCode: z.string().nullable(),
user: z.unknown()
}).strict();
export type OfficeContactPureType = z.infer<typeof OfficeContactModelSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeHoursModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type OfficeHoursPureType = z.infer<typeof OfficeHoursModelSchema>;
@@ -1,38 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const PatientModelSchema = z.object({
id: z.number().int(),
firstName: z.string(),
lastName: z.string(),
dateOfBirth: z.date().nullable(),
gender: z.string(),
phone: z.string(),
email: z.string().nullable(),
address: z.string().nullable(),
city: z.string().nullable(),
zipCode: z.string().nullable(),
insuranceProvider: z.string().nullable(),
insuranceId: z.string().nullable(),
groupNumber: z.string().nullable(),
policyHolder: z.string().nullable(),
allergies: z.string().nullable(),
medicalConditions: z.string().nullable(),
preferredLanguage: z.string().nullable(),
status: PatientStatusSchema,
userId: z.number().int(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
appointments: z.array(z.unknown()),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
groups: z.array(z.unknown()),
payment: z.array(z.unknown()),
communications: z.array(z.unknown()),
documents: z.array(z.unknown()),
conversation: z.unknown().nullable(),
cloudFolders: z.array(z.unknown())
}).strict();
export type PatientPureType = z.infer<typeof PatientModelSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientConversationModelSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
stage: z.string(),
aiHandoff: z.boolean(),
updatedAt: z.date(),
patient: z.unknown(),
user: z.unknown()
}).strict();
export type PatientConversationPureType = z.infer<typeof PatientConversationModelSchema>;
@@ -1,16 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientDocumentModelSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
filename: z.string(),
originalName: z.string(),
mimeType: z.string(),
fileSize: z.bigint(),
filePath: z.string(),
uploadedAt: z.date(),
updatedAt: z.date(),
patient: z.unknown()
}).strict();
export type PatientDocumentPureType = z.infer<typeof PatientDocumentModelSchema>;
@@ -1,32 +0,0 @@
import * as z from 'zod';
import { PaymentStatusSchema } from '../../enums/PaymentStatus.schema';
// prettier-ignore
export const PaymentModelSchema = z.object({
id: z.number().int(),
claimId: z.number().int().nullable(),
patientId: z.number().int(),
userId: z.number().int(),
updatedById: z.number().int().nullable(),
npiProviderId: z.number().int().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
mhPaidAmount: z.number().nullable(),
copayment: z.number(),
adjustment: z.number(),
status: PaymentStatusSchema,
notes: z.string().nullable(),
icn: z.string().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
claim: z.unknown().nullable(),
patient: z.unknown(),
updatedBy: z.unknown().nullable(),
npiProvider: z.unknown().nullable(),
serviceLineTransactions: z.array(z.unknown()),
serviceLines: z.array(z.unknown()),
commissionBatchItems: z.array(z.unknown())
}).strict();
export type PaymentPureType = z.infer<typeof PaymentModelSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PdfFileModelSchema = z.object({
id: z.number().int(),
filename: z.string(),
pdfData: z.instanceof(Uint8Array),
uploadedAt: z.date(),
groupId: z.number().int(),
group: z.unknown()
}).strict();
export type PdfFilePureType = z.infer<typeof PdfFileModelSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { PdfTitleKeySchema } from '../../enums/PdfTitleKey.schema';
// prettier-ignore
export const PdfGroupModelSchema = z.object({
id: z.number().int(),
title: z.string(),
titleKey: PdfTitleKeySchema,
createdAt: z.date(),
patientId: z.number().int(),
patient: z.unknown(),
pdfs: z.array(z.unknown())
}).strict();
export type PdfGroupPureType = z.infer<typeof PdfGroupModelSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ProcedureTimeslotModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type ProcedureTimeslotPureType = z.infer<typeof ProcedureTimeslotModelSchema>;
@@ -1,27 +0,0 @@
import * as z from 'zod';
import { ServiceLineStatusSchema } from '../../enums/ServiceLineStatus.schema';
// prettier-ignore
export const ServiceLineModelSchema = z.object({
id: z.number().int(),
claimId: z.number().int().nullable(),
paymentId: z.number().int().nullable(),
procedureCode: z.string(),
procedureDate: z.date(),
quad: z.string().nullable(),
arch: z.string().nullable(),
toothNumber: z.string().nullable(),
toothSurface: z.string().nullable(),
icn: z.string().nullable(),
paidCode: z.string().nullable(),
allowedAmount: z.number().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
status: ServiceLineStatusSchema,
claim: z.unknown().nullable(),
payment: z.unknown().nullable(),
serviceLineTransactions: z.array(z.unknown())
}).strict();
export type ServiceLinePureType = z.infer<typeof ServiceLineModelSchema>;
@@ -1,20 +0,0 @@
import * as z from 'zod';
import { PaymentMethodSchema } from '../../enums/PaymentMethod.schema';
// prettier-ignore
export const ServiceLineTransactionModelSchema = z.object({
id: z.number().int(),
paymentId: z.number().int(),
serviceLineId: z.number().int(),
transactionId: z.string().nullable(),
paidAmount: z.number(),
adjustedAmount: z.number(),
method: PaymentMethodSchema,
receivedDate: z.date(),
payerName: z.string().nullable(),
notes: z.string().nullable(),
createdAt: z.date(),
payment: z.unknown(),
serviceLine: z.unknown()
}).strict();
export type ServiceLineTransactionPureType = z.infer<typeof ServiceLineTransactionModelSchema>;
@@ -1,13 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ShoppingVendorModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
vendorName: z.string(),
websiteUrl: z.string(),
loginUsername: z.string(),
loginPassword: z.string(),
user: z.unknown()
}).strict();
export type ShoppingVendorPureType = z.infer<typeof ShoppingVendorModelSchema>;
@@ -1,16 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const StaffModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
email: z.string().nullable(),
role: z.string(),
phone: z.string().nullable(),
createdAt: z.date(),
user: z.unknown().nullable(),
appointments: z.array(z.unknown()),
claims: z.array(z.unknown())
}).strict();
export type StaffPureType = z.infer<typeof StaffModelSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const TwilioSettingsModelSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
accountSid: z.string(),
authToken: z.string(),
phoneNumber: z.string(),
greetingMessage: z.string().nullable(),
templates: z.unknown().nullable(),
user: z.unknown()
}).strict();
export type TwilioSettingsPureType = z.infer<typeof TwilioSettingsModelSchema>;
@@ -1,37 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const UserModelSchema = z.object({
id: z.number().int(),
username: z.string(),
password: z.string(),
autoBackupEnabled: z.boolean(),
autoBackupHour: z.number().int(),
usbBackupEnabled: z.boolean(),
usbBackupHour: z.number().int(),
autoMhCheckEnabled: z.boolean(),
autoMhCheckDayOfWeek: z.number().int(),
autoMhCheckHour: z.number().int(),
patients: z.array(z.unknown()),
appointments: z.array(z.unknown()),
staff: z.array(z.unknown()),
npiProviders: z.array(z.unknown()),
claims: z.array(z.unknown()),
insuranceCredentials: z.array(z.unknown()),
shoppingVendors: z.array(z.unknown()),
updatedPayments: z.array(z.unknown()),
backups: z.array(z.unknown()),
backupDestinations: z.array(z.unknown()),
notifications: z.array(z.unknown()),
cloudFolders: z.array(z.unknown()),
cloudFiles: z.array(z.unknown()),
communications: z.array(z.unknown()),
twilioSettings: z.unknown().nullable(),
aiSettings: z.unknown().nullable(),
officeHours: z.unknown().nullable(),
officeContact: z.unknown().nullable(),
procedureTimeslot: z.unknown().nullable(),
insuranceContacts: z.array(z.unknown()),
patientConversations: z.array(z.unknown())
}).strict();
export type UserPureType = z.infer<typeof UserModelSchema>;
@@ -1,39 +0,0 @@
/**
* Pure Variant Schemas
* Auto-generated - do not edit manually
*/
export { UserModelSchema } from './User.pure';
export { PatientModelSchema } from './Patient.pure';
export { AppointmentModelSchema } from './Appointment.pure';
export { AppointmentFileModelSchema } from './AppointmentFile.pure';
export { StaffModelSchema } from './Staff.pure';
export { NpiProviderModelSchema } from './NpiProvider.pure';
export { AppointmentProcedureModelSchema } from './AppointmentProcedure.pure';
export { ClaimModelSchema } from './Claim.pure';
export { ServiceLineModelSchema } from './ServiceLine.pure';
export { ClaimFileModelSchema } from './ClaimFile.pure';
export { InsuranceCredentialModelSchema } from './InsuranceCredential.pure';
export { ShoppingVendorModelSchema } from './ShoppingVendor.pure';
export { PdfGroupModelSchema } from './PdfGroup.pure';
export { PdfFileModelSchema } from './PdfFile.pure';
export { PaymentModelSchema } from './Payment.pure';
export { ServiceLineTransactionModelSchema } from './ServiceLineTransaction.pure';
export { DatabaseBackupModelSchema } from './DatabaseBackup.pure';
export { BackupDestinationModelSchema } from './BackupDestination.pure';
export { NotificationModelSchema } from './Notification.pure';
export { CronJobLogModelSchema } from './CronJobLog.pure';
export { CloudFolderModelSchema } from './CloudFolder.pure';
export { CloudFileModelSchema } from './CloudFile.pure';
export { CloudFileChunkModelSchema } from './CloudFileChunk.pure';
export { CommunicationModelSchema } from './Communication.pure';
export { PatientDocumentModelSchema } from './PatientDocument.pure';
export { TwilioSettingsModelSchema } from './TwilioSettings.pure';
export { AiSettingsModelSchema } from './AiSettings.pure';
export { OfficeHoursModelSchema } from './OfficeHours.pure';
export { OfficeContactModelSchema } from './OfficeContact.pure';
export { InsuranceContactModelSchema } from './InsuranceContact.pure';
export { ProcedureTimeslotModelSchema } from './ProcedureTimeslot.pure';
export { PatientConversationModelSchema } from './PatientConversation.pure';
export { CommissionBatchModelSchema } from './CommissionBatch.pure';
export { CommissionBatchItemModelSchema } from './CommissionBatchItem.pure';
@@ -1,22 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AiSettingsResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
apiKey: z.string(),
aiEnabled: z.boolean(),
openAiKey: z.string(),
openAiEnabled: z.boolean(),
claudeAiKey: z.string(),
claudeAiEnabled: z.boolean(),
claudeAiModel: z.string(),
openAiModel: z.string(),
googleAiModel: z.string(),
dentalMgmtKey: z.string(),
dentalMgmtEnabled: z.boolean(),
afterHoursEnabled: z.boolean(),
openPhoneReply: z.boolean(),
user: z.unknown()
}).strict();
export type AiSettingsResultType = z.infer<typeof AiSettingsResultSchema>;
@@ -1,29 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const AppointmentResultSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
staffId: z.number().int(),
title: z.string(),
date: z.date(),
startTime: z.string(),
endTime: z.string(),
type: z.string(),
typeLocked: z.boolean(),
notes: z.string().nullable(),
procedureCodeNotes: z.string().nullable(),
status: z.string(),
movedByAi: z.boolean(),
createdAt: z.date(),
eligibilityStatus: PatientStatusSchema,
patient: z.unknown(),
user: z.unknown(),
staff: z.unknown().nullable(),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
files: z.array(z.unknown())
}).strict();
export type AppointmentResultType = z.infer<typeof AppointmentResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const AppointmentFileResultSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
filename: z.string(),
mimeType: z.string().nullable(),
filePath: z.string().nullable(),
appointment: z.unknown()
}).strict();
export type AppointmentFileResultType = z.infer<typeof AppointmentFileResultSchema>;
@@ -1,24 +0,0 @@
import * as z from 'zod';
import { ProcedureSourceSchema } from '../../enums/ProcedureSource.schema';
// prettier-ignore
export const AppointmentProcedureResultSchema = z.object({
id: z.number().int(),
appointmentId: z.number().int(),
patientId: z.number().int(),
npiProviderId: z.number().int().nullable(),
procedureCode: z.string(),
procedureLabel: z.string().nullable(),
fee: z.number().nullable(),
category: z.string().nullable(),
toothNumber: z.string().nullable(),
toothSurface: z.string().nullable(),
oralCavityArea: z.string().nullable(),
source: ProcedureSourceSchema,
comboKey: z.string().nullable(),
createdAt: z.date(),
appointment: z.unknown(),
patient: z.unknown(),
npiProvider: z.unknown().nullable()
}).strict();
export type AppointmentProcedureResultType = z.infer<typeof AppointmentProcedureResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const BackupDestinationResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
path: z.string(),
isActive: z.boolean(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type BackupDestinationResultType = z.infer<typeof BackupDestinationResultSchema>;
@@ -1,35 +0,0 @@
import * as z from 'zod';
import { MissingTeethStatusSchema } from '../../enums/MissingTeethStatus.schema';
import { ClaimStatusSchema } from '../../enums/ClaimStatus.schema';
// prettier-ignore
export const ClaimResultSchema = 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 ClaimResultType = z.infer<typeof ClaimResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ClaimFileResultSchema = z.object({
id: z.number().int(),
claimId: z.number().int(),
filename: z.string(),
mimeType: z.string(),
filePath: z.string().nullable(),
claim: z.unknown()
}).strict();
export type ClaimFileResultType = z.infer<typeof ClaimFileResultSchema>;
@@ -1,20 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
mimeType: z.string().nullable(),
fileSize: z.bigint(),
folderId: z.number().int().nullable(),
isComplete: z.boolean(),
totalChunks: z.number().int().nullable(),
diskPath: z.string().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
folder: z.unknown().nullable(),
chunks: z.array(z.unknown())
}).strict();
export type CloudFileResultType = z.infer<typeof CloudFileResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFileChunkResultSchema = z.object({
id: z.number().int(),
fileId: z.number().int(),
seq: z.number().int(),
data: z.instanceof(Uint8Array),
createdAt: z.date(),
file: z.unknown()
}).strict();
export type CloudFileChunkResultType = z.infer<typeof CloudFileChunkResultSchema>;
@@ -1,18 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CloudFolderResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
parentId: z.number().int().nullable(),
patientId: z.number().int().nullable(),
parent: z.unknown().nullable(),
children: z.array(z.unknown()),
user: z.unknown(),
patient: z.unknown().nullable(),
files: z.array(z.unknown()),
createdAt: z.date(),
updatedAt: z.date()
}).strict();
export type CloudFolderResultType = z.infer<typeof CloudFolderResultSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchResultSchema = z.object({
id: z.number().int(),
npiProviderId: z.number().int(),
totalCollection: z.number(),
commissionAmount: z.number(),
notes: z.string().nullable(),
createdAt: z.date(),
npiProvider: z.unknown(),
items: z.array(z.unknown())
}).strict();
export type CommissionBatchResultType = z.infer<typeof CommissionBatchResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CommissionBatchItemResultSchema = z.object({
id: z.number().int(),
commissionBatchId: z.number().int(),
paymentId: z.number().int(),
collectionAmount: z.number(),
commissionBatch: z.unknown(),
payment: z.unknown()
}).strict();
export type CommissionBatchItemResultType = z.infer<typeof CommissionBatchItemResultSchema>;
@@ -1,21 +0,0 @@
import * as z from 'zod';
import { CommunicationChannelSchema } from '../../enums/CommunicationChannel.schema';
import { CommunicationDirectionSchema } from '../../enums/CommunicationDirection.schema';
import { CommunicationStatusSchema } from '../../enums/CommunicationStatus.schema';
// prettier-ignore
export const CommunicationResultSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int().nullable(),
channel: CommunicationChannelSchema,
direction: CommunicationDirectionSchema,
status: CommunicationStatusSchema,
body: z.string().nullable(),
callDuration: z.number().int().nullable(),
twilioSid: z.string().nullable(),
createdAt: z.date(),
patient: z.unknown(),
user: z.unknown().nullable()
}).strict();
export type CommunicationResultType = z.infer<typeof CommunicationResultSchema>;
@@ -1,13 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const CronJobLogResultSchema = z.object({
id: z.number().int(),
jobName: z.string(),
status: z.string(),
startedAt: z.date(),
completedAt: z.date().nullable(),
durationMs: z.number().int().nullable(),
errorMessage: z.string().nullable()
}).strict();
export type CronJobLogResultType = z.infer<typeof CronJobLogResultSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const DatabaseBackupResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type DatabaseBackupResultType = z.infer<typeof DatabaseBackupResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceContactResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
name: z.string(),
phoneNumber: z.string().nullable(),
createdAt: z.date(),
user: z.unknown()
}).strict();
export type InsuranceContactResultType = z.infer<typeof InsuranceContactResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const InsuranceCredentialResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
siteKey: z.string(),
username: z.string(),
password: z.string(),
user: z.unknown()
}).strict();
export type InsuranceCredentialResultType = z.infer<typeof InsuranceCredentialResultSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { NotificationTypesSchema } from '../../enums/NotificationTypes.schema';
// prettier-ignore
export const NotificationResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
type: NotificationTypesSchema,
message: z.string(),
createdAt: z.date(),
read: z.boolean(),
user: z.unknown()
}).strict();
export type NotificationResultType = z.infer<typeof NotificationResultSchema>;
@@ -1,17 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const NpiProviderResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
npiNumber: z.string(),
providerName: z.string(),
sortOrder: z.number().int(),
createdAt: z.date(),
user: z.unknown(),
claims: z.array(z.unknown()),
payments: z.array(z.unknown()),
commissionBatches: z.array(z.unknown()),
appointmentProcedures: z.array(z.unknown())
}).strict();
export type NpiProviderResultType = z.infer<typeof NpiProviderResultSchema>;
@@ -1,19 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeContactResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
officeName: z.string().nullable(),
receptionistName: z.string().nullable(),
dentistName: z.string().nullable(),
phoneNumber: z.string().nullable(),
email: z.string().nullable(),
fax: z.string().nullable(),
streetAddress: z.string().nullable(),
city: z.string().nullable(),
state: z.string().nullable(),
zipCode: z.string().nullable(),
user: z.unknown()
}).strict();
export type OfficeContactResultType = z.infer<typeof OfficeContactResultSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const OfficeHoursResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type OfficeHoursResultType = z.infer<typeof OfficeHoursResultSchema>;
@@ -1,38 +0,0 @@
import * as z from 'zod';
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
// prettier-ignore
export const PatientResultSchema = z.object({
id: z.number().int(),
firstName: z.string(),
lastName: z.string(),
dateOfBirth: z.date().nullable(),
gender: z.string(),
phone: z.string(),
email: z.string().nullable(),
address: z.string().nullable(),
city: z.string().nullable(),
zipCode: z.string().nullable(),
insuranceProvider: z.string().nullable(),
insuranceId: z.string().nullable(),
groupNumber: z.string().nullable(),
policyHolder: z.string().nullable(),
allergies: z.string().nullable(),
medicalConditions: z.string().nullable(),
preferredLanguage: z.string().nullable(),
status: PatientStatusSchema,
userId: z.number().int(),
createdAt: z.date(),
updatedAt: z.date(),
user: z.unknown(),
appointments: z.array(z.unknown()),
procedures: z.array(z.unknown()),
claims: z.array(z.unknown()),
groups: z.array(z.unknown()),
payment: z.array(z.unknown()),
communications: z.array(z.unknown()),
documents: z.array(z.unknown()),
conversation: z.unknown().nullable(),
cloudFolders: z.array(z.unknown())
}).strict();
export type PatientResultType = z.infer<typeof PatientResultSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientConversationResultSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
userId: z.number().int(),
stage: z.string(),
aiHandoff: z.boolean(),
updatedAt: z.date(),
patient: z.unknown(),
user: z.unknown()
}).strict();
export type PatientConversationResultType = z.infer<typeof PatientConversationResultSchema>;
@@ -1,16 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PatientDocumentResultSchema = z.object({
id: z.number().int(),
patientId: z.number().int(),
filename: z.string(),
originalName: z.string(),
mimeType: z.string(),
fileSize: z.bigint(),
filePath: z.string(),
uploadedAt: z.date(),
updatedAt: z.date(),
patient: z.unknown()
}).strict();
export type PatientDocumentResultType = z.infer<typeof PatientDocumentResultSchema>;
@@ -1,32 +0,0 @@
import * as z from 'zod';
import { PaymentStatusSchema } from '../../enums/PaymentStatus.schema';
// prettier-ignore
export const PaymentResultSchema = z.object({
id: z.number().int(),
claimId: z.number().int().nullable(),
patientId: z.number().int(),
userId: z.number().int(),
updatedById: z.number().int().nullable(),
npiProviderId: z.number().int().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
mhPaidAmount: z.number().nullable(),
copayment: z.number(),
adjustment: z.number(),
status: PaymentStatusSchema,
notes: z.string().nullable(),
icn: z.string().nullable(),
createdAt: z.date(),
updatedAt: z.date(),
claim: z.unknown().nullable(),
patient: z.unknown(),
updatedBy: z.unknown().nullable(),
npiProvider: z.unknown().nullable(),
serviceLineTransactions: z.array(z.unknown()),
serviceLines: z.array(z.unknown()),
commissionBatchItems: z.array(z.unknown())
}).strict();
export type PaymentResultType = z.infer<typeof PaymentResultSchema>;
@@ -1,12 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const PdfFileResultSchema = z.object({
id: z.number().int(),
filename: z.string(),
pdfData: z.instanceof(Uint8Array),
uploadedAt: z.date(),
groupId: z.number().int(),
group: z.unknown()
}).strict();
export type PdfFileResultType = z.infer<typeof PdfFileResultSchema>;
@@ -1,14 +0,0 @@
import * as z from 'zod';
import { PdfTitleKeySchema } from '../../enums/PdfTitleKey.schema';
// prettier-ignore
export const PdfGroupResultSchema = z.object({
id: z.number().int(),
title: z.string(),
titleKey: PdfTitleKeySchema,
createdAt: z.date(),
patientId: z.number().int(),
patient: z.unknown(),
pdfs: z.array(z.unknown())
}).strict();
export type PdfGroupResultType = z.infer<typeof PdfGroupResultSchema>;
@@ -1,10 +0,0 @@
import * as z from 'zod';
// prettier-ignore
export const ProcedureTimeslotResultSchema = z.object({
id: z.number().int(),
userId: z.number().int(),
data: z.unknown(),
user: z.unknown()
}).strict();
export type ProcedureTimeslotResultType = z.infer<typeof ProcedureTimeslotResultSchema>;
@@ -1,27 +0,0 @@
import * as z from 'zod';
import { ServiceLineStatusSchema } from '../../enums/ServiceLineStatus.schema';
// prettier-ignore
export const ServiceLineResultSchema = z.object({
id: z.number().int(),
claimId: z.number().int().nullable(),
paymentId: z.number().int().nullable(),
procedureCode: z.string(),
procedureDate: z.date(),
quad: z.string().nullable(),
arch: z.string().nullable(),
toothNumber: z.string().nullable(),
toothSurface: z.string().nullable(),
icn: z.string().nullable(),
paidCode: z.string().nullable(),
allowedAmount: z.number().nullable(),
totalBilled: z.number(),
totalPaid: z.number(),
totalAdjusted: z.number(),
totalDue: z.number(),
status: ServiceLineStatusSchema,
claim: z.unknown().nullable(),
payment: z.unknown().nullable(),
serviceLineTransactions: z.array(z.unknown())
}).strict();
export type ServiceLineResultType = z.infer<typeof ServiceLineResultSchema>;

Some files were not shown because too many files have changed in this diff Show More