document page updated

This commit is contained in:
2025-07-17 19:21:16 +05:30
parent aa913673de
commit 1071b80930
11 changed files with 838 additions and 1089 deletions

View File

@@ -266,11 +266,15 @@ export interface IStorage {
// Group management
createPdfGroup(
patientId: number,
title: string,
category: PdfCategory
): Promise<PdfGroup>;
patientId: number,
title: string,
category: PdfCategory
): Promise<PdfGroup>;
findPdfGroupByPatientTitleAndCategory(
patientId: number,
title: string,
category: PdfCategory
): Promise<PdfGroup | undefined>;
getAllPdfGroups(): Promise<PdfGroup[]>;
getPdfGroupById(id: number): Promise<PdfGroup | undefined>;
getPdfGroupsByPatientId(patientId: number): Promise<PdfGroup[]>;
@@ -694,6 +698,18 @@ export const storage: IStorage = {
});
},
async findPdfGroupByPatientTitleAndCategory(patientId, title, category) {
return (
(await db.pdfGroup.findFirst({
where: {
patientId,
title,
category,
},
})) ?? undefined
);
},
async getPdfGroupById(id) {
return (await db.pdfGroup.findUnique({ where: { id } })) ?? undefined;
},