Skip to main content

Dashboard

Route: /
File: memberportal/src/pages/DashboardPage.tsx

The Dashboard is the first page a patient sees after signing in. It shows a quick summary of their most important health data in one place.

What it shows​

The dashboard is divided into four summary cards:

CardFHIR ResourceWhat is shown
Recent VisitsEncounterUp to 4 recent visits with date, reason, and EHR source
MedicationsMedicationRequestUp to 4 active medications with dosage and EHR source
Recent LabsObservationUp to 4 recent lab results with flagged/normal status
Active ConditionsConditionUp to 4 active conditions with onset date

Each card has a "See all" link that takes the patient to the full page for that section.

EHR sync status​

At the top of the dashboard, a subtitle line tells the patient:

  • Which EHR providers they are connected to (e.g., Records from Epic & Healow)
  • When data was last synced (e.g., last synced Apr 22, 2026)
  • If no EHR is connected: "No EHR connected — go to Settings to connect your health records"

Refresh button​

The Refresh button triggers a manual sync of all connected EHR providers:

  1. Calls POST /fhir/referesh/all-ehrs with the patient's access token.
  2. Polls GET /fhir/referesh/status every 3 seconds until sync is complete.
  3. Shows a success, warning, or error notification depending on the result:
    • Green — all providers synced successfully
    • Orange — EHR session expired, patient needs to reconnect in Settings
    • Yellow — partial sync (some synced, some expired)
    • Red — sync request failed

Ask ChartChat button​

Opens the AI Chat Assistant page (/chat) directly.

EHR connection errors​

If the patient is redirected back from an EHR OAuth flow with an error (e.g., they denied access), the URL contains ?ehr_error=.... The dashboard detects this and shows a red notification with the error message, then cleans the URL.

FHIR resources used​

ResourceFilter
Observationcategory=laboratory, sorted by newest, limit 10
MedicationRequestsorted by newest, limit 10, filtered to status=active
Conditionlimit 10, filtered to clinicalStatus=active
Encountersorted by newest, limit 10
PatientEHRConnectionstatus=active — used to get last sync date