Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FerchoSG/healthcare-web/llms.txt

Use this file to discover all available pages before exploring further.

The administrator role gives full visibility into a clinic’s operations. Admins land on the dashboard view after login and can move freely between all four sections: the main dashboard, the shared calendar, the patient registry, and the clinic settings. They are the only role with access to billing configuration and clinic-wide settings.

Dashboard overview

The admin dashboard (components/views/AdminDashboard.tsx) loads four data sources in parallel on every render: today’s appointments, KPI metrics, revenue data, and the five most recently registered patients. A manual Refresh button re-triggers all four fetches without requiring a page reload.

KPI cards

Four metric cards appear at the top of the dashboard, each sourced from the /kpis endpoint:
MetricAPI fieldDescription
Appointmentsappointments_todayTotal non-cancelled appointments scheduled for today
New patientsnew_patients_this_monthPatients registered during the current calendar month
Revenuerevenue_this_monthGross revenue in CRC for the current month
CompletedDerived from today’s appointmentsConsultations marked COMPLETED today

Revenue area chart

Below the KPI cards, a recharts AreaChart renders the revenue trend for the last 14 days. Revenue values are fetched from the analytics service and plotted by date. Days with no recorded revenue appear as zero rather than gaps in the chart. The Y-axis is hidden to save horizontal space; exact values appear in a tooltip when hovering over any data point.

Today’s agenda panel

The right side of the main grid shows up to seven of today’s non-cancelled appointments in chronological order. Each row displays the appointment time, patient name, reason or service name, and a color-coded status badge.

Recent patients and operational status

The lower section of the dashboard shows the five most recently registered patients alongside an “operational status” panel that breaks down the current waiting pressure, active consultations, and completed consultations as live counts.

Available views

Dashboard

KPI cards, 14-day revenue chart, today’s agenda, and recent patients. The default landing view for admins.

Calendar

Full clinic calendar shared across all roles. Admins can click any slot to open the new appointment dialog pre-filled with the selected date and time.

Patients

Searchable patient registry. Admins can open any patient’s electronic medical record (EMR) from this view.

Settings

Clinic configuration. Accessible only to the admin role — the settings link does not appear in the sidebar for receptionist or doctor accounts.

Creating appointments and walk-in patients

The Create button in the top header is available to all authenticated users, but admins use it most often. Clicking it opens a dropdown with two actions:
  • New appointment — opens the NewAppointmentDialog with an optional pre-selected date and time slot.
  • New patient — opens the WalkInSheet to register a walk-in patient who does not yet have a record in the system.

Switching clinic contexts

Admins who belong to multiple clinics can switch the active context from the clinic picker in the top header. Selecting a different clinic calls handleClinicSwitch, which stores the chosen clinic_id, re-fetches the /me endpoint to refresh the user’s membership and role, and navigates to the default view for the new context.
Switching clinics resets the current view to the role’s default. Any unsaved form state (such as a partially filled appointment) will be lost.

Typical morning workflow

1

Review overnight KPIs

The dashboard loads automatically on login. Check the four KPI cards to see today’s appointment count and the current month’s revenue and new-patient totals.
2

Scan today's agenda

Look at the agenda panel to confirm which appointments are already confirmed versus still pending. Follow up on any that need confirmation.
3

Check the revenue chart

Identify any gaps or unexpected dips in the 14-day trend. Cross-reference with the completed consultation count to spot days where completions were high but revenue was low.
4

Open the patient registry if needed

Navigate to Patients to find a specific patient, verify their records, or open their EMR directly from the list.
5

Adjust clinic settings

Go to Settings to update services, schedules, or other clinic-level configuration before the day’s appointments begin.

Build docs developers (and LLMs) love