MED-88: add doctor email notifications (#65)

* MED-88: add doctor email notifications

* add logging, send open jobs notification on partial analysis response

* update permissions

* fix import, permissions

* casing, let email be null

* unused import
This commit is contained in:
Helena
2025-09-02 12:14:01 +03:00
committed by GitHub
parent 56a832b96b
commit 3498406a0c
41 changed files with 751 additions and 69 deletions

View File

@@ -18,8 +18,8 @@ async function AnalysisPage({
id: string;
}>;
}) {
const { id: analysisResponseId } = await params;
const analysisResultDetails = await loadResult(Number(analysisResponseId));
const { id: analysisOrderId } = await params;
const analysisResultDetails = await loadResult(Number(analysisOrderId));
if (!analysisResultDetails) {
return null;
@@ -28,7 +28,7 @@ async function AnalysisPage({
if (analysisResultDetails) {
await createDoctorPageViewLog({
action: DoctorPageViewAction.VIEW_ANALYSIS_RESULTS,
recordKey: analysisResponseId,
recordKey: analysisOrderId,
dataOwnerUserId: analysisResultDetails.patient.userId,
});
}
@@ -50,3 +50,5 @@ async function AnalysisPage({
export default DoctorGuard(AnalysisPage);
const loadResult = cache(getAnalysisResultsForDoctor);