feat: Check DDMA Payments reads Plan Pays from DDMA claim status, fills app payments and saves a PDF

Adds a Check DDMA Payments card (date range, Go, auto-check schedule) above
Check MH Payments. Go logs into DDMA (with OTP), searches Check Claim Status by
service date range, reads claim numbers and Plan Pays across pages, matches
them to app claims to fill the paid amount, creates patient + payment for
unmatched paid claims, and saves the results page as a PDF in
uploads/DDMAPayment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 22:11:36 -05:00
co-authored by Claude Opus 5.5
parent 2ee45f1b13
commit 432150b7a7
158 changed files with 2944 additions and 191 deletions
+23
View File
@@ -311,4 +311,27 @@ export const startBackupCron = () => {
); );
} }
}); });
// ============================================================
// Every hour — Auto DDMA payment check (runs when day-of-week and hour match setting)
// ============================================================
cron.schedule("0 * * * *", async () => {
const admin = await getAdminUser();
if (!admin) return;
if (!admin.autoDdmaCheckEnabled) return;
const now = new Date();
const currentDayOfWeek = now.getDay(); // 0 = Sunday, 1 = Monday, ..., 6 = Saturday
const currentHour = now.getHours();
const targetDay = admin.autoDdmaCheckDayOfWeek ?? 1;
const targetHour = admin.autoDdmaCheckHour ?? 13;
if (currentDayOfWeek !== targetDay || currentHour !== targetHour) return;
// TODO: run the DDMA payment check for the past 7 days once its logic is
// implemented (same shape as the Auto MH Check above: job log, success/fail
// handling, failure notification).
console.log(`⏭️ [Auto DDMA Check] Scheduled time reached, but DDMA payment check is not implemented yet.`);
});
}; };
+11
View File
@@ -22,6 +22,7 @@ import { runCCAEligibilityProcessor } from "./processors/ccaEligibilityProcessor
import { runCCAClaimProcessor } from "./processors/ccaClaimProcessor"; import { runCCAClaimProcessor } from "./processors/ccaClaimProcessor";
import { runCCAPreAuthProcessor } from "./processors/ccaPreAuthProcessor"; import { runCCAPreAuthProcessor } from "./processors/ccaPreAuthProcessor";
import { runDDMAClaimProcessor } from "./processors/ddmaClaimProcessor"; import { runDDMAClaimProcessor } from "./processors/ddmaClaimProcessor";
import { runDdmaPaymentProcessor } from "./processors/ddmaPaymentProcessor";
import { runMetLifeClaimProcessor } from "./processors/metlifeClaimProcessor"; import { runMetLifeClaimProcessor } from "./processors/metlifeClaimProcessor";
import { runDeltainsClaimProcessor } from "./processors/deltainsClaimProcessor"; import { runDeltainsClaimProcessor } from "./processors/deltainsClaimProcessor";
import { runUnitedDHClaimProcessor } from "./processors/unitedDHClaimProcessor"; import { runUnitedDHClaimProcessor } from "./processors/unitedDHClaimProcessor";
@@ -240,6 +241,16 @@ export function enqueueSeleniumJob(data: SeleniumJobData): string {
job.id job.id
); );
} }
if (jobType === "ddma-payment-check") {
return runDdmaPaymentProcessor(
{
enrichedPayload: data.enrichedPayload,
userId: data.userId,
socketId: data.socketId,
},
job.id
);
}
if (jobType === "metlife-claim-submit") { if (jobType === "metlife-claim-submit") {
return runMetLifeClaimProcessor( return runMetLifeClaimProcessor(
{ {
@@ -233,7 +233,7 @@ async function processDdmaResult(
// ─── Polling loop ──────────────────────────────────────────────────────────── // ─── Polling loop ────────────────────────────────────────────────────────────
async function pollUntilDone( export async function pollUntilDone(
sessionId: string, sessionId: string,
socketId: string | undefined, socketId: string | undefined,
jobId: string, jobId: string,
@@ -0,0 +1,382 @@
/**
* Processor for "ddma-payment-check" jobs.
*
* 1. Start a session on the Python agent (POST /ddma-payment-check)
* 2. Emit selenium:ddma_session_started → frontend stores session_id for OTP
* 3. Poll agent status (emits selenium:otp_required when OTP is needed)
* 4. Match each DDMA claim number to a claim in the app and fill its
* payment's paid amount (mhPaidAmount — the "MH Paid" column, which the
* payments table and commission report use as the insurance-paid amount).
* Only claims DDMA marks "Paid" are filled; "Processed" etc. are not paid yet.
*/
import { prisma } from "@repo/db/client";
import { io } from "../../socket";
import { forwardToSeleniumDdmaPaymentAgent } from "../../services/seleniumDdmaInsuranceEligibilityClient";
import { pollUntilDone } from "./ddmaEligibilityProcessor";
function log(tag: string, msg: string, ctx?: any) {
console.log(`${new Date().toISOString()} [${tag}] ${msg}`, ctx ?? "");
}
function emitToSocket(socketId: string | undefined, event: string, payload: any) {
if (!socketId || !io) return;
try {
const socket = io.sockets.sockets.get(socketId);
if (socket) socket.emit(event, payload);
} catch (err: any) {
log("ddma-payment-processor", `emit failed for ${event}`, { err: err?.message });
}
}
export interface DdmaPaymentProcessorInput {
enrichedPayload: any;
userId: number;
socketId?: string;
}
export interface DdmaClaimPayment {
claimNumber: string;
dateOfService: string;
provider: string;
patientName: string;
planPays: number | null;
planPaysText: string;
status: string;
}
export type DdmaMatchOutcome =
| "updated" // payment paid amount set from Plan Pays
| "unchanged" // payment already had this amount
| "created" // no claim in the app — patient + payment created (like MH PDF import)
| "not_paid_yet" // DDMA status is not "Paid"
| "no_claim" // no claim in the app with this claim number (and not paid, so nothing created)
| "no_payment"; // claim found but it has no payment record
export interface DdmaClaimMatch {
outcome: DdmaMatchOutcome;
appClaimId?: number;
paymentId?: number;
appPatientName?: string;
previousPaid?: number | null;
/** For "created": whether the patient was newly created or an existing one was reused */
patientCreated?: boolean;
patientId?: number;
}
export type DdmaMatchedClaim = DdmaClaimPayment & { match: DdmaClaimMatch };
export interface DdmaPaymentProcessorResult {
message: string;
fromDate?: string;
toDate?: string;
claims: DdmaMatchedClaim[];
summary: Record<DdmaMatchOutcome, number>;
/** Saved results page PDF in uploads/DDMAPayment (view via /api/payments/ddma-payment-pdf/:filename) */
pdfFilename: string | null;
}
const digitsOnly = (s: string | null | undefined) => (s ?? "").replace(/\D/g, "");
const DDMA_PAYER = "Delta Dental MA";
const isPaid = (c: DdmaClaimPayment) =>
(c.status ?? "").trim().toLowerCase() === "paid" && c.planPays != null;
/** "NATHAN ZHANG" → { firstName: "NATHAN", lastName: "ZHANG" } (DDMA shows First Last) */
function splitDdmaName(full: string): { firstName: string; lastName: string } {
const parts = (full ?? "").replace(/\s+/g, " ").trim().split(" ").filter(Boolean);
if (parts.length === 0) return { firstName: "", lastName: "" };
if (parts.length === 1) return { firstName: "", lastName: parts[0]! };
return { firstName: parts[0]!, lastName: parts.slice(1).join(" ") };
}
/** "2026-11-09" → Date at UTC midnight (for @db.Date columns) */
function isoToDate(iso: string): Date {
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(iso ?? "");
return m ? new Date(Date.UTC(+m[1]!, +m[2]! - 1, +m[3]!)) : new Date();
}
/**
* No claim in the app for this DDMA claim number — create the records the same
* way the MH PDF import does: find-or-create the patient, then a payment (no
* claim) with one service line and a DDMA transaction for the Plan Pays amount.
* The DDMA claim number is stored on payment.icn (shown in the Claim No. column)
* and on the service line, so the next run finds this payment instead of
* creating another one.
*/
async function createDdmaPayment(
c: DdmaClaimPayment,
userId: number,
npiProviders: { id: number; providerName: string }[]
): Promise<DdmaClaimMatch> {
const { firstName, lastName } = splitDdmaName(c.patientName);
const paid = c.planPays ?? 0;
const providerKey = (c.provider ?? "").trim().toLowerCase();
const npiProviderId =
npiProviders.find((p) => p.providerName.trim().toLowerCase() === providerKey)?.id ?? null;
return prisma.$transaction(async (tx: typeof prisma) => {
// 1. Find patient by name (prefer one already on Delta Dental MA), else create
const candidates = await tx.patient.findMany({
where: {
firstName: { equals: firstName, mode: "insensitive" },
lastName: { equals: lastName, mode: "insensitive" },
},
orderBy: { id: "asc" },
});
let patient =
candidates.find((p: any) => /delta/i.test(p.insuranceProvider ?? "")) ?? candidates[0] ?? null;
let patientCreated = false;
if (!patient) {
patient = await tx.patient.create({
data: {
firstName,
lastName,
insuranceProvider: DDMA_PAYER,
gender: "",
phone: "",
userId,
},
});
patientCreated = true;
} else if (!patient.insuranceProvider) {
patient = await tx.patient.update({
where: { id: patient.id },
data: { insuranceProvider: DDMA_PAYER },
});
}
// 2. Payment — DDMA doesn't show the billed amount, so billed = Plan Pays
const payment = await tx.payment.create({
data: {
patientId: patient.id,
userId,
npiProviderId,
totalBilled: paid,
totalPaid: paid,
totalAdjusted: 0,
totalDue: 0,
mhPaidAmount: paid,
adjustment: 0,
status: paid > 0 ? "PAID" : "PENDING",
icn: c.claimNumber,
notes: `DDMA import claim ${c.claimNumber}`,
updatedById: userId,
},
});
// 3. One service line for the claim + a DDMA transaction for the paid amount
const line = await tx.serviceLine.create({
data: {
paymentId: payment.id,
icn: c.claimNumber,
procedureCode: "",
procedureDate: isoToDate(c.dateOfService),
totalBilled: paid,
totalPaid: paid,
totalAdjusted: 0,
totalDue: 0,
status: paid > 0 ? "PAID" : "UNPAID",
},
});
if (paid > 0) {
await tx.serviceLineTransaction.create({
data: {
paymentId: payment.id,
serviceLineId: line.id,
transactionId: c.claimNumber,
paidAmount: paid,
method: "EFT",
receivedDate: new Date(),
payerName: DDMA_PAYER,
notes: `DDMA claim ${c.claimNumber}`,
},
});
}
log("ddma-payment-processor", "created patient/payment for unmatched claim", {
claimNumber: c.claimNumber,
patientId: patient.id,
patientCreated,
paymentId: payment.id,
paid,
});
return {
outcome: "created" as const,
paymentId: payment.id,
patientId: patient.id,
patientCreated,
appPatientName: `${patient.firstName} ${patient.lastName}`.trim(),
};
});
}
/**
* Match DDMA claims to app claims by claim number and fill the payment's paid
* amount. Same math as PATCH /api/payments/:id/mh-paid-amount:
* adjustment = max(0, totalBilled − paid − copayment)
* The amount is set (not added), so re-running the check is safe.
* Paid claims with no match get a new patient/payment (createDdmaPayment).
*/
async function applyDdmaPayments(
claims: DdmaClaimPayment[],
userId: number
): Promise<DdmaMatchedClaim[]> {
const variants = new Set<string>();
for (const c of claims) {
const raw = (c.claimNumber ?? "").trim();
if (raw) variants.add(raw);
const d = digitsOnly(raw);
if (d) variants.add(d);
}
if (variants.size === 0) return [];
const appClaims = await prisma.claim.findMany({
where: { claimNumber: { in: [...variants] } },
include: { payment: true },
orderBy: { id: "desc" },
});
const byNumber = new Map<string, (typeof appClaims)[number]>();
for (const ac of appClaims) {
const key = digitsOnly(ac.claimNumber);
if (key && !byNumber.has(key)) byNumber.set(key, ac);
}
// Payments created by earlier DDMA runs (no claim; claim number stored on icn)
const importedPayments = await prisma.payment.findMany({
where: { claimId: null, icn: { in: [...variants] } },
include: { patient: true },
orderBy: { id: "desc" },
});
const importedByNumber = new Map<string, (typeof importedPayments)[number]>();
for (const p of importedPayments) {
const key = digitsOnly(p.icn);
if (key && !importedByNumber.has(key)) importedByNumber.set(key, p);
}
const npiProviders = await prisma.npiProvider.findMany({
select: { id: true, providerName: true },
});
const out: DdmaMatchedClaim[] = [];
for (const c of claims) {
const key = digitsOnly(c.claimNumber);
const appClaim = byNumber.get(key);
let base: Partial<DdmaClaimMatch>;
let payment: any;
if (appClaim) {
base = { appClaimId: appClaim.id, appPatientName: appClaim.patientName };
payment = appClaim.payment;
if (!payment) {
out.push({ ...c, match: { ...base, outcome: "no_payment" } });
continue;
}
} else if (importedByNumber.has(key)) {
payment = importedByNumber.get(key)!;
base = {
appPatientName: payment.patient
? `${payment.patient.firstName} ${payment.patient.lastName}`.trim()
: undefined,
};
} else {
// Not in the app at all — create patient + payment, like the MH import
if (!isPaid(c)) {
out.push({ ...c, match: { outcome: "no_claim" } });
continue;
}
try {
out.push({ ...c, match: await createDdmaPayment(c, userId, npiProviders) });
} catch (err: any) {
log("ddma-payment-processor", "create failed", {
claimNumber: c.claimNumber,
err: err?.message,
});
out.push({ ...c, match: { outcome: "no_claim" } });
}
continue;
}
const previousPaid = payment.mhPaidAmount != null ? Number(payment.mhPaidAmount) : null;
const withPayment = { ...base, paymentId: payment.id, previousPaid };
if (!isPaid(c)) {
out.push({ ...c, match: { ...withPayment, outcome: "not_paid_yet" } });
continue;
}
const planPays = c.planPays!; // isPaid() guarantees non-null
if (previousPaid != null && Math.abs(previousPaid - planPays) < 0.005) {
out.push({ ...c, match: { ...withPayment, outcome: "unchanged" } });
continue;
}
const totalBilled = Number(payment.totalBilled);
const copayment = Number(payment.copayment ?? 0);
const adjustment = Math.max(0, totalBilled - planPays - copayment);
await prisma.payment.update({
where: { id: payment.id },
data: { mhPaidAmount: planPays, adjustment, updatedById: userId },
});
log("ddma-payment-processor", "payment updated", {
paymentId: payment.id,
claimNumber: c.claimNumber,
planPays,
previousPaid,
});
out.push({ ...c, match: { ...withPayment, outcome: "updated" } });
}
return out;
}
export async function runDdmaPaymentProcessor(
input: DdmaPaymentProcessorInput,
jobId: string
): Promise<DdmaPaymentProcessorResult> {
const { enrichedPayload, socketId, userId } = input;
log("ddma-payment-processor", "starting Python agent session", {
fromDate: enrichedPayload?.fromDate,
toDate: enrichedPayload?.toDate,
});
const agentResp = await forwardToSeleniumDdmaPaymentAgent(enrichedPayload);
if (!agentResp?.session_id) {
throw new Error("Python agent did not return a session_id for DDMA payment check");
}
const sessionId = agentResp.session_id as string;
emitToSocket(socketId, "selenium:ddma_session_started", { session_id: sessionId, jobId });
const seleniumResult = await pollUntilDone(sessionId, socketId, jobId);
if (!seleniumResult || seleniumResult.status === "error") {
throw new Error(seleniumResult?.message ?? "DDMA payment session returned an error result");
}
const ddmaClaims: DdmaClaimPayment[] = Array.isArray(seleniumResult.claims)
? seleniumResult.claims
: [];
const claims = await applyDdmaPayments(ddmaClaims, userId);
const summary: Record<DdmaMatchOutcome, number> = {
updated: 0,
unchanged: 0,
created: 0,
not_paid_yet: 0,
no_claim: 0,
no_payment: 0,
};
for (const c of claims) summary[c.match.outcome]++;
log("ddma-payment-processor", "done", { claimCount: claims.length, summary });
return {
message: `Found ${claims.length} DDMA claim(s); ${summary.updated} payment(s) updated, ${summary.created} created`,
fromDate: seleniumResult.fromDate,
toDate: seleniumResult.toDate,
claims,
summary,
pdfFilename: seleniumResult.pdfFilename ?? null,
};
}
+1
View File
@@ -17,6 +17,7 @@ export type SeleniumJobType =
| "cca-claim-submit" | "cca-claim-submit"
| "cca-preauth-submit" | "cca-preauth-submit"
| "ddma-claim-submit" | "ddma-claim-submit"
| "ddma-payment-check"
| "metlife-claim-submit" | "metlife-claim-submit"
| "deltains-claim-submit" | "deltains-claim-submit"
| "tuftssco-claim-submit" | "tuftssco-claim-submit"
@@ -369,6 +369,42 @@ router.put("/auto-mh-check-setting", async (req, res) => {
}); });
}); });
// GET auto DDMA check setting
router.get("/auto-ddma-check-setting", async (req, res) => {
const userId = req.user?.id;
if (!userId) return res.status(401).json({ error: "Unauthorized" });
const user = await storage.getUser(userId);
if (!user) return res.status(404).json({ error: "User not found" });
res.json({
autoDdmaCheckEnabled: user.autoDdmaCheckEnabled,
autoDdmaCheckDayOfWeek: user.autoDdmaCheckDayOfWeek ?? 1,
autoDdmaCheckHour: user.autoDdmaCheckHour ?? 13,
});
});
// PUT auto DDMA check setting
router.put("/auto-ddma-check-setting", async (req, res) => {
const userId = req.user?.id;
if (!userId) return res.status(401).json({ error: "Unauthorized" });
const { autoDdmaCheckEnabled, autoDdmaCheckDayOfWeek, autoDdmaCheckHour } = req.body;
const patch: any = {};
if (typeof autoDdmaCheckEnabled === "boolean") patch.autoDdmaCheckEnabled = autoDdmaCheckEnabled;
if (typeof autoDdmaCheckDayOfWeek === "number") patch.autoDdmaCheckDayOfWeek = autoDdmaCheckDayOfWeek;
if (typeof autoDdmaCheckHour === "number") patch.autoDdmaCheckHour = autoDdmaCheckHour;
const updated = await storage.updateUser(userId, patch);
if (!updated) return res.status(404).json({ error: "User not found" });
res.json({
autoDdmaCheckEnabled: updated.autoDdmaCheckEnabled,
autoDdmaCheckDayOfWeek: updated.autoDdmaCheckDayOfWeek ?? 1,
autoDdmaCheckHour: updated.autoDdmaCheckHour ?? 13,
});
});
router.post("/backup-path", async (req, res) => { router.post("/backup-path", async (req, res) => {
const userId = req.user?.id; const userId = req.user?.id;
if (!userId) return res.status(401).json({ error: "Unauthorized" }); if (!userId) return res.status(401).json({ error: "Unauthorized" });
+69
View File
@@ -17,6 +17,12 @@ import { PaymentStatusSchema } from "@repo/db/types";
import * as paymentService from "../services/paymentService"; import * as paymentService from "../services/paymentService";
import { callPythonSync } from "../queue/processors/_shared"; import { callPythonSync } from "../queue/processors/_shared";
import { runMhBatchPaymentCheck } from "../services/mhBatchPaymentService"; import { runMhBatchPaymentCheck } from "../services/mhBatchPaymentService";
import { enqueueSeleniumJob } from "../queue/jobRunner";
import path from "path";
import fs from "fs";
// DDMA payment check results PDFs (saved by the Selenium service, like MHVoucher)
const DDMA_PAYMENT_PDF_DIR = path.join(__dirname, "..", "..", "uploads", "DDMAPayment");
const paymentFilterSchema = z.object({ const paymentFilterSchema = z.object({
from: z.string().datetime(), from: z.string().datetime(),
@@ -211,6 +217,69 @@ router.post(
} }
); );
// GET /api/payments/ddma-payment-pdf/:filename — view a saved DDMA claims results PDF
router.get(
"/ddma-payment-pdf/:filename",
async (req: Request, res: Response): Promise<any> => {
const userId = req.user?.id;
if (!userId) return res.status(401).json({ message: "Unauthorized" });
const filename = path.basename(String(req.params.filename ?? ""));
if (!/^ddma_claims_[\w-]+\.pdf$/.test(filename)) {
return res.status(400).json({ message: "Invalid file name" });
}
const filePath = path.join(DDMA_PAYMENT_PDF_DIR, filename);
if (!fs.existsSync(filePath)) {
return res.status(404).json({ message: "PDF not found" });
}
res.setHeader("Content-Type", "application/pdf");
res.setHeader("Content-Disposition", `inline; filename="${filename}"`);
return res.sendFile(filePath);
}
);
// POST /api/payments/ddma-payment-check
// Enqueues a DDMA payment check (opens DDMA and logs in; OTP handled over socket.io
// via /api/insurance-status-ddma/selenium/submit-otp, same as DDMA eligibility).
router.post(
"/ddma-payment-check",
async (req: Request, res: Response): Promise<any> => {
try {
const userId = req.user?.id;
if (!userId) return res.status(401).json({ message: "Unauthorized" });
const { fromDate, toDate, socketId } = req.body;
if (!fromDate || !toDate) {
return res.status(400).json({ message: "fromDate and toDate are required" });
}
const credentials = await storage.getInsuranceCredentialByUserAndSiteKey(userId, "DDMA");
if (!credentials) {
return res.status(404).json({
message: "No DDMA credentials found. Please add them on the Settings page.",
});
}
const jobId = enqueueSeleniumJob({
jobType: "ddma-payment-check",
userId,
socketId,
enrichedPayload: {
fromDate,
toDate,
massddmaUsername: credentials.username,
massddmaPassword: credentials.password,
},
});
return res.json({ status: "queued", jobId });
} catch (err: unknown) {
const message = err instanceof Error ? err.message : "Failed to start DDMA payment check";
return res.status(500).json({ message });
}
}
);
// POST /api/payments/:claimId // POST /api/payments/:claimId
router.post("/:claimId", async (req: Request, res: Response): Promise<any> => { router.post("/:claimId", async (req: Request, res: Response): Promise<any> => {
try { try {
@@ -78,6 +78,24 @@ export async function forwardToSeleniumDdmaEligibilityAgent(
return r.data; return r.data;
} }
export async function forwardToSeleniumDdmaPaymentAgent(
paymentCheckData: any
): Promise<any> {
const payload = { data: paymentCheckData };
const url = `/ddma-payment-check`;
log("selenium-client", "POST ddma-payment-check", {
url: SELENIUM_AGENT_BASE + url,
});
const r = await requestWithRetries({ url, method: "POST", data: payload }, 4);
log("selenium-client", "agent response", {
status: r.status,
dataKeys: r.data ? Object.keys(r.data) : null,
});
if (r.status >= 500)
throw new Error(`Selenium agent server error: ${r.status}`);
return r.data;
}
export async function forwardOtpToSeleniumDdmaAgent( export async function forwardOtpToSeleniumDdmaAgent(
sessionId: string, sessionId: string,
otp: string otp: string
@@ -18,9 +18,17 @@ interface DdmaOtpModalProps {
onClose: () => void; onClose: () => void;
onSubmit: (otp: string) => Promise<void> | void; onSubmit: (otp: string) => Promise<void> | void;
isSubmitting: boolean; isSubmitting: boolean;
/** What the OTP is for, shown in the description. Defaults to "eligibility check". */
purpose?: string;
} }
function DdmaOtpModal({ open, onClose, onSubmit, isSubmitting }: DdmaOtpModalProps) { export function DdmaOtpModal({
open,
onClose,
onSubmit,
isSubmitting,
purpose = "eligibility check",
}: DdmaOtpModalProps) {
const [otp, setOtp] = useState(""); const [otp, setOtp] = useState("");
useEffect(() => { useEffect(() => {
@@ -45,8 +53,8 @@ function DdmaOtpModal({ open, onClose, onSubmit, isSubmitting }: DdmaOtpModalPro
</button> </button>
</div> </div>
<p className="text-sm text-slate-500 mb-4"> <p className="text-sm text-slate-500 mb-4">
We need the one-time password (OTP) sent by the Delta Dental MA portal to complete this We need the one-time password (OTP) sent by the Delta Dental MA portal to complete this{" "}
eligibility check. {purpose}.
</p> </p>
<form onSubmit={handleSubmit} className="space-y-4"> <form onSubmit={handleSubmit} className="space-y-4">
<div className="space-y-2"> <div className="space-y-2">
@@ -0,0 +1,193 @@
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { FileText } from "lucide-react";
import { apiRequest } from "@/lib/queryClient";
import { toast } from "@/hooks/use-toast";
export type DdmaMatchOutcome =
| "updated"
| "unchanged"
| "created"
| "not_paid_yet"
| "no_claim"
| "no_payment";
export interface DdmaClaimPayment {
claimNumber: string;
dateOfService: string;
provider: string;
patientName: string;
planPays: number | null;
planPaysText: string;
status: string;
match?: {
outcome: DdmaMatchOutcome;
appClaimId?: number;
paymentId?: number;
appPatientName?: string;
previousPaid?: number | null;
patientCreated?: boolean;
patientId?: number;
};
}
export interface DdmaClaimPaymentsResult {
fromDate?: string;
toDate?: string;
claims: DdmaClaimPayment[];
summary?: Partial<Record<DdmaMatchOutcome, number>>;
/** Saved PDF of the DDMA claims results page */
pdfFilename?: string | null;
}
async function openDdmaPdf(filename: string) {
// Open the tab first (synchronously) so the browser doesn't block it as a popup
const tab = window.open("", "_blank");
try {
const res = await apiRequest(
"GET",
`/api/payments/ddma-payment-pdf/${encodeURIComponent(filename)}`
);
if (!res.ok) throw new Error(`Server error (${res.status})`);
const blob = await res.blob();
const url = URL.createObjectURL(blob);
if (tab) tab.location.href = url;
else window.open(url, "_blank");
} catch (e: any) {
tab?.close();
toast({ title: "Could not open PDF", description: e?.message, variant: "destructive" });
}
}
interface Props {
result: DdmaClaimPaymentsResult | null;
onClose: () => void;
}
function formatIsoDate(value: string) {
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value ?? "");
return m ? `${m[2]}/${m[3]}/${m[1]}` : value;
}
const currency = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" });
function MatchCell({ c }: { c: DdmaClaimPayment }) {
const m = c.match;
if (!m) return <span className="text-gray-400">—</span>;
switch (m.outcome) {
case "updated":
return (
<span className="text-green-700">
Paid filled
{m.previousPaid != null && (
<span className="text-gray-500"> (was {currency.format(m.previousPaid)})</span>
)}
</span>
);
case "unchanged":
return <span className="text-gray-600">Already filled</span>;
case "created":
return (
<span className="text-blue-700">
{m.patientCreated ? "New patient + payment created" : "Payment created (existing patient)"}
</span>
);
case "not_paid_yet":
return <span className="text-amber-700">Not paid yet</span>;
case "no_payment":
return <span className="text-red-700">Claim found, no payment record</span>;
case "no_claim":
default:
return <span className="text-red-700">No matching claim in app</span>;
}
}
export default function DdmaClaimPaymentsDialog({ result, onClose }: Props) {
const claims = result?.claims ?? [];
const total = claims.reduce((sum, c) => sum + (c.planPays ?? 0), 0);
const s = result?.summary ?? {};
return (
<Dialog open={!!result} onOpenChange={(open) => !open && onClose()}>
<DialogContent className="max-w-5xl">
<DialogHeader>
<DialogTitle>DDMA Claim Payments</DialogTitle>
<DialogDescription>
{result?.fromDate && result?.toDate
? `Service dates ${formatIsoDate(result.fromDate)} – ${formatIsoDate(result.toDate)}. `
: ""}
{claims.length} claim(s), Plan Pays total {currency.format(total)}.
</DialogDescription>
</DialogHeader>
{result?.pdfFilename && (
<div>
<Button
variant="outline"
size="sm"
onClick={() => openDdmaPdf(result.pdfFilename!)}
>
<FileText className="h-4 w-4 mr-2" />
View PDF
</Button>
</div>
)}
{claims.length > 0 && (
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
<span className="text-green-700">{s.updated ?? 0} filled</span>
<span className="text-gray-600">{s.unchanged ?? 0} already filled</span>
<span className="text-blue-700">{s.created ?? 0} created</span>
<span className="text-amber-700">{s.not_paid_yet ?? 0} not paid yet</span>
<span className="text-red-700">
{(s.no_claim ?? 0) + (s.no_payment ?? 0)} not matched
</span>
</div>
)}
{claims.length === 0 ? (
<p className="text-sm text-gray-500 py-6 text-center">
No DDMA claims found in this date range.
</p>
) : (
<div className="max-h-[60vh] overflow-auto border rounded-md">
<table className="w-full text-sm">
<thead className="bg-gray-50 sticky top-0">
<tr className="text-left">
<th className="px-3 py-2 font-medium">Date of Service</th>
<th className="px-3 py-2 font-medium">Patient</th>
<th className="px-3 py-2 font-medium">Claim Number</th>
<th className="px-3 py-2 font-medium text-right">Plan Pays</th>
<th className="px-3 py-2 font-medium">DDMA Status</th>
<th className="px-3 py-2 font-medium">In App</th>
</tr>
</thead>
<tbody>
{claims.map((c) => (
<tr key={c.claimNumber} className="border-t">
<td className="px-3 py-1.5 whitespace-nowrap">{formatIsoDate(c.dateOfService)}</td>
<td className="px-3 py-1.5">{c.patientName}</td>
<td className="px-3 py-1.5 font-mono">{c.claimNumber}</td>
<td className="px-3 py-1.5 text-right tabular-nums">
{c.planPays != null ? currency.format(c.planPays) : c.planPaysText}
</td>
<td className="px-3 py-1.5">{c.status}</td>
<td className="px-3 py-1.5">
<MatchCell c={c} />
</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</DialogContent>
</Dialog>
);
}
@@ -681,6 +681,9 @@ export default function PaymentsRecentTable({
<TableCell> <TableCell>
{payment.claim?.claimNumber ? ( {payment.claim?.claimNumber ? (
<span className="text-sm font-mono">{payment.claim.claimNumber}</span> <span className="text-sm font-mono">{payment.claim.claimNumber}</span>
) : payment.notes?.startsWith("DDMA import") && payment.icn ? (
// Created by Check DDMA Payments (no claim in app) — claim number kept on icn
<span className="text-sm font-mono">{payment.icn}</span>
) : payment.notes?.startsWith("PDF import") ? ( ) : payment.notes?.startsWith("PDF import") ? (
<span className="text-xs font-medium bg-blue-100 text-blue-800 px-2 py-0.5 rounded-full">PDF Import</span> <span className="text-xs font-medium bg-blue-100 text-blue-800 px-2 py-0.5 rounded-full">PDF Import</span>
) : ( ) : (
+371 -2
View File
@@ -9,7 +9,13 @@ import {
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Switch } from "@/components/ui/switch"; import { Switch } from "@/components/ui/switch";
import { Label } from "@/components/ui/label"; import { Label } from "@/components/ui/label";
import { DollarSign, CalendarIcon } from "lucide-react"; import { DollarSign, CalendarIcon, LoaderCircleIcon } from "lucide-react";
import { DdmaOtpModal } from "@/components/insurance-status/ddma-buton-modal";
import DdmaClaimPaymentsDialog, {
DdmaClaimPaymentsResult,
} from "@/components/payments/ddma-claim-payments-dialog";
import { socket } from "@/lib/socket";
import { formatLocalDate } from "@/utils/dateUtils";
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -29,7 +35,8 @@ import PaymentOCRBlock from "@/components/payments/payment-ocr-block";
import PaymentUploadDocumentsBlock from "@/components/payments/payment-upload-documents-block"; import PaymentUploadDocumentsBlock from "@/components/payments/payment-upload-documents-block";
import { useLocation } from "wouter"; import { useLocation } from "wouter";
import { Patient, PaymentWithExtras } from "@repo/db/types"; import { Patient, PaymentWithExtras } from "@repo/db/types";
import { apiRequest } from "@/lib/queryClient"; import { apiRequest, queryClient } from "@/lib/queryClient";
import { QK_PAYMENTS_RECENT_BASE } from "@/components/payments/payments-recent-table";
import { toast } from "@/hooks/use-toast"; import { toast } from "@/hooks/use-toast";
import PaymentEditModal from "@/components/payments/payment-edit-modal"; import PaymentEditModal from "@/components/payments/payment-edit-modal";
@@ -64,6 +71,12 @@ export default function PaymentsPage() {
const [autoMhCheckHour, setAutoMhCheckHour] = useState(13); const [autoMhCheckHour, setAutoMhCheckHour] = useState(13);
const [autoMhCheckLoaded, setAutoMhCheckLoaded] = useState(false); const [autoMhCheckLoaded, setAutoMhCheckLoaded] = useState(false);
// Auto DDMA check schedule
const [autoDdmaCheckEnabled, setAutoDdmaCheckEnabled] = useState(false);
const [autoDdmaCheckDay, setAutoDdmaCheckDay] = useState(1);
const [autoDdmaCheckHour, setAutoDdmaCheckHour] = useState(13);
const [autoDdmaCheckLoaded, setAutoDdmaCheckLoaded] = useState(false);
// Check Payments Online date range // Check Payments Online date range
const [mhFromDate, setMhFromDate] = useState<Date | undefined>(undefined); const [mhFromDate, setMhFromDate] = useState<Date | undefined>(undefined);
const [mhToDate, setMhToDate] = useState<Date | undefined>(undefined); const [mhToDate, setMhToDate] = useState<Date | undefined>(undefined);
@@ -72,6 +85,21 @@ export default function PaymentsPage() {
const [fromCalendarOpen, setFromCalendarOpen] = useState(false); const [fromCalendarOpen, setFromCalendarOpen] = useState(false);
const [toCalendarOpen, setToCalendarOpen] = useState(false); const [toCalendarOpen, setToCalendarOpen] = useState(false);
// Check DDMA Payments date range
const [ddmaFromDate, setDdmaFromDate] = useState<Date | undefined>(undefined);
const [ddmaToDate, setDdmaToDate] = useState<Date | undefined>(undefined);
const [ddmaFromText, setDdmaFromText] = useState("");
const [ddmaToText, setDdmaToText] = useState("");
const [ddmaFromCalendarOpen, setDdmaFromCalendarOpen] = useState(false);
const [ddmaToCalendarOpen, setDdmaToCalendarOpen] = useState(false);
// DDMA payment check run (selenium login + OTP)
const [ddmaCheckRunning, setDdmaCheckRunning] = useState(false);
const [ddmaOtpOpen, setDdmaOtpOpen] = useState(false);
const [ddmaOtpSubmitting, setDdmaOtpSubmitting] = useState(false);
const ddmaSessionIdRef = useRef<string | null>(null);
const [ddmaResult, setDdmaResult] = useState<DdmaClaimPaymentsResult | null>(null);
// for auto-open from appointment redirect // for auto-open from appointment redirect
const [location] = useLocation(); const [location] = useLocation();
const [initialPatientForModal, setInitialPatientForModal] = const [initialPatientForModal, setInitialPatientForModal] =
@@ -205,6 +233,163 @@ export default function PaymentsPage() {
} }
}; };
// Load auto DDMA check setting on mount
useEffect(() => {
(async () => {
try {
const res = await apiRequest("GET", "/api/database-management/auto-ddma-check-setting");
if (res.ok) {
const data = await res.json();
setAutoDdmaCheckEnabled(data.autoDdmaCheckEnabled ?? false);
setAutoDdmaCheckDay(data.autoDdmaCheckDayOfWeek ?? 1);
setAutoDdmaCheckHour(data.autoDdmaCheckHour ?? 13);
}
} catch {}
setAutoDdmaCheckLoaded(true);
})();
}, []);
const saveAutoDdmaCheckSetting = async (
enabled: boolean,
day: number,
hour: number
) => {
try {
const res = await apiRequest("PUT", "/api/database-management/auto-ddma-check-setting", {
autoDdmaCheckEnabled: enabled,
autoDdmaCheckDayOfWeek: day,
autoDdmaCheckHour: hour,
});
if (!res.ok) {
toast({ title: "Failed to save auto DDMA check setting", variant: "destructive" });
}
} catch {
toast({ title: "Failed to save auto DDMA check setting", variant: "destructive" });
}
};
// Start DDMA payment check: opens the DDMA portal and logs in (OTP via modal)
const startDdmaPaymentCheck = async () => {
if (!ddmaFromDate || !ddmaToDate) {
toast({ title: "Please select both From and To dates", variant: "destructive" });
return;
}
setDdmaCheckRunning(true);
ddmaSessionIdRef.current = null;
try {
const res = await apiRequest("POST", "/api/payments/ddma-payment-check", {
fromDate: formatLocalDate(ddmaFromDate),
toDate: formatLocalDate(ddmaToDate),
socketId: socket.id,
});
const body = await res.json();
if (!res.ok) throw new Error(body.message || `Server error (${res.status})`);
const jobId: string = body.jobId;
if (!jobId) throw new Error("No jobId returned from server");
toast({ title: "Check DDMA Payments", description: "Opening DDMA and logging in…" });
const onSessionStarted = (data: any) => {
if (String(data?.jobId) !== String(jobId)) return;
ddmaSessionIdRef.current = data.session_id ?? null;
};
const onOtpRequired = (data: any) => {
if (String(data?.jobId) !== String(jobId)) return;
if (data.session_id) ddmaSessionIdRef.current = data.session_id;
setDdmaOtpOpen(true);
};
const onJobUpdate = (data: any) => {
if (String(data?.jobId) !== String(jobId)) return;
if (data.status === "active") return;
cleanup();
setDdmaCheckRunning(false);
setDdmaOtpOpen(false);
if (data.status === "completed") {
setDdmaResult({
fromDate: data.result?.fromDate,
toDate: data.result?.toDate,
claims: Array.isArray(data.result?.claims) ? data.result.claims : [],
summary: data.result?.summary,
pdfFilename: data.result?.pdfFilename ?? null,
});
// Payments may have been filled — refresh the payments table
queryClient.invalidateQueries({ queryKey: QK_PAYMENTS_RECENT_BASE });
} else if (data.status === "failed") {
toast({
title: "DDMA Payment Check Failed",
description: data.error ?? "DDMA payment check failed.",
variant: "destructive",
});
}
};
const safetyTimer = setTimeout(() => {
cleanup();
setDdmaCheckRunning(false);
setDdmaOtpOpen(false);
toast({
title: "DDMA Payment Check",
description: "Timed out waiting for the DDMA login to finish.",
variant: "destructive",
});
}, 6 * 60 * 1000);
function cleanup() {
clearTimeout(safetyTimer);
socket.off("selenium:ddma_session_started", onSessionStarted);
socket.off("selenium:otp_required", onOtpRequired);
socket.off("job:update", onJobUpdate);
}
socket.on("selenium:ddma_session_started", onSessionStarted);
socket.on("selenium:otp_required", onOtpRequired);
socket.on("job:update", onJobUpdate);
} catch (e: any) {
setDdmaCheckRunning(false);
toast({
title: "DDMA Payment Check Failed",
description: e?.message ?? "Failed to start DDMA payment check",
variant: "destructive",
});
}
};
const submitDdmaPaymentOtp = async (otp: string) => {
const sessionId = ddmaSessionIdRef.current;
if (!sessionId) {
toast({
title: "Session not ready",
description: "Cannot submit OTP — DDMA session ID is not available yet.",
variant: "destructive",
});
return;
}
try {
setDdmaOtpSubmitting(true);
const resp = await apiRequest("POST", "/api/insurance-status-ddma/selenium/submit-otp", {
session_id: sessionId,
otp,
socketId: socket.id,
});
const data = await resp.json();
if (!resp.ok || data.error) throw new Error(data.error || "Failed to submit OTP");
setDdmaOtpOpen(false);
} catch (err: any) {
toast({
title: "Failed to submit OTP",
description: err?.message || "Error forwarding OTP to selenium agent",
variant: "destructive",
});
} finally {
setDdmaOtpSubmitting(false);
}
};
return ( return (
<div> <div>
{/* Header */} {/* Header */}
@@ -293,6 +478,190 @@ export default function PaymentsPage() {
</Card> </Card>
</div> </div>
{/* Check DDMA Payments */}
<Card className="mb-6">
<CardHeader>
<CardTitle>Check DDMA Payments</CardTitle>
<CardDescription>
Select a date range and check DDMA payment status online
</CardDescription>
</CardHeader>
<CardContent>
<div className="flex flex-wrap items-center gap-4">
{/* From date picker */}
<div className="flex items-center gap-2">
<span className="text-sm font-medium text-gray-600 whitespace-nowrap">From:</span>
<div className="flex items-center gap-1">
<input
type="text"
placeholder="MM/DD/YYYY"
className="border rounded-md px-2 py-1.5 text-sm w-[110px] focus:outline-none focus:ring-2 focus:ring-ring"
value={ddmaFromText}
onChange={(e) => {
const formatted = formatDateInput(e.target.value);
setDdmaFromText(formatted);
if (formatted === "") { setDdmaFromDate(undefined); return; }
if (/^\d{2}\/\d{2}\/\d{4}$/.test(formatted)) {
const parsed = new Date(formatted);
if (!isNaN(parsed.getTime())) setDdmaFromDate(parsed);
}
}}
/>
<Popover open={ddmaFromCalendarOpen} onOpenChange={setDdmaFromCalendarOpen}>
<PopoverTrigger asChild>
<Button type="button" variant="outline" size="icon" className="h-8 w-8 shrink-0">
<CalendarIcon className="h-4 w-4" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="start">
<Calendar
mode="single"
selected={ddmaFromDate}
onSelect={(d) => {
setDdmaFromDate(d);
setDdmaFromText(d ? d.toLocaleDateString("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }) : "");
setDdmaFromCalendarOpen(false);
}}
onClose={() => setDdmaFromCalendarOpen(false)}
/>
</PopoverContent>
</Popover>
</div>
</div>
{/* To date picker */}
<div className="flex items-center gap-2">
<span className="text-sm font-medium text-gray-600 whitespace-nowrap">To:</span>
<div className="flex items-center gap-1">
<input
type="text"
placeholder="MM/DD/YYYY"
className="border rounded-md px-2 py-1.5 text-sm w-[110px] focus:outline-none focus:ring-2 focus:ring-ring"
value={ddmaToText}
onChange={(e) => {
const formatted = formatDateInput(e.target.value);
setDdmaToText(formatted);
if (formatted === "") { setDdmaToDate(undefined); return; }
if (/^\d{2}\/\d{2}\/\d{4}$/.test(formatted)) {
const parsed = new Date(formatted);
if (!isNaN(parsed.getTime())) setDdmaToDate(parsed);
}
}}
/>
<Popover open={ddmaToCalendarOpen} onOpenChange={setDdmaToCalendarOpen}>
<PopoverTrigger asChild>
<Button type="button" variant="outline" size="icon" className="h-8 w-8 shrink-0">
<CalendarIcon className="h-4 w-4" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="start">
<Calendar
mode="single"
selected={ddmaToDate}
onSelect={(d) => {
setDdmaToDate(d);
setDdmaToText(d ? d.toLocaleDateString("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }) : "");
setDdmaToCalendarOpen(false);
}}
onClose={() => setDdmaToCalendarOpen(false)}
/>
</PopoverContent>
</Popover>
</div>
</div>
{/* DDMA Payment Check button */}
<Button
variant="default"
disabled={ddmaCheckRunning}
onClick={startDdmaPaymentCheck}
>
{ddmaCheckRunning ? (
<>
<LoaderCircleIcon className="h-4 w-4 mr-2 animate-spin" />
Processing...
</>
) : (
"Go"
)}
</Button>
<DdmaOtpModal
open={ddmaOtpOpen}
onClose={() => setDdmaOtpOpen(false)}
onSubmit={submitDdmaPaymentOtp}
isSubmitting={ddmaOtpSubmitting}
purpose="payment check"
/>
<DdmaClaimPaymentsDialog result={ddmaResult} onClose={() => setDdmaResult(null)} />
{/* Auto check DDMA payment toggle */}
{autoDdmaCheckLoaded && (
<div className="flex flex-wrap items-center gap-3 ml-2 pl-4 border-l border-gray-200">
<div className="flex items-center gap-2">
<Switch
id="auto-ddma-check"
checked={autoDdmaCheckEnabled}
onCheckedChange={(checked) => {
setAutoDdmaCheckEnabled(checked);
saveAutoDdmaCheckSetting(checked, autoDdmaCheckDay, autoDdmaCheckHour);
}}
/>
<Label htmlFor="auto-ddma-check" className="text-sm font-medium whitespace-nowrap cursor-pointer">
Auto Check DDMA Payment
</Label>
</div>
{autoDdmaCheckEnabled && (
<>
<Select
value={String(autoDdmaCheckDay)}
onValueChange={(v) => {
const day = Number(v);
setAutoDdmaCheckDay(day);
saveAutoDdmaCheckSetting(autoDdmaCheckEnabled, day, autoDdmaCheckHour);
}}
>
<SelectTrigger className="w-[140px]">
<SelectValue placeholder="Day" />
</SelectTrigger>
<SelectContent>
{DAYS_OF_WEEK.map((d) => (
<SelectItem key={d.value} value={String(d.value)}>
{d.label}
</SelectItem>
))}
</SelectContent>
</Select>
<Select
value={String(autoDdmaCheckHour)}
onValueChange={(v) => {
const hour = Number(v);
setAutoDdmaCheckHour(hour);
saveAutoDdmaCheckSetting(autoDdmaCheckEnabled, autoDdmaCheckDay, hour);
}}
>
<SelectTrigger className="w-[130px]">
<SelectValue placeholder="Time" />
</SelectTrigger>
<SelectContent>
{HOURS.map((h) => (
<SelectItem key={h.value} value={String(h.value)}>
{h.label}
</SelectItem>
))}
</SelectContent>
</Select>
</>
)}
</div>
)}
</div>
</CardContent>
</Card>
{/* Check Payments Online */} {/* Check Payments Online */}
<Card className="mb-6"> <Card className="mb-6">
<CardHeader> <CardHeader>
+2 -1
View File
@@ -8,4 +8,5 @@ chrome_profile_ddwa/
chrome_profile_deltaindiv/ chrome_profile_deltaindiv/
chrome_profile_dentaquest/ chrome_profile_dentaquest/
chrome_profile_masshealth/ chrome_profile_masshealth/
chrome_profile_*/ chrome_profile_*/
debug_ddma_payment/
+45
View File
@@ -30,6 +30,7 @@ import helpers_cca_eligibility as hcca
import helpers_cca_claim as hcca_claim import helpers_cca_claim as hcca_claim
import helpers_cca_preauth as hcca_preauth import helpers_cca_preauth as hcca_preauth
import helpers_ddma_claim as hddma_claim import helpers_ddma_claim as hddma_claim
import helpers_ddma_payment as hddma_payment
import helpers_deltains_claim as hdeltains_claim import helpers_deltains_claim as hdeltains_claim
import helpers_uniteddh_claim as huniteddh_claim import helpers_uniteddh_claim as huniteddh_claim
import helpers_uniteddh_preauth as huniteddh_preauth import helpers_uniteddh_preauth as huniteddh_preauth
@@ -474,6 +475,46 @@ async def ddma_eligibility(request: Request):
return {"status": "started", "session_id": sid} return {"status": "started", "session_id": sid}
# Endpoint: DDMA payment check (background, OTP)
async def _ddma_payment_worker_wrapper(sid: str, data: dict, url: str):
"""Background worker for DDMA payment check — acquires semaphore, updates counters."""
global active_jobs, waiting_jobs
async with semaphore:
async with lock:
waiting_jobs -= 1
active_jobs += 1
try:
await hddma_payment.start_ddma_payment_run(sid, data, url)
finally:
async with lock:
active_jobs -= 1
@app.post("/ddma-payment-check")
async def ddma_payment_check(request: Request):
"""
Starts a DDMA payment check session in the background (logs in to DDMA).
Body: { "data": { "massddmaUsername", "massddmaPassword", "fromDate", "toDate" } }
Returns: { status: "started", session_id: "<uuid>" }
"""
global waiting_jobs
body = await request.json()
data = body.get("data", {})
sid = hddma_payment.make_session_entry()
hddma_payment.sessions[sid]["type"] = "ddma_payment_check"
hddma_payment.sessions[sid]["last_activity"] = time.time()
async with lock:
waiting_jobs += 1
asyncio.create_task(_ddma_payment_worker_wrapper(sid, data, url="https://www.deltadentalma.com/sign-in"))
return {"status": "started", "session_id": sid}
# Endpoint: DDWA (Delta Dental of Washington) eligibility (background, OTP) # Endpoint: DDWA (Delta Dental of Washington) eligibility (background, OTP)
async def _ddwa_worker_wrapper(sid: str, data: dict, url: str): async def _ddwa_worker_wrapper(sid: str, data: dict, url: str):
@@ -1373,6 +1414,8 @@ async def submit_otp(request: Request):
res = hdentaquest.submit_otp(sid, otp) res = hdentaquest.submit_otp(sid, otp)
elif sid in hddma_claim.sessions: elif sid in hddma_claim.sessions:
res = hddma_claim.submit_otp(sid, otp) res = hddma_claim.submit_otp(sid, otp)
elif sid in hddma_payment.sessions:
res = hddma_payment.submit_otp(sid, otp)
elif sid in hdeltains_claim.sessions: elif sid in hdeltains_claim.sessions:
res = hdeltains_claim.submit_otp(sid, otp) res = hdeltains_claim.submit_otp(sid, otp)
elif sid in huniteddh_claim.sessions: elif sid in huniteddh_claim.sessions:
@@ -1424,6 +1467,8 @@ async def session_status(sid: str):
s = hcca_preauth.get_session_status(sid) s = hcca_preauth.get_session_status(sid)
elif sid in hddma_claim.sessions: elif sid in hddma_claim.sessions:
s = hddma_claim.get_session_status(sid) s = hddma_claim.get_session_status(sid)
elif sid in hddma_payment.sessions:
s = hddma_payment.get_session_status(sid)
elif sid in hdeltains_claim.sessions: elif sid in hdeltains_claim.sessions:
s = hdeltains_claim.get_session_status(sid) s = hdeltains_claim.get_session_status(sid)
elif sid in huniteddh_claim.sessions: elif sid in huniteddh_claim.sessions:
@@ -0,0 +1,766 @@
import os
import re
import time
import base64
import asyncio
from datetime import date, datetime
from typing import Dict, Any
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import WebDriverException, TimeoutException
# Reuse the DDMA eligibility worker for login (same persistent browser + device trust)
from selenium_DDMA_eligibilityCheckWorker import AutomationDeltaDentalMAEligibilityCheck
# In-memory session store
sessions: Dict[str, Dict[str, Any]] = {}
SESSION_OTP_TIMEOUT = int(os.getenv("SESSION_OTP_TIMEOUT", "120")) # seconds
DDMA_DASHBOARD_URL = "https://www.deltadentalma.com/private/provider/dashboard"
MEMBER_SEARCH_XPATH = "//a[contains(@href, 'check-patient-benefits-search')]"
CLAIMS_STATUS_PATH = "/private/provider/claims-status-search"
CLAIMS_STATUS_URL = "https://www.deltadentalma.com" + CLAIMS_STATUS_PATH
MAX_CLAIM_PAGES = 100
# Same place the MH batch check saves its PDFs (Backend/uploads/MHVoucher)
DDMA_PAYMENT_PDF_DIR = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "Backend", "uploads", "DDMAPayment")
)
# ─── Claim status page helpers (sync — run via asyncio.to_thread) ────────────
def _parse_iso_date(value: str | None) -> date | None:
if not value:
return None
try:
return datetime.strptime(value[:10], "%Y-%m-%d").date()
except ValueError:
return None
def _parse_portal_date(text: str) -> date | None:
"""Portal shows dates like 'Nov 25, 2026' (fallback: 11/25/2026)."""
text = (text or "").strip()
for fmt in ("%b %d, %Y", "%B %d, %Y", "%m/%d/%Y"):
try:
return datetime.strptime(text, fmt).date()
except ValueError:
continue
return None
def _parse_amount(text: str) -> float | None:
cleaned = re.sub(r"[^0-9.\-]", "", text or "")
if not cleaned:
return None
try:
return round(float(cleaned), 2)
except ValueError:
return None
def _click_claim_status_link(driver, timeout: int = 15) -> bool:
"""
Click the visible 'Check Claim Status' quick link. The page has several links
to the same URL (some hidden in menus), so pick a displayed one, preferring
the QuickLink button.
"""
xpaths = [
f"//a[contains(@class, 'QuickLink') and contains(@href, '{CLAIMS_STATUS_PATH}')]",
"//a[normalize-space(.)='Check Claim Status']",
f"//a[contains(@href, '{CLAIMS_STATUS_PATH}')]",
]
deadline = time.time() + timeout
while time.time() < deadline:
for xp in xpaths:
for link in driver.find_elements(By.XPATH, xp):
try:
if not link.is_displayed():
continue
driver.execute_script("arguments[0].scrollIntoView({block: 'center'});", link)
time.sleep(0.3)
driver.execute_script("arguments[0].click();", link)
print(f"[DDMA Payment] Clicked 'Check Claim Status' ({xp})")
return True
except Exception as e:
print(f"[DDMA Payment] Link click failed: {e}")
time.sleep(0.5)
return False
def _wait_for_claims_table(driver, timeout: int = 30) -> bool:
"""
Wait until the claims table is readable. Checks the main page and any iframes;
leaves the driver switched into whichever frame holds the table.
"""
deadline = time.time() + timeout
while time.time() < deadline:
try:
driver.switch_to.default_content()
if driver.execute_script(_READ_TABLE_JS):
return True
for i, _ in enumerate(driver.find_elements(By.TAG_NAME, "iframe")):
try:
driver.switch_to.default_content()
driver.switch_to.frame(i)
if driver.execute_script(_READ_TABLE_JS):
print(f"[DDMA Payment] Claims table found inside iframe #{i}")
return True
except Exception:
continue
except Exception:
pass
time.sleep(1)
driver.switch_to.default_content()
return False
def _save_debug_snapshot(driver, tag: str) -> None:
"""Save the current page HTML + screenshot so we can see what Selenium saw."""
try:
debug_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "debug_ddma_payment")
os.makedirs(debug_dir, exist_ok=True)
stamp = datetime.now().strftime("%Y%m%d_%H%M%S")
base = os.path.join(debug_dir, f"{tag}_{stamp}")
try:
driver.switch_to.default_content()
except Exception:
pass
with open(base + ".html", "w", encoding="utf-8") as f:
f.write(driver.page_source)
driver.save_screenshot(base + ".png")
print(f"[DDMA Payment] Saved debug snapshot: {base}.html / .png (URL: {driver.current_url})")
except Exception as e:
print(f"[DDMA Payment] Could not save debug snapshot: {e}")
def _open_claim_status_page(driver):
"""Click the 'Check Claim Status' quick link on the dashboard (fallback: direct URL)."""
driver.switch_to.default_content()
if "dashboard" not in driver.current_url.lower():
driver.get(DDMA_DASHBOARD_URL)
if not _click_claim_status_link(driver):
print("[DDMA Payment] 'Check Claim Status' link not found; navigating directly")
driver.get(CLAIMS_STATUS_URL)
# Wait for the Service From Date box — the claims page is ready once it shows
print(f"[DDMA Payment] Waiting for Service From Date box (URL: {driver.current_url})")
try:
WebDriverWait(driver, 30).until(
EC.visibility_of_element_located((By.XPATH, "//input[@data-test-id='fromDate']"))
)
except TimeoutException:
_save_debug_snapshot(driver, "date_boxes_not_found")
raise RuntimeError(
f"Service date boxes not found on DDMA claim status page (URL: {driver.current_url})"
)
time.sleep(1)
_NO_RESULTS_JS = """
const live = document.getElementById('liveFilterMessage');
if (live && /^\\s*0 results/i.test(live.textContent || '')) return true;
const t = (document.body.innerText || '').toLowerCase();
return /no (claims|results|records)|\\b0 results|nothing found/.test(t);
"""
def _fill_date_field(driver, test_id: str, d: date) -> bool:
"""
Fill the claims page date box (<input data-test-id="fromDate"/"toDate">).
It is a masked mm/dd/yyyy input with a jQuery UI datepicker. Returns True if filled.
"""
target = d.strftime("%m/%d/%Y")
try:
inp = WebDriverWait(driver, 10).until(EC.element_to_be_clickable(
(By.XPATH, f"//input[@data-test-id='{test_id}']")
))
except TimeoutException:
print(f"[DDMA Payment] Could not find '{test_id}' input")
return False
try:
driver.execute_script("arguments[0].scrollIntoView({block: 'center'});", inp)
inp.click()
inp.send_keys(Keys.CONTROL, "a")
inp.send_keys(Keys.BACKSPACE)
# Masked input: type digits only, the mask inserts the slashes
inp.send_keys(d.strftime("%m%d%Y"))
time.sleep(0.3)
# Close the datepicker popup
inp.send_keys(Keys.ESCAPE)
except Exception as e:
print(f"[DDMA Payment] Typing into '{test_id}' failed: {e}")
value = (inp.get_attribute("value") or "").strip()
if value != target:
# Fallback: set the value directly and fire the events the page listens to
print(f"[DDMA Payment] '{test_id}' shows '{value}' after typing; setting via JS")
driver.execute_script(
"""
const el = arguments[0], v = arguments[1];
el.value = v;
el.dispatchEvent(new Event('input', { bubbles: true }));
el.dispatchEvent(new Event('change', { bubbles: true }));
if (window.jQuery) { window.jQuery(el).val(v).trigger('change'); }
""",
inp, target,
)
value = (inp.get_attribute("value") or "").strip()
try:
inp.send_keys(Keys.TAB)
except Exception:
pass
print(f"[DDMA Payment] Filled '{test_id}' = {value} (wanted {target})")
return value == target
_READ_TABLE_JS = """
const text = el => (el.innerText || el.textContent || '').replace(/\\s+/g, ' ').trim();
// Case 0: DDMA claims grid made of divs:
// .grid-container > .tableHeader > .cell ... (headers)
// .containerforResults > .rowResults > .cell (one row per claim)
const gridHdrDiv = Array.from(document.querySelectorAll('.tableHeader'))
.find(h => Array.from(h.children).some(c => /^claim\\s*number$/i.test(text(c))));
if (gridHdrDiv) {
const container = gridHdrDiv.closest('.grid-container') || gridHdrDiv.parentElement;
const headers = Array.from(gridHdrDiv.children).map(text);
const rows = Array.from(container.querySelectorAll('.rowResults'))
.filter(r => r.offsetParent !== null) // skip rows hidden by the live filter
.map(r => Array.from(r.querySelectorAll(':scope > .cell')).map(text))
.filter(cells => cells.length > 1);
if (rows.length) return { headers, rows };
}
// Find the 'Claim number' header cell (th, td, or ARIA column header)
const hdr = Array.from(document.querySelectorAll('th, td, [role=columnheader]'))
.find(el => /^claim\\s*(number|no\\.?|#)\\b/i.test(text(el)) && text(el).length < 40);
if (!hdr) return null;
// Case 1: real <table>
const hdrRow = hdr.closest('tr');
const table = hdr.closest('table');
if (table && hdrRow) {
const headers = Array.from(hdrRow.children).map(text);
const rows = Array.from(table.querySelectorAll('tr'))
.filter(tr => tr !== hdrRow && !tr.querySelector('th'))
.map(tr => Array.from(tr.children).map(text))
.filter(cells => cells.length > 1);
return { headers, rows };
}
// Case 2: ARIA grid made of divs
const grid = hdr.closest('[role=table], [role=grid]');
const gridHdrRow = hdr.closest('[role=row]');
if (grid && gridHdrRow) {
const headers = Array.from(gridHdrRow.children).map(text);
const rows = Array.from(grid.querySelectorAll('[role=row]'))
.filter(r => r !== gridHdrRow)
.map(r => Array.from(r.children).map(text))
.filter(cells => cells.length > 1);
return { headers, rows };
}
return null;
"""
def _read_claims_table(driver) -> list[dict]:
data = driver.execute_script(_READ_TABLE_JS)
if not data:
return []
headers = [h.lower() for h in data.get("headers", [])]
def idx(*names):
for i, h in enumerate(headers):
if any(n in h for n in names):
return i
return None
i_dos = idx("date of service")
i_provider = idx("provider")
i_patient = idx("patient")
i_claim = idx("claim number")
i_pays = idx("plan pays")
i_status = idx("status")
def cell(cells, i):
return cells[i] if i is not None and i < len(cells) else ""
out = []
for cells in data.get("rows", []):
claim_number = cell(cells, i_claim).strip()
if not claim_number:
continue
dos_text = cell(cells, i_dos)
dos = _parse_portal_date(dos_text)
out.append({
"claimNumber": claim_number,
"dateOfService": dos.isoformat() if dos else dos_text,
"provider": cell(cells, i_provider),
"patientName": cell(cells, i_patient),
"planPays": _parse_amount(cell(cells, i_pays)),
"planPaysText": cell(cells, i_pays),
"status": cell(cells, i_status).replace("*", "").strip(),
})
return out
def _go_to_next_page(driver, current_page: int, first_claim_before: str | None) -> bool:
"""
Advance the claims table one page by clicking 'Next →'. Returns True if the
table changed. The DDMA pager (.paginationWrapper) is hidden when there is
only one page, and its Next link has class 'disabled' on the last page.
"""
next_xpaths = [
"//div[contains(@class,'paginationWrapper')]//span[contains(@class,'controlsRight')]//a[contains(@class,'nextLink')]",
"//a[@aria-label='Next' or @aria-label='Next page' or @aria-label='Go to next page']",
"//button[@aria-label='Next' or @aria-label='Next page' or @aria-label='Go to next page']",
"//a[normalize-space(.)='Next' or normalize-space(.)='›' or normalize-space(.)='»' or normalize-space(.)='>']",
"//button[normalize-space(.)='Next' or normalize-space(.)='›' or normalize-space(.)='»' or normalize-space(.)='>']",
f"//a[normalize-space(.)='{current_page + 1}']",
f"//button[normalize-space(.)='{current_page + 1}']",
]
clicked = False
for xp in next_xpaths:
try:
for el in driver.find_elements(By.XPATH, xp):
if not el.is_displayed():
continue
cls = (el.get_attribute("class") or "").lower()
if el.get_attribute("disabled") or el.get_attribute("aria-disabled") == "true" or "disabled" in cls:
continue
driver.execute_script("arguments[0].scrollIntoView({block: 'center'});", el)
driver.execute_script("arguments[0].click();", el)
clicked = True
break
except Exception:
continue
if clicked:
break
if not clicked:
# No enabled Next link (single page, or last page reached)
return False
# Wait for the first row to change
for _ in range(20):
time.sleep(0.5)
rows = _read_claims_table(driver)
if not rows:
return False
if rows[0]["claimNumber"] != first_claim_before:
return True
return False
def _print_page_pdf(driver) -> bytes | None:
"""Print the current page to PDF bytes (same settings as the MH results PDF)."""
try:
result = driver.execute_cdp_cmd("Page.printToPDF", {
"landscape": True,
"printBackground": True,
"preferCSSPageSize": False,
"paperWidth": 11,
"paperHeight": 8.5,
"marginTop": 0.3,
"marginBottom": 0.3,
"marginLeft": 0.3,
"marginRight": 0.3,
"scale": 0.8,
})
return base64.b64decode(result.get("data", ""))
except Exception as e:
print(f"[DDMA Payment] Could not print page to PDF: {e}")
return None
def _save_results_pdf(pdf_pages: list[bytes], from_d: date | None, to_d: date | None) -> str | None:
"""Combine the printed result pages into one PDF in Backend/uploads/DDMAPayment."""
pdf_pages = [p for p in pdf_pages if p]
if not pdf_pages:
return None
try:
os.makedirs(DDMA_PAYMENT_PDF_DIR, exist_ok=True)
safe_from = from_d.strftime("%Y%m%d") if from_d else "start"
safe_to = to_d.strftime("%Y%m%d") if to_d else "end"
stamp = datetime.now().strftime("%Y%m%d_%H%M%S")
pdf_path = os.path.join(
DDMA_PAYMENT_PDF_DIR, f"ddma_claims_{safe_from}_to_{safe_to}_{stamp}.pdf"
)
if len(pdf_pages) == 1:
with open(pdf_path, "wb") as f:
f.write(pdf_pages[0])
else:
import fitz # PyMuPDF
merged = fitz.open()
for page_bytes in pdf_pages:
with fitz.open(stream=page_bytes, filetype="pdf") as part:
merged.insert_pdf(part)
merged.save(pdf_path)
merged.close()
print(f"[DDMA Payment] Saved results PDF: {pdf_path}")
return pdf_path
except Exception as e:
print(f"[DDMA Payment] Error saving results PDF: {e}")
return None
def extract_claim_payments(driver, from_date_str: str | None, to_date_str: str | None) -> dict:
"""
Opens Check Claim Status, enters the service date range (the Patient box is
left empty), and returns:
{ "claims": [{ claimNumber, dateOfService, patientName, provider, planPays, status }, ...],
"pdfPath": "<saved PDF of the results page(s)>" | None }
Only claims whose date of service is within the range are returned.
"""
from_d = _parse_iso_date(from_date_str)
to_d = _parse_iso_date(to_date_str)
_open_claim_status_page(driver)
if from_d:
_fill_date_field(driver, "fromDate", from_d)
if to_d:
_fill_date_field(driver, "toDate", to_d)
# The page refreshes the claims list on its own once both dates are in
time.sleep(3)
print("[DDMA Payment] Waiting for claims list")
if not _wait_for_claims_table(driver):
if driver.execute_script(_NO_RESULTS_JS):
print("[DDMA Payment] Page reports no claims for this date range")
driver.switch_to.default_content()
pdf_path = _save_results_pdf([_print_page_pdf(driver)], from_d, to_d)
return {"claims": [], "pdfPath": pdf_path}
_save_debug_snapshot(driver, "claims_table_not_found")
raise RuntimeError(
f"Claims list did not appear after entering the dates (URL: {driver.current_url})"
)
time.sleep(1)
results: dict[str, dict] = {}
pdf_pages: list[bytes] = []
page = 1
while page <= MAX_CLAIM_PAGES:
rows = _read_claims_table(driver)
print(f"[DDMA Payment] Page {page}: {len(rows)} row(s)")
if not rows:
break
# Save this results page for the PDF (print from the top-level page)
try:
driver.switch_to.default_content()
pdf_pages.append(_print_page_pdf(driver))
finally:
_wait_for_claims_table(driver, timeout=5) # re-enter the table's frame if any
all_older = True
for r in rows:
dos = _parse_iso_date(r["dateOfService"])
if dos and from_d and dos < from_d:
continue
all_older = False
if dos and to_d and dos > to_d:
continue
results.setdefault(r["claimNumber"], r)
# Table is sorted newest first — stop once a whole page is before the range
if all_older:
print("[DDMA Payment] Page is entirely before From date — stopping")
break
if not _go_to_next_page(driver, page, rows[0]["claimNumber"]):
break
page += 1
claims = list(results.values())
print(f"[DDMA Payment] Extracted {len(claims)} claim(s) in range")
driver.switch_to.default_content()
pdf_path = _save_results_pdf(pdf_pages, from_d, to_d)
return {"claims": claims, "pdfPath": pdf_path}
def make_session_entry() -> str:
"""Create a new session entry and return its ID."""
import uuid
sid = str(uuid.uuid4())
sessions[sid] = {
"status": "created", # created → running → waiting_for_otp → completed / error
"created_at": time.time(),
"last_activity": time.time(),
"bot": None,
"driver": None,
"otp_event": asyncio.Event(),
"otp_value": None,
"result": None,
"message": None,
"type": None,
}
return sid
async def cleanup_session(sid: str, message: str | None = None):
"""
Wake any OTP waiter, set final state, and remove the session entry.
NOTE: Does NOT quit the browser driver — the persistent browser stays alive.
"""
s = sessions.get(sid)
if not s:
return
try:
if s.get("status") not in ("completed", "error", "not_found"):
s["status"] = "error"
if message:
s["message"] = message
ev = s.get("otp_event")
if ev and not ev.is_set():
ev.set()
finally:
sessions.pop(sid, None)
print(f"[helpers_ddma_payment] cleaned session {sid}")
async def _remove_session_later(sid: str, delay: int = 20):
await asyncio.sleep(delay)
await cleanup_session(sid)
async def start_ddma_payment_run(sid: str, data: dict, url: str):
"""
DDMA payment check workflow for one session.
Login + OTP handling mirrors helpers_ddma_eligibility.start_ddma_run.
data: { massddmaUsername, massddmaPassword, fromDate, toDate, ... }
"""
s = sessions.get(sid)
if not s:
return {"status": "error", "message": "session not found"}
s["status"] = "running"
s["last_activity"] = time.time()
from_date = data.get("fromDate")
to_date = data.get("toDate")
try:
bot = AutomationDeltaDentalMAEligibilityCheck({"data": data})
bot.config_driver()
s["bot"] = bot
s["driver"] = bot.driver
s["last_activity"] = time.time()
# Navigate to login page
try:
if not url:
raise ValueError("URL not provided for DDMA payment run")
bot.driver.maximize_window()
bot.driver.get(url)
await asyncio.sleep(1)
except Exception as e:
s["status"] = "error"
s["message"] = f"Navigation failed: {e}"
await cleanup_session(sid)
return {"status": "error", "message": s["message"]}
# Login
try:
login_result = bot.login(url)
except WebDriverException as wde:
s["status"] = "error"
s["message"] = f"Selenium driver error during login: {wde}"
await cleanup_session(sid, s["message"])
return {"status": "error", "message": s["message"]}
except Exception as e:
s["status"] = "error"
s["message"] = f"Unexpected error during login: {e}"
await cleanup_session(sid, s["message"])
return {"status": "error", "message": s["message"]}
# ── Path: already logged in (persistent session) ──────────────────────
if isinstance(login_result, str) and login_result == "ALREADY_LOGGED_IN":
print("[DDMA Payment] Session persisted - skipping OTP")
s["status"] = "running"
s["message"] = "Session persisted"
# ── Path: OTP required ────────────────────────────────────────────────
elif isinstance(login_result, str) and login_result == "OTP_REQUIRED":
s["status"] = "waiting_for_otp"
s["message"] = "OTP required for login - please enter OTP"
s["last_activity"] = time.time()
driver = s["driver"]
max_polls = SESSION_OTP_TIMEOUT
login_success = False
print(f"[DDMA Payment OTP] Polling for OTP completion (up to {SESSION_OTP_TIMEOUT}s)...")
for poll in range(max_polls):
await asyncio.sleep(1)
s["last_activity"] = time.time()
try:
# a) App submitted OTP via /submit-otp endpoint
otp_value = s.get("otp_value")
if otp_value:
print(f"[DDMA Payment OTP poll {poll+1}] OTP received from app, typing it in...")
try:
otp_input = driver.find_element(By.XPATH, "//input[@data-test-id='MfaCode']")
otp_input.clear()
otp_input.send_keys(otp_value)
try:
verify_btn = driver.find_element(By.XPATH, "//button[@data-test-id='ConfirmSubmitButton']")
verify_btn.click()
except Exception:
otp_input.send_keys("\n")
print("[DDMA Payment OTP] OTP typed and submitted via app")
s["otp_value"] = None
await asyncio.sleep(3)
except Exception as type_err:
print(f"[DDMA Payment OTP] Failed to type OTP from app: {type_err}")
# b) Check URL — if we're past OTP page, login succeeded
current_url = driver.current_url.lower()
print(f"[DDMA Payment OTP poll {poll+1}/{max_polls}] URL: {current_url[:70]}...")
if "member" in current_url or "dashboard" in current_url or "eligibility" in current_url:
try:
WebDriverWait(driver, 5).until(
EC.presence_of_element_located((By.XPATH, MEMBER_SEARCH_XPATH))
)
print("[DDMA Payment OTP] Dashboard found — login successful!")
login_success = True
break
except TimeoutException:
print("[DDMA Payment OTP] On member page but dashboard link not found, continuing...")
# Check if OTP input is still visible (user hasn't finished)
try:
driver.find_element(By.XPATH, "//input[@data-test-id='MfaCode']")
print(f"[DDMA Payment OTP poll {poll+1}] OTP input still visible - waiting...")
except Exception:
if "sign-in" in current_url:
print("[DDMA Payment OTP] OTP input gone, trying to navigate to dashboard...")
try:
driver.get(DDMA_DASHBOARD_URL)
await asyncio.sleep(2)
except Exception:
pass
except Exception as poll_err:
print(f"[DDMA Payment OTP poll {poll+1}] Error: {poll_err}")
if not login_success:
try:
print("[DDMA Payment OTP] Final attempt - navigating to dashboard...")
driver.get(DDMA_DASHBOARD_URL)
await asyncio.sleep(3)
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, MEMBER_SEARCH_XPATH))
)
print("[DDMA Payment OTP] Dashboard found — login successful!")
login_success = True
except TimeoutException:
s["status"] = "error"
s["message"] = "OTP timeout - login not completed"
await cleanup_session(sid)
return {"status": "error", "message": "OTP not completed in time"}
except Exception as final_err:
s["status"] = "error"
s["message"] = f"OTP verification failed: {final_err}"
await cleanup_session(sid)
return {"status": "error", "message": s["message"]}
if login_success:
s["status"] = "running"
s["message"] = "Login successful after OTP"
# ── Path: login succeeded without OTP ─────────────────────────────────
elif isinstance(login_result, str) and login_result == "SUCCESS":
print("[DDMA Payment] Login succeeded without OTP")
s["status"] = "running"
s["message"] = "Login succeeded"
# ── Path: login error ──────────────────────────────────────────────────
elif isinstance(login_result, str) and login_result.startswith("ERROR"):
s["status"] = "error"
s["message"] = login_result
await cleanup_session(sid)
return {"status": "error", "message": login_result}
print(f"[DDMA Payment] Logged in. Date range: {from_date} → {to_date}")
s["message"] = "Logged in — reading claim status"
s["last_activity"] = time.time()
# ── Claim status page: extract Plan Pays per claim number ─────────────
try:
extracted = await asyncio.to_thread(extract_claim_payments, bot.driver, from_date, to_date)
except Exception as e:
s["status"] = "error"
s["message"] = f"Failed to read DDMA claim status: {e}"
await cleanup_session(sid)
return {"status": "error", "message": s["message"]}
claims = extracted.get("claims", [])
pdf_path = extracted.get("pdfPath")
result = {
"status": "success",
"message": f"Found {len(claims)} DDMA claim(s) between {from_date} and {to_date}",
"fromDate": from_date,
"toDate": to_date,
"claims": claims,
"pdfFilename": os.path.basename(pdf_path) if pdf_path else None,
}
s["status"] = "completed"
s["result"] = result
s["message"] = "completed"
asyncio.create_task(_remove_session_later(sid, 30))
return result
except Exception as e:
s["status"] = "error"
s["message"] = f"worker exception: {e}"
await cleanup_session(sid)
return {"status": "error", "message": s["message"]}
def submit_otp(sid: str, otp: str) -> Dict[str, Any]:
"""Called when the app sends an OTP via POST /submit-otp."""
s = sessions.get(sid)
if not s:
return {"status": "error", "message": "session not found"}
if s.get("status") != "waiting_for_otp":
return {"status": "error", "message": f"session not waiting for OTP (state={s.get('status')})"}
s["otp_value"] = otp
s["last_activity"] = time.time()
try:
s["otp_event"].set()
except Exception:
pass
return {"status": "ok", "message": "otp accepted"}
def get_session_status(sid: str) -> Dict[str, Any]:
s = sessions.get(sid)
if not s:
return {"status": "not_found"}
return {
"session_id": sid,
"status": s.get("status"),
"message": s.get("message"),
"created_at": s.get("created_at"),
"last_activity": s.get("last_activity"),
"result": s.get("result") if s.get("status") == "completed" else None,
}
File diff suppressed because one or more lines are too long
@@ -130,7 +130,10 @@ exports.Prisma.UserScalarFieldEnum = {
usbBackupHour: 'usbBackupHour', usbBackupHour: 'usbBackupHour',
autoMhCheckEnabled: 'autoMhCheckEnabled', autoMhCheckEnabled: 'autoMhCheckEnabled',
autoMhCheckDayOfWeek: 'autoMhCheckDayOfWeek', autoMhCheckDayOfWeek: 'autoMhCheckDayOfWeek',
autoMhCheckHour: 'autoMhCheckHour' autoMhCheckHour: 'autoMhCheckHour',
autoDdmaCheckEnabled: 'autoDdmaCheckEnabled',
autoDdmaCheckDayOfWeek: 'autoDdmaCheckDayOfWeek',
autoDdmaCheckHour: 'autoDdmaCheckHour'
}; };
exports.Prisma.PatientScalarFieldEnum = { exports.Prisma.PatientScalarFieldEnum = {
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "prisma-client-5ef9a1d7eab38844c979ecf827cfa9b9b5ebfdee813a113aab886483d3d210c6", "name": "prisma-client-10fc1ba8a148de6853a1176026aec60e3b4091a8567504245e0a6db7141aa614",
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
"browser": "default.js", "browser": "default.js",
+37 -34
View File
@@ -19,40 +19,43 @@ datasource db {
} }
model User { model User {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
username String @unique username String @unique
password String password String
autoBackupEnabled Boolean @default(true) autoBackupEnabled Boolean @default(true)
autoBackupHour Int @default(20) autoBackupHour Int @default(20)
usbBackupEnabled Boolean @default(false) usbBackupEnabled Boolean @default(false)
usbBackupHour Int @default(21) usbBackupHour Int @default(21)
autoMhCheckEnabled Boolean @default(false) autoMhCheckEnabled Boolean @default(false)
autoMhCheckDayOfWeek Int @default(1) autoMhCheckDayOfWeek Int @default(1)
autoMhCheckHour Int @default(13) autoMhCheckHour Int @default(13)
patients Patient[] autoDdmaCheckEnabled Boolean @default(false)
appointments Appointment[] autoDdmaCheckDayOfWeek Int @default(1)
staff Staff[] autoDdmaCheckHour Int @default(13)
npiProviders NpiProvider[] patients Patient[]
claims Claim[] appointments Appointment[]
insuranceCredentials InsuranceCredential[] staff Staff[]
shoppingVendors ShoppingVendor[] npiProviders NpiProvider[]
updatedPayments Payment[] @relation("PaymentUpdatedBy") claims Claim[]
backups DatabaseBackup[] insuranceCredentials InsuranceCredential[]
backupDestinations BackupDestination[] shoppingVendors ShoppingVendor[]
notifications Notification[] updatedPayments Payment[] @relation("PaymentUpdatedBy")
cloudFolders CloudFolder[] backups DatabaseBackup[]
cloudFiles CloudFile[] backupDestinations BackupDestination[]
communications Communication[] notifications Notification[]
twilioSettings TwilioSettings? cloudFolders CloudFolder[]
telnyxSettings TelnyxSettings? cloudFiles CloudFile[]
aiSettings AiSettings? communications Communication[]
officeHours OfficeHours? twilioSettings TwilioSettings?
officeContact OfficeContact? telnyxSettings TelnyxSettings?
procedureTimeslot ProcedureTimeslot? aiSettings AiSettings?
insuranceContacts InsuranceContact[] officeHours OfficeHours?
patientConversations PatientConversation[] officeContact OfficeContact?
labRxTemplates LabRxTemplate[] procedureTimeslot ProcedureTimeslot?
seleniumSettings SeleniumSettings? insuranceContacts InsuranceContact[]
patientConversations PatientConversation[]
labRxTemplates LabRxTemplate[]
seleniumSettings SeleniumSettings?
} }
model Patient { model Patient {
@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "autoDdmaCheckDayOfWeek" INTEGER NOT NULL DEFAULT 1,
ADD COLUMN "autoDdmaCheckEnabled" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "autoDdmaCheckHour" INTEGER NOT NULL DEFAULT 13;
+115 -113
View File
@@ -19,81 +19,84 @@ datasource db {
} }
model User { model User {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
username String @unique username String @unique
password String password String
autoBackupEnabled Boolean @default(true) autoBackupEnabled Boolean @default(true)
autoBackupHour Int @default(20) autoBackupHour Int @default(20)
usbBackupEnabled Boolean @default(false) usbBackupEnabled Boolean @default(false)
usbBackupHour Int @default(21) usbBackupHour Int @default(21)
autoMhCheckEnabled Boolean @default(false) autoMhCheckEnabled Boolean @default(false)
autoMhCheckDayOfWeek Int @default(1) autoMhCheckDayOfWeek Int @default(1)
autoMhCheckHour Int @default(13) autoMhCheckHour Int @default(13)
patients Patient[] autoDdmaCheckEnabled Boolean @default(false)
appointments Appointment[] autoDdmaCheckDayOfWeek Int @default(1)
staff Staff[] autoDdmaCheckHour Int @default(13)
npiProviders NpiProvider[] patients Patient[]
claims Claim[] appointments Appointment[]
insuranceCredentials InsuranceCredential[] staff Staff[]
shoppingVendors ShoppingVendor[] npiProviders NpiProvider[]
updatedPayments Payment[] @relation("PaymentUpdatedBy") claims Claim[]
backups DatabaseBackup[] insuranceCredentials InsuranceCredential[]
backupDestinations BackupDestination[] shoppingVendors ShoppingVendor[]
notifications Notification[] updatedPayments Payment[] @relation("PaymentUpdatedBy")
cloudFolders CloudFolder[] backups DatabaseBackup[]
cloudFiles CloudFile[] backupDestinations BackupDestination[]
communications Communication[] notifications Notification[]
twilioSettings TwilioSettings? cloudFolders CloudFolder[]
telnyxSettings TelnyxSettings? cloudFiles CloudFile[]
aiSettings AiSettings? communications Communication[]
officeHours OfficeHours? twilioSettings TwilioSettings?
officeContact OfficeContact? telnyxSettings TelnyxSettings?
procedureTimeslot ProcedureTimeslot? aiSettings AiSettings?
insuranceContacts InsuranceContact[] officeHours OfficeHours?
patientConversations PatientConversation[] officeContact OfficeContact?
labRxTemplates LabRxTemplate[] procedureTimeslot ProcedureTimeslot?
seleniumSettings SeleniumSettings? insuranceContacts InsuranceContact[]
patientConversations PatientConversation[]
labRxTemplates LabRxTemplate[]
seleniumSettings SeleniumSettings?
} }
model Patient { model Patient {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
firstName String firstName String
lastName String lastName String
dateOfBirth DateTime? @db.Date dateOfBirth DateTime? @db.Date
gender String gender String
phone String phone String
email String? email String?
address String? address String?
city String? city String?
state String? @default("MA") state String? @default("MA")
zipCode String? zipCode String?
insuranceProvider String? insuranceProvider String?
insuranceId String? insuranceId String?
groupNumber String? groupNumber String?
policyHolder String? policyHolder String?
policyHolderPatientId Int? // patient record of the policy holder, when picked from the DB policyHolderPatientId Int? // patient record of the policy holder, when picked from the DB
policyHolderRelationship String? // ADA box 18: SELF | SPOUSE | DEPENDENT | OTHER policyHolderRelationship String? // ADA box 18: SELF | SPOUSE | DEPENDENT | OTHER
allergies String? allergies String?
medicalConditions String? medicalConditions String?
preferredLanguage String? @default("English") preferredLanguage String? @default("English")
status PatientStatus @default(UNKNOWN) status PatientStatus @default(UNKNOWN)
remainingBenefit String? remainingBenefit String?
thirdPartyInsurance String? thirdPartyInsurance String?
userId Int userId Int
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])
appointments Appointment[] appointments Appointment[]
procedures AppointmentProcedure[] procedures AppointmentProcedure[]
claims Claim[] claims Claim[]
groups PdfGroup[] groups PdfGroup[]
payment Payment[] payment Payment[]
communications Communication[] communications Communication[]
documents PatientDocument[] documents PatientDocument[]
conversation PatientConversation? conversation PatientConversation?
cloudFolders CloudFolder[] @relation("PatientCloudFolder") cloudFolders CloudFolder[] @relation("PatientCloudFolder")
serviceHistory PatientServiceHistory[] serviceHistory PatientServiceHistory[]
preauthHistory PatientPreauthHistory[] preauthHistory PatientPreauthHistory[]
@@index([insuranceId]) @@index([insuranceId])
@@index([createdAt]) @@index([createdAt])
@@ -164,14 +167,14 @@ model Staff {
} }
model NpiProvider { model NpiProvider {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
userId Int userId Int
npiNumber String npiNumber String
providerName String providerName String
/// State dental license (ADA claim form item 55) /// State dental license (ADA claim form item 55)
licenseNumber String? licenseNumber String?
sortOrder Int @default(0) sortOrder Int @default(0)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id], onDelete: Cascade)
claims Claim[] claims Claim[]
@@ -184,14 +187,13 @@ model NpiProvider {
@@index([userId]) @@index([userId])
} }
enum ProcedureSource { enum ProcedureSource {
COMBO COMBO
MANUAL MANUAL
} }
model AppointmentProcedure { model AppointmentProcedure {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
appointmentId Int appointmentId Int
patientId Int patientId Int
npiProviderId Int? npiProviderId Int?
@@ -269,23 +271,23 @@ enum MissingTeethStatus {
} }
model ServiceLine { model ServiceLine {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
claimId Int? claimId Int?
paymentId Int? paymentId Int?
procedureCode String procedureCode String
procedureDate DateTime @db.Date procedureDate DateTime @db.Date
quad String? quad String?
arch String? arch String?
toothNumber String? toothNumber String?
toothSurface String? toothSurface String?
icn String? icn String?
paidCode String? paidCode String?
allowedAmount Decimal? @db.Decimal(10, 2) allowedAmount Decimal? @db.Decimal(10, 2)
totalBilled Decimal @db.Decimal(10, 2) totalBilled Decimal @db.Decimal(10, 2)
totalPaid Decimal @default(0.00) @db.Decimal(10, 2) totalPaid Decimal @default(0.00) @db.Decimal(10, 2)
totalAdjusted Decimal @default(0.00) @db.Decimal(10, 2) totalAdjusted Decimal @default(0.00) @db.Decimal(10, 2)
totalDue Decimal @default(0.00) @db.Decimal(10, 2) totalDue Decimal @default(0.00) @db.Decimal(10, 2)
status ServiceLineStatus @default(UNPAID) status ServiceLineStatus @default(UNPAID)
claim Claim? @relation(fields: [claimId], references: [id], onDelete: Cascade) claim Claim? @relation(fields: [claimId], references: [id], onDelete: Cascade)
payment Payment? @relation(fields: [paymentId], references: [id], onDelete: Cascade) payment Payment? @relation(fields: [paymentId], references: [id], onDelete: Cascade)
@@ -327,10 +329,10 @@ model InsuranceCredential {
} }
model ShoppingVendor { model ShoppingVendor {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
userId Int userId Int
vendorName String vendorName String
websiteUrl String websiteUrl String
loginUsername String loginUsername String
loginPassword String loginPassword String
@@ -488,8 +490,8 @@ enum NotificationTypes {
// Cron job execution log // Cron job execution log
model CronJobLog { model CronJobLog {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
jobName String // e.g. "local-backup", "usb-backup" jobName String // e.g. "local-backup", "usb-backup"
status String // "success" | "failed" | "skipped" status String // "success" | "failed" | "skipped"
startedAt DateTime startedAt DateTime
completedAt DateTime? completedAt DateTime?
durationMs Int? durationMs Int?
@@ -588,7 +590,7 @@ model Communication {
status CommunicationStatus status CommunicationStatus
// Which platform produced twilioSid — twilio for dial-pad-originated calls, // Which platform produced twilioSid — twilio for dial-pad-originated calls,
// telnyx for everything else (SMS, inbound/AI voice, staff-triggered outbound calls). // telnyx for everything else (SMS, inbound/AI voice, staff-triggered outbound calls).
provider CommunicationProvider @default(twilio) provider CommunicationProvider @default(twilio)
body String? body String?
callDuration Int? callDuration Int?
@@ -605,16 +607,16 @@ model Communication {
} }
model PatientDocument { model PatientDocument {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
patientId Int patientId Int
filename String filename String
originalName String originalName String
mimeType String mimeType String
fileSize BigInt fileSize BigInt
filePath String filePath String
uploadedAt DateTime @default(now()) uploadedAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade) patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
@@index([patientId]) @@index([patientId])
@@index([uploadedAt]) @@index([uploadedAt])
@@ -822,7 +824,7 @@ model CommissionBatch {
} }
model CommissionBatchItem { model CommissionBatchItem {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
commissionBatchId Int commissionBatchId Int
paymentId Int paymentId Int
collectionAmount Decimal @db.Decimal(14, 2) collectionAmount Decimal @db.Decimal(14, 2)
@@ -1,7 +1,7 @@
{ {
"version": "1.0", "version": "1.0",
"generatorVersion": "1.0.0", "generatorVersion": "1.0.0",
"generatedAt": "2026-11-10T15:57:34.274Z", "generatedAt": "2026-11-26T19:00:45.737Z",
"outputPath": "/home/ee/Desktop/DentalManagement09/packages/db/shared", "outputPath": "/home/ee/Desktop/DentalManagement09/packages/db/shared",
"files": [ "files": [
"schemas/enums/TransactionIsolationLevel.schema.ts", "schemas/enums/TransactionIsolationLevel.schema.ts",
@@ -1,5 +1,5 @@
import * as z from 'zod'; import * as z from 'zod';
export const UserScalarFieldEnumSchema = z.enum(['id', 'username', 'password', 'autoBackupEnabled', 'autoBackupHour', 'usbBackupEnabled', 'usbBackupHour', 'autoMhCheckEnabled', 'autoMhCheckDayOfWeek', 'autoMhCheckHour']) export const UserScalarFieldEnumSchema = z.enum(['id', 'username', 'password', 'autoBackupEnabled', 'autoBackupHour', 'usbBackupEnabled', 'usbBackupHour', 'autoMhCheckEnabled', 'autoMhCheckDayOfWeek', 'autoMhCheckHour', 'autoDdmaCheckEnabled', 'autoDdmaCheckDayOfWeek', 'autoDdmaCheckHour'])
export type UserScalarFieldEnum = z.infer<typeof UserScalarFieldEnumSchema>; export type UserScalarFieldEnum = z.infer<typeof UserScalarFieldEnumSchema>;
@@ -20,6 +20,9 @@ export const UserFindFirstOrThrowSelectSchema: z.ZodType<Prisma.UserSelect> = z.
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -58,6 +61,9 @@ export const UserFindFirstOrThrowSelectZodSchema = z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -20,6 +20,9 @@ export const UserFindFirstSelectSchema: z.ZodType<Prisma.UserSelect> = z.object(
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -58,6 +61,9 @@ export const UserFindFirstSelectZodSchema = z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -20,6 +20,9 @@ export const UserFindManySelectSchema: z.ZodType<Prisma.UserSelect> = z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -58,6 +61,9 @@ export const UserFindManySelectZodSchema = z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.boolean().optional(), patients: z.boolean().optional(),
appointments: z.boolean().optional(), appointments: z.boolean().optional(),
staff: z.boolean().optional(), staff: z.boolean().optional(),
@@ -7,7 +7,9 @@ const makeSchema = () => z.object({
autoBackupHour: z.literal(true).optional(), autoBackupHour: z.literal(true).optional(),
usbBackupHour: z.literal(true).optional(), usbBackupHour: z.literal(true).optional(),
autoMhCheckDayOfWeek: z.literal(true).optional(), autoMhCheckDayOfWeek: z.literal(true).optional(),
autoMhCheckHour: z.literal(true).optional() autoMhCheckHour: z.literal(true).optional(),
autoDdmaCheckDayOfWeek: z.literal(true).optional(),
autoDdmaCheckHour: z.literal(true).optional()
}).strict(); }).strict();
export const UserAvgAggregateInputObjectSchema: z.ZodType<Prisma.UserAvgAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserAvgAggregateInputType>; export const UserAvgAggregateInputObjectSchema: z.ZodType<Prisma.UserAvgAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserAvgAggregateInputType>;
export const UserAvgAggregateInputObjectZodSchema = makeSchema(); export const UserAvgAggregateInputObjectZodSchema = makeSchema();
@@ -7,7 +7,9 @@ const makeSchema = () => z.object({
autoBackupHour: SortOrderSchema.optional(), autoBackupHour: SortOrderSchema.optional(),
usbBackupHour: SortOrderSchema.optional(), usbBackupHour: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional() autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional()
}).strict(); }).strict();
export const UserAvgOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserAvgOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserAvgOrderByAggregateInput>; export const UserAvgOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserAvgOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserAvgOrderByAggregateInput>;
export const UserAvgOrderByAggregateInputObjectZodSchema = makeSchema(); export const UserAvgOrderByAggregateInputObjectZodSchema = makeSchema();
@@ -13,6 +13,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.literal(true).optional(), autoMhCheckEnabled: z.literal(true).optional(),
autoMhCheckDayOfWeek: z.literal(true).optional(), autoMhCheckDayOfWeek: z.literal(true).optional(),
autoMhCheckHour: z.literal(true).optional(), autoMhCheckHour: z.literal(true).optional(),
autoDdmaCheckEnabled: z.literal(true).optional(),
autoDdmaCheckDayOfWeek: z.literal(true).optional(),
autoDdmaCheckHour: z.literal(true).optional(),
_all: z.literal(true).optional() _all: z.literal(true).optional()
}).strict(); }).strict();
export const UserCountAggregateInputObjectSchema: z.ZodType<Prisma.UserCountAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserCountAggregateInputType>; export const UserCountAggregateInputObjectSchema: z.ZodType<Prisma.UserCountAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserCountAggregateInputType>;
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: SortOrderSchema.optional(), usbBackupHour: SortOrderSchema.optional(),
autoMhCheckEnabled: SortOrderSchema.optional(), autoMhCheckEnabled: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional() autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckEnabled: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional()
}).strict(); }).strict();
export const UserCountOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserCountOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserCountOrderByAggregateInput>; export const UserCountOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserCountOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserCountOrderByAggregateInput>;
export const UserCountOrderByAggregateInputObjectZodSchema = makeSchema(); export const UserCountOrderByAggregateInputObjectZodSchema = makeSchema();
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: z.number().int().optional(), usbBackupHour: z.number().int().optional(),
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional() autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional()
}).strict(); }).strict();
export const UserCreateManyInputObjectSchema: z.ZodType<Prisma.UserCreateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.UserCreateManyInput>; export const UserCreateManyInputObjectSchema: z.ZodType<Prisma.UserCreateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.UserCreateManyInput>;
export const UserCreateManyInputObjectZodSchema = makeSchema(); export const UserCreateManyInputObjectZodSchema = makeSchema();
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -34,6 +34,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: z.literal(true).optional(), usbBackupHour: z.literal(true).optional(),
autoMhCheckEnabled: z.literal(true).optional(), autoMhCheckEnabled: z.literal(true).optional(),
autoMhCheckDayOfWeek: z.literal(true).optional(), autoMhCheckDayOfWeek: z.literal(true).optional(),
autoMhCheckHour: z.literal(true).optional() autoMhCheckHour: z.literal(true).optional(),
autoDdmaCheckEnabled: z.literal(true).optional(),
autoDdmaCheckDayOfWeek: z.literal(true).optional(),
autoDdmaCheckHour: z.literal(true).optional()
}).strict(); }).strict();
export const UserMaxAggregateInputObjectSchema: z.ZodType<Prisma.UserMaxAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserMaxAggregateInputType>; export const UserMaxAggregateInputObjectSchema: z.ZodType<Prisma.UserMaxAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserMaxAggregateInputType>;
export const UserMaxAggregateInputObjectZodSchema = makeSchema(); export const UserMaxAggregateInputObjectZodSchema = makeSchema();
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: SortOrderSchema.optional(), usbBackupHour: SortOrderSchema.optional(),
autoMhCheckEnabled: SortOrderSchema.optional(), autoMhCheckEnabled: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional() autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckEnabled: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional()
}).strict(); }).strict();
export const UserMaxOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserMaxOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserMaxOrderByAggregateInput>; export const UserMaxOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserMaxOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserMaxOrderByAggregateInput>;
export const UserMaxOrderByAggregateInputObjectZodSchema = makeSchema(); export const UserMaxOrderByAggregateInputObjectZodSchema = makeSchema();
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: z.literal(true).optional(), usbBackupHour: z.literal(true).optional(),
autoMhCheckEnabled: z.literal(true).optional(), autoMhCheckEnabled: z.literal(true).optional(),
autoMhCheckDayOfWeek: z.literal(true).optional(), autoMhCheckDayOfWeek: z.literal(true).optional(),
autoMhCheckHour: z.literal(true).optional() autoMhCheckHour: z.literal(true).optional(),
autoDdmaCheckEnabled: z.literal(true).optional(),
autoDdmaCheckDayOfWeek: z.literal(true).optional(),
autoDdmaCheckHour: z.literal(true).optional()
}).strict(); }).strict();
export const UserMinAggregateInputObjectSchema: z.ZodType<Prisma.UserMinAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserMinAggregateInputType>; export const UserMinAggregateInputObjectSchema: z.ZodType<Prisma.UserMinAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserMinAggregateInputType>;
export const UserMinAggregateInputObjectZodSchema = makeSchema(); export const UserMinAggregateInputObjectZodSchema = makeSchema();
@@ -12,7 +12,10 @@ const makeSchema = () => z.object({
usbBackupHour: SortOrderSchema.optional(), usbBackupHour: SortOrderSchema.optional(),
autoMhCheckEnabled: SortOrderSchema.optional(), autoMhCheckEnabled: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional() autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckEnabled: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional()
}).strict(); }).strict();
export const UserMinOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserMinOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserMinOrderByAggregateInput>; export const UserMinOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserMinOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserMinOrderByAggregateInput>;
export const UserMinOrderByAggregateInputObjectZodSchema = makeSchema(); export const UserMinOrderByAggregateInputObjectZodSchema = makeSchema();
@@ -18,6 +18,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: SortOrderSchema.optional(), autoMhCheckEnabled: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional(), autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckEnabled: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional(),
_count: z.lazy(() => UserCountOrderByAggregateInputObjectSchema).optional(), _count: z.lazy(() => UserCountOrderByAggregateInputObjectSchema).optional(),
_avg: z.lazy(() => UserAvgOrderByAggregateInputObjectSchema).optional(), _avg: z.lazy(() => UserAvgOrderByAggregateInputObjectSchema).optional(),
_max: z.lazy(() => UserMaxOrderByAggregateInputObjectSchema).optional(), _max: z.lazy(() => UserMaxOrderByAggregateInputObjectSchema).optional(),
@@ -37,6 +37,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: SortOrderSchema.optional(), autoMhCheckEnabled: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional(), autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckEnabled: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional(),
patients: z.lazy(() => PatientOrderByRelationAggregateInputObjectSchema).optional(), patients: z.lazy(() => PatientOrderByRelationAggregateInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentOrderByRelationAggregateInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentOrderByRelationAggregateInputObjectSchema).optional(),
staff: z.lazy(() => StaffOrderByRelationAggregateInputObjectSchema).optional(), staff: z.lazy(() => StaffOrderByRelationAggregateInputObjectSchema).optional(),
@@ -17,7 +17,10 @@ const userscalarwherewithaggregatesinputSchema = z.object({
usbBackupHour: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(), usbBackupHour: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
autoMhCheckEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(), autoMhCheckEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
autoMhCheckDayOfWeek: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(), autoMhCheckDayOfWeek: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
autoMhCheckHour: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional() autoMhCheckHour: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
autoDdmaCheckEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
autoDdmaCheckHour: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional()
}).strict(); }).strict();
export const UserScalarWhereWithAggregatesInputObjectSchema: z.ZodType<Prisma.UserScalarWhereWithAggregatesInput> = userscalarwherewithaggregatesinputSchema as unknown as z.ZodType<Prisma.UserScalarWhereWithAggregatesInput>; export const UserScalarWhereWithAggregatesInputObjectSchema: z.ZodType<Prisma.UserScalarWhereWithAggregatesInput> = userscalarwherewithaggregatesinputSchema as unknown as z.ZodType<Prisma.UserScalarWhereWithAggregatesInput>;
export const UserScalarWhereWithAggregatesInputObjectZodSchema = userscalarwherewithaggregatesinputSchema; export const UserScalarWhereWithAggregatesInputObjectZodSchema = userscalarwherewithaggregatesinputSchema;
@@ -37,6 +37,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.boolean().optional(), autoMhCheckDayOfWeek: z.boolean().optional(),
autoMhCheckHour: z.boolean().optional(), autoMhCheckHour: z.boolean().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.boolean().optional(),
autoDdmaCheckHour: z.boolean().optional(),
patients: z.union([z.boolean(), z.lazy(() => PatientFindManySchema)]).optional(), patients: z.union([z.boolean(), z.lazy(() => PatientFindManySchema)]).optional(),
appointments: z.union([z.boolean(), z.lazy(() => AppointmentFindManySchema)]).optional(), appointments: z.union([z.boolean(), z.lazy(() => AppointmentFindManySchema)]).optional(),
staff: z.union([z.boolean(), z.lazy(() => StaffFindManySchema)]).optional(), staff: z.union([z.boolean(), z.lazy(() => StaffFindManySchema)]).optional(),
@@ -7,7 +7,9 @@ const makeSchema = () => z.object({
autoBackupHour: z.literal(true).optional(), autoBackupHour: z.literal(true).optional(),
usbBackupHour: z.literal(true).optional(), usbBackupHour: z.literal(true).optional(),
autoMhCheckDayOfWeek: z.literal(true).optional(), autoMhCheckDayOfWeek: z.literal(true).optional(),
autoMhCheckHour: z.literal(true).optional() autoMhCheckHour: z.literal(true).optional(),
autoDdmaCheckDayOfWeek: z.literal(true).optional(),
autoDdmaCheckHour: z.literal(true).optional()
}).strict(); }).strict();
export const UserSumAggregateInputObjectSchema: z.ZodType<Prisma.UserSumAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserSumAggregateInputType>; export const UserSumAggregateInputObjectSchema: z.ZodType<Prisma.UserSumAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.UserSumAggregateInputType>;
export const UserSumAggregateInputObjectZodSchema = makeSchema(); export const UserSumAggregateInputObjectZodSchema = makeSchema();
@@ -7,7 +7,9 @@ const makeSchema = () => z.object({
autoBackupHour: SortOrderSchema.optional(), autoBackupHour: SortOrderSchema.optional(),
usbBackupHour: SortOrderSchema.optional(), usbBackupHour: SortOrderSchema.optional(),
autoMhCheckDayOfWeek: SortOrderSchema.optional(), autoMhCheckDayOfWeek: SortOrderSchema.optional(),
autoMhCheckHour: SortOrderSchema.optional() autoMhCheckHour: SortOrderSchema.optional(),
autoDdmaCheckDayOfWeek: SortOrderSchema.optional(),
autoDdmaCheckHour: SortOrderSchema.optional()
}).strict(); }).strict();
export const UserSumOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserSumOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserSumOrderByAggregateInput>; export const UserSumOrderByAggregateInputObjectSchema: z.ZodType<Prisma.UserSumOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserSumOrderByAggregateInput>;
export const UserSumOrderByAggregateInputObjectZodSchema = makeSchema(); export const UserSumOrderByAggregateInputObjectZodSchema = makeSchema();
@@ -36,6 +36,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -35,6 +35,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.boolean().optional(), autoMhCheckEnabled: z.boolean().optional(),
autoMhCheckDayOfWeek: z.number().int().optional(), autoMhCheckDayOfWeek: z.number().int().optional(),
autoMhCheckHour: z.number().int().optional(), autoMhCheckHour: z.number().int().optional(),
autoDdmaCheckEnabled: z.boolean().optional(),
autoDdmaCheckDayOfWeek: z.number().int().optional(),
autoDdmaCheckHour: z.number().int().optional(),
patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedCreateNestedManyWithoutUserInputObjectSchema).optional(),
@@ -39,6 +39,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -14,7 +14,10 @@ const makeSchema = () => z.object({
usbBackupHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), usbBackupHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional() autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional()
}).strict(); }).strict();
export const UserUncheckedUpdateManyInputObjectSchema: z.ZodType<Prisma.UserUncheckedUpdateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.UserUncheckedUpdateManyInput>; export const UserUncheckedUpdateManyInputObjectSchema: z.ZodType<Prisma.UserUncheckedUpdateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.UserUncheckedUpdateManyInput>;
export const UserUncheckedUpdateManyInputObjectZodSchema = makeSchema(); export const UserUncheckedUpdateManyInputObjectZodSchema = makeSchema();
@@ -38,6 +38,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -38,6 +38,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
npiProviders: z.lazy(() => NpiProviderUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), npiProviders: z.lazy(() => NpiProviderUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -38,6 +38,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -38,6 +38,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -38,6 +38,9 @@ const makeSchema = () => z.object({
autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(), autoMhCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckDayOfWeek: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
autoDdmaCheckHour: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), patients: z.lazy(() => PatientUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), appointments: z.lazy(() => AppointmentUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(), staff: z.lazy(() => StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),

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