initial commit
This commit is contained in:
255
packages/db/usedSchemas/browser.ts
Normal file
255
packages/db/usedSchemas/browser.ts
Normal file
@@ -0,0 +1,255 @@
|
||||
import * as z from "zod";
|
||||
|
||||
// ─── Enums ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export const PatientStatusSchema = z.enum(["ACTIVE", "INACTIVE", "UNKNOWN"]);
|
||||
export type PatientStatus = z.infer<typeof PatientStatusSchema>;
|
||||
|
||||
export const ClaimStatusSchema = z.enum([
|
||||
"PENDING",
|
||||
"APPROVED",
|
||||
"CANCELLED",
|
||||
"REVIEW",
|
||||
"VOID",
|
||||
]);
|
||||
export type ClaimStatus = z.infer<typeof ClaimStatusSchema>;
|
||||
|
||||
export const PaymentMethodSchema = z.enum([
|
||||
"EFT",
|
||||
"CHECK",
|
||||
"CASH",
|
||||
"CARD",
|
||||
"OTHER",
|
||||
]);
|
||||
export type PaymentMethod = z.infer<typeof PaymentMethodSchema>;
|
||||
|
||||
export const PaymentStatusSchema = z.enum([
|
||||
"PENDING",
|
||||
"PARTIALLY_PAID",
|
||||
"PAID",
|
||||
"OVERPAID",
|
||||
"DENIED",
|
||||
"VOID",
|
||||
]);
|
||||
export type PaymentStatus = z.infer<typeof PaymentStatusSchema>;
|
||||
|
||||
export const NotificationTypesSchema = z.enum([
|
||||
"BACKUP",
|
||||
"CLAIM",
|
||||
"PAYMENT",
|
||||
"ETC",
|
||||
]);
|
||||
export type NotificationTypes = z.infer<typeof NotificationTypesSchema>;
|
||||
|
||||
export const ProcedureSourceSchema = z.enum(["COMBO", "MANUAL"]);
|
||||
export type ProcedureSource = z.infer<typeof ProcedureSourceSchema>;
|
||||
|
||||
export const PdfTitleKeySchema = z.enum([
|
||||
"INSURANCE_CLAIM",
|
||||
"INSURANCE_CLAIM_PREAUTH",
|
||||
"ELIGIBILITY_STATUS",
|
||||
"CLAIM_STATUS",
|
||||
"OTHER",
|
||||
]);
|
||||
export type PdfTitleKey = z.infer<typeof PdfTitleKeySchema>;
|
||||
|
||||
export const CommunicationChannelSchema = z.enum(["sms", "voice"]);
|
||||
export type CommunicationChannel = z.infer<typeof CommunicationChannelSchema>;
|
||||
|
||||
export const CommunicationDirectionSchema = z.enum(["outbound", "inbound"]);
|
||||
export type CommunicationDirection = z.infer<
|
||||
typeof CommunicationDirectionSchema
|
||||
>;
|
||||
|
||||
export const CommunicationStatusSchema = z.enum([
|
||||
"queued",
|
||||
"sent",
|
||||
"delivered",
|
||||
"failed",
|
||||
"completed",
|
||||
"busy",
|
||||
"no_answer",
|
||||
]);
|
||||
export type CommunicationStatus = z.infer<typeof CommunicationStatusSchema>;
|
||||
|
||||
// ─── Object Schemas ───────────────────────────────────────────────────────────
|
||||
|
||||
export const UserUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
username: z.string(),
|
||||
password: z.string(),
|
||||
});
|
||||
|
||||
export const PatientUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
firstName: z.string(),
|
||||
lastName: z.string(),
|
||||
dateOfBirth: z.string(),
|
||||
phone: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
address: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
status: PatientStatusSchema.optional(),
|
||||
});
|
||||
|
||||
export const StaffUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
firstName: z.string(),
|
||||
lastName: z.string(),
|
||||
role: z.string(),
|
||||
phone: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
userId: z.number().int().optional(),
|
||||
});
|
||||
|
||||
export const AppointmentUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
patientId: z.number().int(),
|
||||
staffId: z.number().int().optional(),
|
||||
date: z.string(),
|
||||
startTime: z.string(),
|
||||
endTime: z.string(),
|
||||
status: z
|
||||
.enum(["SCHEDULED", "COMPLETED", "CANCELLED", "NO_SHOW"])
|
||||
.optional(),
|
||||
notes: z.string().optional(),
|
||||
});
|
||||
|
||||
export const AppointmentProcedureUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
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.optional(),
|
||||
comboKey: z.string().optional().nullable(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const NpiProviderUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
npiNumber: z.string(),
|
||||
providerName: z.string(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const ClaimUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
patientId: z.number().int(),
|
||||
appointmentId: z.number().int().optional(),
|
||||
status: ClaimStatusSchema.optional(),
|
||||
submittedAt: z.string().optional(),
|
||||
paidAt: z.string().optional(),
|
||||
amount: z.number().optional(),
|
||||
insuranceId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const InsuranceCredentialUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
siteKey: z.string(),
|
||||
username: z.string(),
|
||||
password: z.string(),
|
||||
});
|
||||
|
||||
export const PdfFileUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
filename: z.string(),
|
||||
pdfData: z.instanceof(Uint8Array),
|
||||
uploadedAt: z.coerce.date().optional(),
|
||||
groupId: z.number().int(),
|
||||
});
|
||||
|
||||
export const PdfGroupUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
title: z.string(),
|
||||
titleKey: PdfTitleKeySchema.optional(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
patientId: z.number().int(),
|
||||
});
|
||||
|
||||
export const PaymentUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
patientId: z.number().int(),
|
||||
appointmentId: z.number().int().optional(),
|
||||
amount: z.number(),
|
||||
method: PaymentMethodSchema.optional(),
|
||||
status: PaymentStatusSchema.optional(),
|
||||
paymentDate: z.string().optional(),
|
||||
updatedById: z.number().int().optional(),
|
||||
});
|
||||
|
||||
export const ServiceLineTransactionCreateInputObjectSchema = z.object({
|
||||
transactionId: z.string().optional().nullable(),
|
||||
paidAmount: z.number(),
|
||||
adjustedAmount: z.number().optional(),
|
||||
method: PaymentMethodSchema,
|
||||
receivedDate: z.coerce.date(),
|
||||
payerName: z.string().optional().nullable(),
|
||||
notes: z.string().optional().nullable(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const NotificationUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
type: NotificationTypesSchema,
|
||||
message: z.string(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
read: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const DatabaseBackupUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const BackupDestinationUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
path: z.string(),
|
||||
isActive: z.boolean().optional(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const CloudFolderUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
name: z.string(),
|
||||
parentId: z.number().int().optional().nullable(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const CloudFileUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
userId: z.number().int(),
|
||||
name: z.string(),
|
||||
mimeType: z.string().optional().nullable(),
|
||||
fileSize: z.bigint(),
|
||||
folderId: z.number().int().optional().nullable(),
|
||||
isComplete: z.boolean().optional(),
|
||||
totalChunks: z.number().int().optional().nullable(),
|
||||
createdAt: z.coerce.date().optional(),
|
||||
});
|
||||
|
||||
export const CommunicationUncheckedCreateInputObjectSchema = z.object({
|
||||
id: z.number().int().optional(),
|
||||
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.coerce.date().optional(),
|
||||
});
|
||||
24
packages/db/usedSchemas/index.d.ts
vendored
Normal file
24
packages/db/usedSchemas/index.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export * from '../shared/schemas/objects/AppointmentUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/AppointmentProcedureUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/PatientUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/enums/PatientStatus.schema';
|
||||
export * from '../shared/schemas/objects/UserUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/StaffUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/NpiProviderUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/ClaimUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/InsuranceCredentialUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/PdfFileUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/PdfGroupUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/enums/ClaimStatus.schema';
|
||||
export * from '../shared/schemas/objects/PaymentUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/ServiceLineTransactionCreateInput.schema';
|
||||
export * from '../shared/schemas/enums/PaymentMethod.schema';
|
||||
export * from '../shared/schemas/enums/PaymentStatus.schema';
|
||||
export * from '../shared/schemas/enums/NotificationTypes.schema';
|
||||
export * from '../shared/schemas/objects/NotificationUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/DatabaseBackupUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/BackupDestinationUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/CloudFolderUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/CloudFileUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/CommunicationUncheckedCreateInput.schema';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
packages/db/usedSchemas/index.d.ts.map
Normal file
1
packages/db/usedSchemas/index.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,cAAc,kEAAkE,CAAC;AACjF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4DAA4D,CAAA;AAC1E,cAAc,kEAAkE,CAAA;AAChF,cAAc,4DAA4D,CAAA;AAC1E,cAAc,0EAA0E,CAAA;AACxF,cAAc,8DAA8D,CAAA;AAC5E,cAAc,+DAA+D,CAAA;AAC7E,cAAc,4CAA4C,CAAA;AAC1D,cAAc,8DAA8D,CAAA;AAC5E,cAAc,oEAAoE,CAAA;AAClF,cAAc,8CAA8C,CAAA;AAC5D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,kDAAkD,CAAA;AAChE,cAAc,mEAAmE,CAAA;AACjF,cAAc,qEAAqE,CAAA;AACnF,cAAc,wEAAwE,CAAA;AACtF,cAAc,kEAAkE,CAAA;AAChF,cAAc,gEAAgE,CAAA;AAC9E,cAAc,oEAAoE,CAAA"}
|
||||
40
packages/db/usedSchemas/index.js
Normal file
40
packages/db/usedSchemas/index.js
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// using this, as the browser load only the required files , not whole db/shared/schemas/ files.
|
||||
__exportStar(require("../shared/schemas/objects/AppointmentUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/AppointmentProcedureUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/PatientUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/enums/PatientStatus.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/UserUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/StaffUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/NpiProviderUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/ClaimUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/InsuranceCredentialUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/PdfFileUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/PdfGroupUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/enums/ClaimStatus.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/PaymentUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/ServiceLineTransactionCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/enums/PaymentMethod.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/enums/PaymentStatus.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/enums/NotificationTypes.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/NotificationUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/DatabaseBackupUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/BackupDestinationUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/CloudFolderUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/CloudFileUncheckedCreateInput.schema"), exports);
|
||||
__exportStar(require("../shared/schemas/objects/CommunicationUncheckedCreateInput.schema"), exports);
|
||||
24
packages/db/usedSchemas/index.ts
Executable file
24
packages/db/usedSchemas/index.ts
Executable file
@@ -0,0 +1,24 @@
|
||||
// using this, as the browser load only the required files , not whole db/shared/schemas/ files.
|
||||
export * from '../shared/schemas/objects/AppointmentUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/AppointmentProcedureUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/PatientUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/enums/PatientStatus.schema';
|
||||
export * from '../shared/schemas/objects/UserUncheckedCreateInput.schema';
|
||||
export * from '../shared/schemas/objects/StaffUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/NpiProviderUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/ClaimUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/InsuranceCredentialUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/PdfFileUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/PdfGroupUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/enums/ClaimStatus.schema'
|
||||
export * from '../shared/schemas/objects/PaymentUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/ServiceLineTransactionCreateInput.schema'
|
||||
export * from '../shared/schemas/enums/PaymentMethod.schema'
|
||||
export * from '../shared/schemas/enums/PaymentStatus.schema'
|
||||
export * from '../shared/schemas/enums/NotificationTypes.schema'
|
||||
export * from '../shared/schemas/objects/NotificationUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/DatabaseBackupUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/BackupDestinationUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CloudFolderUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CloudFileUncheckedCreateInput.schema'
|
||||
export * from '../shared/schemas/objects/CommunicationUncheckedCreateInput.schema'
|
||||
Reference in New Issue
Block a user