initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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(),
|
||||
notes: z.string().optional().nullable(),
|
||||
procedureCodeNotes: z.string().optional().nullable(),
|
||||
status: z.string(),
|
||||
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())
|
||||
}).strict();
|
||||
|
||||
export type AppointmentInputType = z.infer<typeof AppointmentInputSchema>;
|
||||
@@ -0,0 +1,22 @@
|
||||
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(),
|
||||
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()
|
||||
}).strict();
|
||||
|
||||
export type AppointmentProcedureInputType = z.infer<typeof AppointmentProcedureInputSchema>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
32
packages/db/shared/schemas/variants/input/Claim.input.ts
Normal file
32
packages/db/shared/schemas/variants/input/Claim.input.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
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(),
|
||||
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(),
|
||||
patient: z.unknown(),
|
||||
appointment: z.unknown(),
|
||||
user: z.unknown().optional().nullable(),
|
||||
staff: 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>;
|
||||
11
packages/db/shared/schemas/variants/input/ClaimFile.input.ts
Normal file
11
packages/db/shared/schemas/variants/input/ClaimFile.input.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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(),
|
||||
claim: z.unknown()
|
||||
}).strict();
|
||||
|
||||
export type ClaimFileInputType = z.infer<typeof ClaimFileInputSchema>;
|
||||
19
packages/db/shared/schemas/variants/input/CloudFile.input.ts
Normal file
19
packages/db/shared/schemas/variants/input/CloudFile.input.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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(),
|
||||
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>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
@@ -0,0 +1,16 @@
|
||||
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(),
|
||||
parent: z.unknown().optional().nullable(),
|
||||
children: z.array(z.unknown()),
|
||||
user: z.unknown(),
|
||||
files: z.array(z.unknown()),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date()
|
||||
}).strict();
|
||||
|
||||
export type CloudFolderInputType = z.infer<typeof CloudFolderInputSchema>;
|
||||
@@ -0,0 +1,21 @@
|
||||
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>;
|
||||
@@ -0,0 +1,10 @@
|
||||
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>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
@@ -0,0 +1,14 @@
|
||||
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>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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(),
|
||||
createdAt: z.date(),
|
||||
user: z.unknown()
|
||||
}).strict();
|
||||
|
||||
export type NpiProviderInputType = z.infer<typeof NpiProviderInputSchema>;
|
||||
34
packages/db/shared/schemas/variants/input/Patient.input.ts
Normal file
34
packages/db/shared/schemas/variants/input/Patient.input.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
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(),
|
||||
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(),
|
||||
status: PatientStatusSchema,
|
||||
userId: z.number().int(),
|
||||
createdAt: 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())
|
||||
}).strict();
|
||||
|
||||
export type PatientInputType = z.infer<typeof PatientInputSchema>;
|
||||
@@ -0,0 +1,16 @@
|
||||
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>;
|
||||
26
packages/db/shared/schemas/variants/input/Payment.input.ts
Normal file
26
packages/db/shared/schemas/variants/input/Payment.input.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
totalDue: 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(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
}).strict();
|
||||
|
||||
export type PaymentInputType = z.infer<typeof PaymentInputSchema>;
|
||||
12
packages/db/shared/schemas/variants/input/PdfFile.input.ts
Normal file
12
packages/db/shared/schemas/variants/input/PdfFile.input.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
14
packages/db/shared/schemas/variants/input/PdfGroup.input.ts
Normal file
14
packages/db/shared/schemas/variants/input/PdfGroup.input.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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>;
|
||||
@@ -0,0 +1,24 @@
|
||||
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(),
|
||||
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>;
|
||||
@@ -0,0 +1,20 @@
|
||||
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>;
|
||||
16
packages/db/shared/schemas/variants/input/Staff.input.ts
Normal file
16
packages/db/shared/schemas/variants/input/Staff.input.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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>;
|
||||
22
packages/db/shared/schemas/variants/input/User.input.ts
Normal file
22
packages/db/shared/schemas/variants/input/User.input.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as z from 'zod';
|
||||
// prettier-ignore
|
||||
export const UserInputSchema = z.object({
|
||||
id: z.number().int(),
|
||||
username: z.string(),
|
||||
password: z.string(),
|
||||
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()),
|
||||
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())
|
||||
}).strict();
|
||||
|
||||
export type UserInputType = z.infer<typeof UserInputSchema>;
|
||||
27
packages/db/shared/schemas/variants/input/index.ts
Normal file
27
packages/db/shared/schemas/variants/input/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 { 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 { 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 { CloudFolderInputSchema } from './CloudFolder.input';
|
||||
export { CloudFileInputSchema } from './CloudFile.input';
|
||||
export { CloudFileChunkInputSchema } from './CloudFileChunk.input';
|
||||
export { CommunicationInputSchema } from './Communication.input';
|
||||
export { PatientDocumentInputSchema } from './PatientDocument.input';
|
||||
Reference in New Issue
Block a user