Aggregate Activity Data for Bufdir Report
The core of the Bufdir reporting feature is the automated data aggregation pipeline. When a coordinator initiates a report, the system queries all activity records within the selected period, maps them to Bufdir's activity categories, deduplicates participants across chapters, resolves the organizational hierarchy to apply correct scope, calculates geographic distribution, and produces a metrics object ready for the report structure mapper. The aggregation runs asynchronously with a progress indicator so the coordinator is informed while the system works. This eliminates the multi-hour manual Excel aggregation that organizations currently rely on.
User Story
Acceptance Criteria
- Given I initiate report generation, when the aggregation starts, then an aggregation summary widget and progress indicator are displayed
- Given activities span multiple chapters under my organization, when aggregation completes, then the report scope is correctly limited to my hierarchy and cross-chapter activities are attributed once
- Given the same participant appears in multiple activities, when deduplication runs, then the participant is counted only once in the participant total
- Given Bufdir requires specific activity category labels, when category mapping runs, then all internal activity types are correctly mapped to official Bufdir categories via the mapping config
- Given my organization spans multiple geographic areas, when geographic distribution is calculated, then participant counts are broken down by the correct geographic dimensions
- Given the aggregation completes, when I view the aggregation summary widget, then I see total activities, unique participants, and a category breakdown
Business Value
All three organizations (NHF, Blindeforbundet, HLF) identified Bufdir reporting as a major administrative burden consuming hours of manual work each reporting cycle. Fully automated aggregation directly eliminates this cost, reduces human error in participant counts and category mapping, and makes it feasible to submit reports more frequently — improving data quality for Bufdir and the organizations alike.
Components
- Aggregation Summary Widget ui
- Aggregation Progress Indicator ui
- Bufdir Aggregation Service service
- Participant Deduplication Service service
- Reporting Period Service service
- Geographic Distribution Service service
- Bufdir Metrics Repository data
- Aggregation Query Builder data
- Multi-Organization Data Isolator data
- Supabase Aggregation RPC Functions infrastructure
- Activity Category Mapping Configuration infrastructure
- Organisation Hierarchy Resolver service
- Activity Aggregation Service service
- Bufdir Category Mapper service