diff --git a/containers/ecr-viewer/src/app/page.tsx b/containers/ecr-viewer/src/app/page.tsx index 6f5eece7cd..1ff1f476a8 100644 --- a/containers/ecr-viewer/src/app/page.tsx +++ b/containers/ecr-viewer/src/app/page.tsx @@ -30,34 +30,30 @@ const HomePage = async ({ totalCount = await getTotalEcrCount(searchTerm); } - return ( + return isNonIntegratedViewer ? (
- {isNonIntegratedViewer ? ( - <> -
- eCR Library{" "} - -
- - - - - ) : ( - - )} +
+ eCR Library{" "} + +
+ + +
+ ) : ( + ); }; diff --git a/containers/ecr-viewer/src/app/tests/view-data.test.tsx b/containers/ecr-viewer/src/app/tests/view-data.test.tsx index 7f0144e70f..a295bfb294 100644 --- a/containers/ecr-viewer/src/app/tests/view-data.test.tsx +++ b/containers/ecr-viewer/src/app/tests/view-data.test.tsx @@ -51,7 +51,7 @@ describe("ECRViewerPage", () => { render(); - expect(await screen.findByText("Page not found")); + expect(await screen.findByText("eCR retrieval failed")); }); it("should handle 500 error", async () => { diff --git a/containers/ecr-viewer/src/app/view-data/page.tsx b/containers/ecr-viewer/src/app/view-data/page.tsx index d806a5723f..5a0bf683f9 100644 --- a/containers/ecr-viewer/src/app/view-data/page.tsx +++ b/containers/ecr-viewer/src/app/view-data/page.tsx @@ -17,7 +17,7 @@ import { metrics } from "./component-utils"; import { EcrLoadingSkeleton } from "./components/LoadingComponent"; import Header from "../Header"; import PatientBanner from "./components/PatientBanner"; -import NotFound from "../not-found"; +import RetrievalFailed from "./retrieval-failed"; interface FetchError { status: number; @@ -79,7 +79,7 @@ const ECRViewerPage: React.FC = () => { if (errors) { if (errors.status === 404) { - return ; + return ; } return (
diff --git a/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx b/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx new file mode 100644 index 0000000000..68975c572a --- /dev/null +++ b/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx @@ -0,0 +1,39 @@ +"use client"; +import React from "react"; +import { Icon } from "@trussworks/react-uswds"; +import Header from "../Header"; + +/** + * @returns The ecr retrieval error page JSX component. + */ +const RetrievalFailed = () => ( +
+
+
+
+

+ + eCR retrieval failed +

+
+ The eCR Viewer couldn't retrieve the associated eCR file +
+
+ This is likely because the DIBBs pipeline hasn't processed this eCR. +

+

+ Contact support: If the problem persists, please reach out to + your eCR coordinator +
to troubleshoot the issue with the DIBBs team. +
+
+
+
+
+); + +export default RetrievalFailed;