Skip to main content

Follow patient data through the dashboard

The dashboard reads from one Ovok project through @ovok/core. Its data path is intentionally narrow: list the Patients visible to the practitioner, load measurements and questionnaire responses for the selected Patient, normalize those resources for display, and keep source timestamps in the review.

Trace the SDK boundary​

  1. src/lib/ovokClient.ts lazily constructs and reuses one OvokClient, using the sandbox origin and tenant as public configuration.
  2. src/lib/patientData.ts calls searchResources("Patient", ...) for the directory.
  3. When a Patient is selected, loadPatientReview() requests that Patient's measurement history and QuestionnaireResponses. The mapper sorts by recorded/authored time and converts supported Observation codes and QuestionnaireResponse answers into view models.
  4. src/App.tsx owns loading, empty, and error states, then passes the resulting review to the screen.
  5. src/components/MeasurementCards.tsx and src/components/PatientReviewPage.tsx render the normalized information with timestamps and source labels.

The app does not create a clinical interpretation from these values. It presents the measurements and questionnaire entries returned for the selected Patient.

Follow a focused implementation​

The small patientData.test.ts suite exercises the mapping from SDK results into the review model. Read it beside patientData.ts when adding a supported resource or changing a display mapping.

Continue to Signals and support for the separate project-status path.