Skip to content

Frontend PMS UI

Ankit Upadhyay edited this page Aug 25, 2026 · 3 revisions

Frontend: PMS UI

The core practice-management surfaces - the appointment calendar/board, the clinical workspace (SOAP, diagnostics, treatment, invoice), and the dashboard. Part of Frontend Overview.

Appointments calendar & board

features/appointments/:

  • Calendar - components/Calendar/ (AppointmentCalendar.tsx, TaskCalendar.tsx, common/UserCalendar.tsx) plus layout/interaction helpers (calendarLayout.ts, calendarDrop.ts, useCalendarSlots.ts, useCalendarNow.ts).
  • Board - components/AppointmentBoard.tsx; list page pages/Appointments/index.tsx with Sections/ modals (AddAppointmentCentralModal, AppointmentInfo, ChangeRoom, ChangeStatus, Reschedule, ViewAppointmentOverviewModal). The shared central-modal shell lives in components/AppointmentCentralModal/ (AppointmentCentralModalShell, AppointmentEstimatePanel, AppointmentAvatar).
  • Stores appointmentStore.ts + availabilityStore.ts; service services/appointmentService.ts; the large form hook hooks/useAppointmentForm.ts. Route (app)/appointments/page.tsx.

Responsive tablet/phone layer

The responsive rebuild (PR #1912, merged 2026-07-19) introduced dedicated tablet and phone surfaces that are now core architecture:

  • Calendar - components/Calendar/responsive/ (PhoneCalendar, PhoneDayRail, PhoneDayStrip, PhoneMonthOverview, PhoneWeekOverview, PhoneMyDayRail, TabletCalendarTitleBand, useIsTabletCalendar, plus their layout models) and components/Calendar/PhoneTaskDayList.tsx.
  • Workspace - pages/AppointmentWorkspace/phone/ (PhoneWorkspaceShell, PhonePatientBar, PhoneStepChips, PhoneVitalsTiles, PhoneWorkspaceActionBar).
  • App-wide phone chrome - ui/layout/PhoneShell/ (PhoneShell, PhoneHeader, PhoneTabBar, PhoneFab, PhoneMoreSheet, BottomSheet, useIsPhone, phoneShellStore). PR #1987 (merged 2026-07-23) added phone sign-out, the owner guard, and the tasks FAB on top.

The clinical workspace (SOAP → invoice)

features/appointments/pages/AppointmentWorkspace/ is the vet's per-visit cockpit - a stepper across SOAP → Diagnostics → Treatment → Invoice → Summary:

  • index.tsx, WorkspaceRoute.tsx, WorkspaceStepper.tsx, WorkspaceHeader.tsx, WorkspaceMetaBar.tsx, CompanionContextCard.tsx.
  • steps/ - SoapStep.tsx, DiagnosticsStep.tsx, TreatmentStep.tsx, InvoiceStep.tsx, SummaryStep.tsx.
  • Rich components: PrescriptionEditor, ServicesPackagesEditor, SoapNotesList, InpatientSchedule, TotalBillContainer, RxBadge, StockHealthPill. Status badges app-wide (including AppointmentStatusPill) converge on the shared ui/primitives/StatusPill/StatusPill.tsx primitive (PR #1981, merged 2026-07-22).
  • Side modals - sidemodal/ holds the warm-bone side-modal subsystem (PR #1977, merged 2026-07-22): QuickActionsModal, HospitalizationModal, panels/ (ActivityPanel, CalculatorsPanel, ChatPanel, DocumentsPanel, MsdPanel, RecordPanel, TasksPanel), and records/ (VitalsForm, ObservationToolForm).
  • Backed by the largest store, stores/appointmentWorkspaceStore.ts. Routes (app)/appointments/[appointmentId]/workspace/ and the IDEXX integration (app)/appointments/idexx-workspace/.

Dashboard

features/dashboard/pages/Dashboard.tsx + hooks/useDashboardAnalytics.ts + services/dashboardService.ts; route (app)/dashboard/page.tsx. Overview stats also live in features/overview/. Charts render via ui/widgets/DynamicChart (Recharts).

Rooms / in-patient

stores/roomStore.ts + features/organization/services/roomService.ts + hooks/useRooms.ts + ui/cards/RoomCard back the in-patient/room views, mirroring the backend rooms/occupancy model.

Notable

  • Companion terminology is org-configurable - useCompanionTerminologyText / lib/companionTerminology.ts and a MutationObserver-based rewriter in SessionInitializer swap wording (e.g. "companion" vs "patient") per org.
  • The workspace is where most clinical subsystems converge (SOAP, prescriptions, services, labs, billing), so it's the densest surface in the app.

Since 2026-07

Work on these surfaces has continued without changing their shape: phone week-day selection now resolves in the clinic's timezone (components/Calendar/responsive/PhoneWeekOverview.tsx), IDEXX diagnostics got follow-up fixes (clearer order-button destination, species-level breed fallback on orders), reduced-motion handling was rewritten to read prefers-reduced-motion through useSyncExternalStore, and a clinic network directory landed (features/federation/ behind the (app)/network route - see Frontend Overview).

Related

Product & Domain
Architecture
Applications
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Roadmap
Operations
Meta

Canonical code & docs: main repo · Auto-generated companion: DeepWiki

Clone this wiki locally