document page updated
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user