Skip to content

Community dashboard — replace mock data with real aggregated data #557

Description

@Mosss-OS

Description

The community health dashboard at /dashboard/community currently uses 200 mock-generated records with randomized symptoms and Nigerian city data instead of real aggregated assessment data from local assessments.

Current State

  • src/routes/_app.dashboard.community.tsx — Generates 200 fake reports with randomized cities and symptoms
  • Map and charts show mock data only
  • No aggregation from real IndexedDB assessment data

Required Changes

  1. Create an aggregation utility that reads from the local IndexedDB assessments table
  2. Aggregate by location (using GPS coordinates or village codes from patient records)
  3. Aggregate by condition/diagnosis for condition breakdown charts
  4. Replace the mock data generation with real data aggregation
  5. Keep the data anonymized (no patient-identifiable information)
  6. Add a fallback/empty state when there is no data yet

Acceptance Criteria

  • Community dashboard shows real aggregated data from local assessments
  • Condition breakdown chart reflects actual assessment results
  • Map markers represent real assessment locations (anonymized)
  • Empty state is shown when no assessments exist
  • No patient-identifiable information is exposed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions