diff --git a/frontend/src/app/(dashboard)/appointments/page.tsx b/frontend/src/app/(dashboard)/appointments/page.tsx
index bf7734b..ef0152d 100644
--- a/frontend/src/app/(dashboard)/appointments/page.tsx
+++ b/frontend/src/app/(dashboard)/appointments/page.tsx
@@ -17,8 +17,8 @@ import { ScheduleDayPicker } from '@/components/ui/shared/ScheduleDayPicker';
import { ToastStack } from '@/components/ui/shared/Toast';
import { useToast } from '@/lib/hooks/useToast';
import type { AppointmentPurpose } from '@/types/appointment';
-import { formatApiErrorMessage } from '@/lib/formatApiError';
-import { compareLocalDayStart, getLocalDayIsoRange, startOfLocalDay } from '@/lib/appointmentTime';
+import { formatApiErrorMessage } from '@/components/shared/formatApiError';
+import { compareLocalDayStart, getLocalDayIsoRange, startOfLocalDay } from '@/components/appointments/appointmentTime';
const EMPTY_PATIENT_FORM: CreatePatientInput = {
firstName: '',
diff --git a/frontend/src/app/(dashboard)/patients/page.tsx b/frontend/src/app/(dashboard)/patients/page.tsx
index 75a3ccf..9acc77f 100644
--- a/frontend/src/app/(dashboard)/patients/page.tsx
+++ b/frontend/src/app/(dashboard)/patients/page.tsx
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useState } from 'react';
import { Button } from '@/components/ui/shared/Button';
import { ToastStack } from '@/components/ui/shared/Toast';
import { patientsApi } from '@/lib/api/patients';
-import { formatApiErrorMessage } from '@/lib/formatApiError';
+import { formatApiErrorMessage } from '@/components/shared/formatApiError';
import { useAuth } from '@/lib/hooks/useAuth';
import { useToast } from '@/lib/hooks/useToast';
import { hasPermission } from '@/components/shared/permissions';
diff --git a/frontend/src/lib/appointmentOverlapLayout.ts b/frontend/src/components/appointments/appointmentOverlapLayout.ts
similarity index 100%
rename from frontend/src/lib/appointmentOverlapLayout.ts
rename to frontend/src/components/appointments/appointmentOverlapLayout.ts
diff --git a/frontend/src/lib/appointmentTime.ts b/frontend/src/components/appointments/appointmentTime.ts
similarity index 100%
rename from frontend/src/lib/appointmentTime.ts
rename to frontend/src/components/appointments/appointmentTime.ts
diff --git a/frontend/src/lib/formatApiError.ts b/frontend/src/components/shared/formatApiError.ts
similarity index 100%
rename from frontend/src/lib/formatApiError.ts
rename to frontend/src/components/shared/formatApiError.ts
diff --git a/frontend/src/components/shared/organizationTypeIcon.ts b/frontend/src/components/shared/organizationTypeIcon.ts
new file mode 100644
index 0000000..99816ab
--- /dev/null
+++ b/frontend/src/components/shared/organizationTypeIcon.ts
@@ -0,0 +1,16 @@
+import { Building2, Beaker, type LucideIcon } from 'lucide-react';
+import type { Organization } from '@/types/organization';
+
+/** Clinic → Building2, Lab → Beaker (switch-organization cards). */
+export function organizationTypeIcon(type: Organization['type']): LucideIcon {
+ return type === 'CLINIC' ? Building2 : Beaker;
+}
+
+/** Organizations tab lists counterpart orgs (labs for clinics, clinics for labs). */
+export function counterpartOrganizationType(
+ currentType: Organization['type'] | undefined,
+): Organization['type'] {
+ if (currentType === 'CLINIC') return 'LAB';
+ if (currentType === 'LAB') return 'CLINIC';
+ return 'CLINIC';
+}
diff --git a/frontend/src/lib/treatmentSelection.ts b/frontend/src/components/shared/treatmentSelection.ts
similarity index 89%
rename from frontend/src/lib/treatmentSelection.ts
rename to frontend/src/components/shared/treatmentSelection.ts
index 482d00d..e3ac585 100644
--- a/frontend/src/lib/treatmentSelection.ts
+++ b/frontend/src/components/shared/treatmentSelection.ts
@@ -1,4 +1,4 @@
-import { isSameLocalCalendarDay } from '@/lib/appointmentTime';
+import { isSameLocalCalendarDay } from '@/components/appointments/appointmentTime';
import type { TreatmentAppointment } from '@/types/treatment';
/**
diff --git a/frontend/src/components/ui/appointments/AppointmentBookingModal.tsx b/frontend/src/components/ui/appointments/AppointmentBookingModal.tsx
index 914c053..17921df 100644
--- a/frontend/src/components/ui/appointments/AppointmentBookingModal.tsx
+++ b/frontend/src/components/ui/appointments/AppointmentBookingModal.tsx
@@ -12,7 +12,7 @@ import {
compareLocalDayStart,
formatTimeForInput,
isSameLocalCalendarDay,
-} from '@/lib/appointmentTime';
+} from '@/components/appointments/appointmentTime';
interface AppointmentBookingModalProps {
open: boolean;
diff --git a/frontend/src/components/ui/appointments/AppointmentScheduleGrid.tsx b/frontend/src/components/ui/appointments/AppointmentScheduleGrid.tsx
index 13f2912..041d050 100644
--- a/frontend/src/components/ui/appointments/AppointmentScheduleGrid.tsx
+++ b/frontend/src/components/ui/appointments/AppointmentScheduleGrid.tsx
@@ -2,12 +2,12 @@
import { useMemo, useState } from 'react';
import type { AppointmentColumnProvider, AppointmentRecord } from '@/types/appointment';
-import { formatHourLabel } from '@/lib/appointmentTime';
+import { formatHourLabel } from '@/components/appointments/appointmentTime';
import {
computeAppointmentLaneLayouts,
findOverlapCluster,
lanePositionStyles,
-} from '@/lib/appointmentOverlapLayout';
+} from '@/components/appointments/appointmentOverlapLayout';
import { purposeStyle } from '@/components/ui/appointments/appointmentPurposeStyles';
import { AppointmentOverlapPopover } from '@/components/ui/appointments/AppointmentOverlapPopover';
diff --git a/frontend/src/components/ui/organizations/OrganizationSelectorContent.tsx b/frontend/src/components/ui/organizations/OrganizationSelectorContent.tsx
index bfe1140..3283092 100644
--- a/frontend/src/components/ui/organizations/OrganizationSelectorContent.tsx
+++ b/frontend/src/components/ui/organizations/OrganizationSelectorContent.tsx
@@ -3,7 +3,9 @@
import { useMemo, useState } from 'react';
import { useAuth } from '@/lib/hooks/useAuth';
import { canCreateOrganizationFromCurrentOrg } from '@/components/shared/permissions';
-import { Building2, Beaker, Mail } from 'lucide-react';
+import { Building2, Mail } from 'lucide-react';
+import type { Organization } from '@/types/organization';
+import { organizationTypeIcon } from '@/components/shared/organizationTypeIcon';
import { Input } from '@/components/ui/shared/Input';
import { Button } from '@/components/ui/shared/Button';
@@ -26,8 +28,10 @@ export function OrganizationSelectorContent() {
const [organizationEmail, setOrganizationEmail] = useState('');
const [organizationType, setOrganizationType] = useState<'CLINIC' | 'LAB'>('CLINIC');
- const getIcon = (type: string) =>
- type === 'CLINIC' ?