Service Layer medium complexity backend
0
Dependencies
0
Dependents
4
Entities
0
Integrations

Description

Backend service that aggregates approved activity data, applies Bufdir-defined counting rules and category mappings, and produces a structured report ready for preview and export. Handles per-organization configuration variants and emits validation warnings for implausible or incomplete data.

Feature: Bufdir Report Generation

bufdir-report-service

Sources & reasoning

Source explicitly assigns Bufdir report generation to the admin portal as a Phase 2 (Core Product) deliverable, separate from the mobile app's data capture role. Phase 2 maps to the 'Core Product' phase name in the roadmap.

  • Sømløs Bufdir-rapportering ... selve Bufdir-eksporten er en admin-funksjon: organisasjonsadministrator kjører eksporten fra Admin Web Portal.
  • Bufdir-rapportering (eksport i admin)

Responsibilities

  • Aggregate qualifying activities for the selected organization and reporting period
  • Apply Bufdir counting rules and category mappings per org variant
  • Detect and flag duplicate activities and missing contact links as warnings
  • Generate the structured report payload for preview and export
  • Persist report runs and configuration for auditability

Interfaces

generateReport(orgId, period, variant): BufdirReport
previewReport(orgId, period): ReportPreview
validateReportData(orgId, period): ValidationWarning[]
exportReport(reportId, format): ExportArtifact
getReportConfig(orgId): BufdirReportConfig