MED-147: add doctor actions logging (#59)
* MED-147: add doctor actions logging * enum casing
This commit is contained in:
@@ -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 />
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user