fix(paymentbypatientid) - fixed allows simply via patient id, instead claim-patientid

This commit is contained in:
2025-09-17 01:59:00 +05:30
parent a106901eb6
commit 438d670e02

View File

@@ -828,7 +828,7 @@ export const storage: IStorage = {
offset: number offset: number
): Promise<PaymentWithExtras[]> { ): Promise<PaymentWithExtras[]> {
const payments = await db.payment.findMany({ const payments = await db.payment.findMany({
where: { claim: { patientId } }, where: { patientId },
orderBy: { createdAt: "desc" }, orderBy: { createdAt: "desc" },
skip: offset, skip: offset,
take: limit, take: limit,
@@ -859,7 +859,7 @@ export const storage: IStorage = {
async getTotalPaymentCountByPatient(patientId: number): Promise<number> { async getTotalPaymentCountByPatient(patientId: number): Promise<number> {
return db.payment.count({ return db.payment.count({
where: { claim: { patientId } }, where: { patientId },
}); });
}, },