Architecture Overview

High-level architecture and flow for configuring tests, mapping cells, counting, and sending values to report entry.

👤 Siddharth Chakraborty📅 Updated: Mar 16, 2026

This document describes the 4-stage flow for the Cell Counter feature and the component responsibilities.

Architecture — Overview

The Cell Counter is exposed to the user from ReportEntry as a modal. It has two logical areas: configuration (mappings) and entry (counting).

Configuration binds UI cell keys to specific report format parameter indexes for a selected test. Entry consumes those mappings to increment and export counts into the report.


Data Flow (4 Stages)

  1. Configure test
    User selects or creates a test. services.ts returns report-format entries used for mapping.

  2. Configure mappings
    User maps UI cells to report format indexes for the selected test. Mappings are saved via services.ts.

  3. Cell counting
    Entry loads mappings and builds lookup structures. Key presses and table edits update count state and change history.

  4. Report entry (send values)
    Export logic maps each cell count to the corresponding report parameter and applies it to ReportEntry via callback or API.


State and Persistence

  • Transient session state such as counts and change history is maintained in CellCounterEntry.
  • Mappings are persisted via services.ts and reloaded for new sessions.
  • Initialization logic seeds counts when editing an existing report.

Integration Points

  • ReportEntry opens the CellCounter modal and provides current report values along with a callback to accept exported values.
  • Export logic exports an excel file with current cell counter state values
  • Send Values applies the cell counts to mapped parameters in report entry

Validation and Error Handling

  • Validate mappings to ensure valid report format indexes and unique keys before saving.
  • Prevent or warn on export if required mappings are missing.
  • Audio feedback is used for confirmations and error signaling.

On this page