import { useState } from "react"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../../components/ui/tabs.tsx"; import { useAuthServiceContext } from "../../../../services/AuthService.tsx"; import { declaredKinds, readDiagnosticsDeclaration, } from "../../../../utils/organizationDiagnostics"; import TestCatalogue from "./TestCatalogue.tsx"; import LabConnections from "./LabConnections.tsx"; import ImagingReaders from "./ImagingReaders.tsx"; import DiagnosticsSettingsTab from "./DiagnosticsSettingsTab.tsx"; import "./DiagnosticsPage.css"; // A practice with nothing to catalogue opens on Practice setup rather than the area being hidden. // External laboratories is never gated by the declaration: a practice with no bench sends work out. const DiagnosticsPage = ({ title = "Lab and imaging setup" }: { title?: string }) => { const { currentOrganization } = useAuthServiceContext(); const declaration = readDiagnosticsDeclaration(currentOrganization ?? undefined); const [tab, setTab] = useState(declaredKinds(declaration).length ? "catalogue" : "setup"); return (

{title}

Practice setup External laboratories Reading practices Our test catalogue
); }; export default DiagnosticsPage;