initial commit
This commit is contained in:
26
packages/db/shared/schemas/variants/pure/Appointment.pure.ts
Normal file
26
packages/db/shared/schemas/variants/pure/Appointment.pure.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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(),
|
||||
notes: z.string().nullable(),
|
||||
procedureCodeNotes: z.string().nullable(),
|
||||
status: z.string(),
|
||||
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())
|
||||
}).strict();
|
||||
|
||||
export type AppointmentPureType = z.infer<typeof AppointmentModelSchema>;
|
||||
@@ -0,0 +1,22 @@
|
||||
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(),
|
||||
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()
|
||||
}).strict();
|
||||
|
||||
export type AppointmentProcedurePureType = z.infer<typeof AppointmentProcedureModelSchema>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
32
packages/db/shared/schemas/variants/pure/Claim.pure.ts
Normal file
32
packages/db/shared/schemas/variants/pure/Claim.pure.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 ClaimModelSchema = 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().nullable(),
|
||||
serviceDate: z.date(),
|
||||
insuranceProvider: z.string(),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date(),
|
||||
status: ClaimStatusSchema,
|
||||
claimNumber: z.string().nullable(),
|
||||
patient: z.unknown(),
|
||||
appointment: z.unknown(),
|
||||
user: z.unknown().nullable(),
|
||||
staff: 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>;
|
||||
11
packages/db/shared/schemas/variants/pure/ClaimFile.pure.ts
Normal file
11
packages/db/shared/schemas/variants/pure/ClaimFile.pure.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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(),
|
||||
claim: z.unknown()
|
||||
}).strict();
|
||||
|
||||
export type ClaimFilePureType = z.infer<typeof ClaimFileModelSchema>;
|
||||
19
packages/db/shared/schemas/variants/pure/CloudFile.pure.ts
Normal file
19
packages/db/shared/schemas/variants/pure/CloudFile.pure.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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(),
|
||||
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>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
16
packages/db/shared/schemas/variants/pure/CloudFolder.pure.ts
Normal file
16
packages/db/shared/schemas/variants/pure/CloudFolder.pure.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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(),
|
||||
parent: z.unknown().nullable(),
|
||||
children: z.array(z.unknown()),
|
||||
user: z.unknown(),
|
||||
files: z.array(z.unknown()),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date()
|
||||
}).strict();
|
||||
|
||||
export type CloudFolderPureType = z.infer<typeof CloudFolderModelSchema>;
|
||||
@@ -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 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>;
|
||||
@@ -0,0 +1,10 @@
|
||||
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>;
|
||||
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
@@ -0,0 +1,14 @@
|
||||
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>;
|
||||
12
packages/db/shared/schemas/variants/pure/NpiProvider.pure.ts
Normal file
12
packages/db/shared/schemas/variants/pure/NpiProvider.pure.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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(),
|
||||
createdAt: z.date(),
|
||||
user: z.unknown()
|
||||
}).strict();
|
||||
|
||||
export type NpiProviderPureType = z.infer<typeof NpiProviderModelSchema>;
|
||||
34
packages/db/shared/schemas/variants/pure/Patient.pure.ts
Normal file
34
packages/db/shared/schemas/variants/pure/Patient.pure.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
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(),
|
||||
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(),
|
||||
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 PatientPureType = z.infer<typeof PatientModelSchema>;
|
||||
@@ -0,0 +1,16 @@
|
||||
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>;
|
||||
26
packages/db/shared/schemas/variants/pure/Payment.pure.ts
Normal file
26
packages/db/shared/schemas/variants/pure/Payment.pure.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
totalDue: 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(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
}).strict();
|
||||
|
||||
export type PaymentPureType = z.infer<typeof PaymentModelSchema>;
|
||||
12
packages/db/shared/schemas/variants/pure/PdfFile.pure.ts
Normal file
12
packages/db/shared/schemas/variants/pure/PdfFile.pure.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
14
packages/db/shared/schemas/variants/pure/PdfGroup.pure.ts
Normal file
14
packages/db/shared/schemas/variants/pure/PdfGroup.pure.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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>;
|
||||
24
packages/db/shared/schemas/variants/pure/ServiceLine.pure.ts
Normal file
24
packages/db/shared/schemas/variants/pure/ServiceLine.pure.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
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(),
|
||||
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>;
|
||||
@@ -0,0 +1,20 @@
|
||||
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>;
|
||||
16
packages/db/shared/schemas/variants/pure/Staff.pure.ts
Normal file
16
packages/db/shared/schemas/variants/pure/Staff.pure.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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>;
|
||||
22
packages/db/shared/schemas/variants/pure/User.pure.ts
Normal file
22
packages/db/shared/schemas/variants/pure/User.pure.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as z from 'zod';
|
||||
// prettier-ignore
|
||||
export const UserModelSchema = 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 UserPureType = z.infer<typeof UserModelSchema>;
|
||||
27
packages/db/shared/schemas/variants/pure/index.ts
Normal file
27
packages/db/shared/schemas/variants/pure/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 { 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 { 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 { CloudFolderModelSchema } from './CloudFolder.pure';
|
||||
export { CloudFileModelSchema } from './CloudFile.pure';
|
||||
export { CloudFileChunkModelSchema } from './CloudFileChunk.pure';
|
||||
export { CommunicationModelSchema } from './Communication.pure';
|
||||
export { PatientDocumentModelSchema } from './PatientDocument.pure';
|
||||
Reference in New Issue
Block a user