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

Description

Server-side streaming endpoint that executes a report query and writes results as CSV or XLSX to the HTTP response using Node.js streaming to avoid buffering large result sets in memory. Applies the same tenant-scoped WHERE clause logic as the Custom Report Service. Supports HLF's requirement for custom-shaped exports that differ from the standard Bufdir output format.

Feature: Custom Reports

report-export-service

Sources & reasoning

Implementation notes explicitly specify server-side streaming CSV/XLSX export to handle large result sets. HLF's Dynamics portal integration requires exported data in shapes that differ from standard Bufdir output, so export formatting must be independently configurable per report definition, not shared with the Bufdir export pipeline.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Stream CSV output for large report result sets without full in-memory buffering
  • Generate XLSX format via streaming writer for Excel-compatible exports
  • Apply tenant-scoped query constraints identical to Custom Report Service
  • Accept the same ReportParams object as the interactive report runner

Interfaces

streamCsv(params: ReportParams, orgId: string, res: Response): Promise<void>
streamXlsx(params: ReportParams, orgId: string, res: Response): Promise<void>

Relationships

Dependencies (2)

Components this component depends on