Service Layer high complexity backend
1
Dependencies
1
Dependents
12
Entities
0
Integrations

Description

Executes the complex SQL aggregation queries that compile all relevant activity data for a reporting period into a structured intermediate object. Handles activity counts, participant counts, duration totals, and organization hierarchy roll-up required by Bufdir's reporting fields.

Feature: Bufdir Report Generation & Export

report-aggregation-service

Responsibilities

  • Query activities table for the given organization and period with all joins
  • Aggregate activity counts by type, contact category, and activity subtype
  • Roll up data across organization hierarchy (local association → region → national)
  • Detect and flag duplicate activities or data gaps for coordinator review

Interfaces

aggregateForPeriod(organizationId, startDate, endDate)
getActivityCountsByType(filters)
getParticipantTotals(filters)
getDurationTotals(filters)
detectDataAnomalies(aggregatedData)
getRollupByHierarchy(organizationId, period)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component