MED-147: add doctor actions logging (#59)

* MED-147: add doctor actions logging

* enum casing
This commit is contained in:
Helena
2025-08-27 08:11:13 +03:00
committed by GitHub
parent f33f2b6db4
commit 8c6ce29c23
14 changed files with 236 additions and 14 deletions

View File

@@ -3,6 +3,11 @@ import { cache } from 'react';
import { getAnalysisResultsForDoctor } from '@kit/doctor/services/doctor-analysis.service';
import { PageBody, PageHeader } from '@kit/ui/page';
import {
DoctorPageViewAction,
createDoctorPageViewLog,
} from '~/lib/services/audit/doctorPageView.service';
import AnalysisView from '../../_components/analysis-view';
import { DoctorGuard } from '../../_components/doctor-guard';
@@ -20,6 +25,14 @@ async function AnalysisPage({
return null;
}
if (analysisResultDetails) {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_ANALYSIS_RESULTS,
recordKey: id,
dataOwnerUserId: analysisResultDetails.patient.userId,
});
}
return (
<>
<PageHeader />