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 />

View File

@@ -1,10 +1,19 @@
import { getUserDoneResponsesAction } from '@kit/doctor/actions/table-data-fetching-actions';
import { PageBody, PageHeader } from '@kit/ui/page';
import { getUserDoneResponsesAction } from '@kit/doctor/actions/table-data-fetching-actions';
import ResultsTableWrapper from '../_components/results-table-wrapper';
import {
DoctorPageViewAction,
createDoctorPageViewLog,
} from '~/lib/services/audit/doctorPageView.service';
import { DoctorGuard } from '../_components/doctor-guard';
import ResultsTableWrapper from '../_components/results-table-wrapper';
async function CompletedJobsPage() {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_DONE_JOBS,
});
return (
<>
<PageHeader />

View File

@@ -1,9 +1,19 @@
import { getUserInProgressResponsesAction } from '@kit/doctor/actions/table-data-fetching-actions';
import { PageBody, PageHeader } from '@kit/ui/page';
import ResultsTableWrapper from '../_components/results-table-wrapper';
import {
DoctorPageViewAction,
createDoctorPageViewLog,
} from '~/lib/services/audit/doctorPageView.service';
import { DoctorGuard } from '../_components/doctor-guard';
import ResultsTableWrapper from '../_components/results-table-wrapper';
async function MyReviewsPage() {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_OWN_JOBS,
});
return (
<>
<PageHeader />

View File

@@ -1,10 +1,19 @@
import { getOpenResponsesAction } from '@kit/doctor/actions/table-data-fetching-actions';
import { PageBody, PageHeader } from '@kit/ui/page';
import {
DoctorPageViewAction,
createDoctorPageViewLog,
} from '~/lib/services/audit/doctorPageView.service';
import { DoctorGuard } from '../_components/doctor-guard';
import ResultsTableWrapper from '../_components/results-table-wrapper';
async function OpenJobsPage() {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_OPEN_JOBS,
});
return (
<>
<PageHeader />

View File

@@ -1,8 +1,18 @@
import { PageBody, PageHeader } from '@kit/ui/page';
import {
DoctorPageViewAction,
createDoctorPageViewLog,
} from '~/lib/services/audit/doctorPageView.service';
import Dashboard from './_components/doctor-dashboard';
import { DoctorGuard } from './_components/doctor-guard';
async function DoctorPage() {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_DASHBOARD,
});
return (
<>
<PageHeader />