How larib-data/clinical-scope works
ClinicalScope is a browser-based clinical time-series dashboard with a parallel Python/CLI extraction workflow. The main user journey is to load database options and patient data, process device recordings into aligned signals, view interactive plots, annotate them, and save annotations or exports. The graph also preserves inspection and standalone processing as distinct capabilities. Some connections reflect README-documented behavior; unsampled implementations are represented by their existing directories rather than inferred module names.
Main entry points: base.py Source processing · registry.py Source registry · parsing.py Options parsing · core_api.py Dashboard API
Components 23
Configuration
- Options parsing
src/clinical_scope/config/parsing.py - Options validation
src/clinical_scope/database_options_parser.py - XLSX options
src/clinical_scope/database_options_xlsx.py
Data processing
- Source registry
src/clinical_scope/datasource/registry.py - Device adapters
src/clinical_scope/datasource/sources - Source processing
src/clinical_scope/datasource/base.py - Time-axis detection
src/clinical_scope/io/time_axis.py - Time normalization
src/clinical_scope/datasource/formatting/timezone.py - Data inspection
src/clinical_scope/datasource/inspection.py - Data export
src/clinical_scope/io/export.py - Parquet cache
src/clinical_scope/datasource/base.py
Visualization
- Signal model
src/clinical_scope/signal_container.py - Plot types
src/clinical_scope/plot_types/registry.py - Plot assembly
src/clinical_scope/plot_assembly.py
Dashboard and annotations
- Dashboard API
src/clinical_scope/dash_api/core_api.py - Dashboard callbacks
src/clinical_scope/dash_api/callbacks - Annotation model
src/clinical_scope/dash_api/annotations/model.py - Annotation storage
src/clinical_scope/dash_api/annotations/io.py
Standalone API
- CLI
src/clinical_scope/cli.py - Extraction API
src/clinical_scope/wrapper.py
Other components
- Researcher
- Patient recordings
- Web browser
Connections 26
- Researcher → Web browser: uses
README.md - Researcher → CLI: runs
README.md - Patient recordings → Source registry: provides recordings
README.md - Researcher → Options parsing: loads config
README.md - Options parsing → XLSX options: parses XLSX
src/clinical_scope/config/parsing.py - Options parsing → Options validation: validates options
src/clinical_scope/config/parsing.py - Source registry → Device adapters: dispatches sources
src/clinical_scope/datasource/registry.py - Source registry → Source processing: registers processor
src/clinical_scope/datasource/registry.py - Device adapters → Source processing: use common processing
src/clinical_scope/datasource/sources/edf/find_load_format.py - Source processing → Time-axis detection: detects time axis
src/clinical_scope/datasource/base.py - Source processing → Time normalization: formats timestamps
src/clinical_scope/datasource/base.py - Source processing → Parquet cache: reads and writes
src/clinical_scope/datasource/base.py - Source processing → Signal model: creates signals
src/clinical_scope/datasource/base.py - Researcher → Data inspection: inspects recordings
README.md - Signal model → Plot types: provides plot inputs
- Plot types → Plot assembly: selects plot types
src/clinical_scope/plot_types/registry.py - Researcher → Dashboard API: processes visualization
README.md - Dashboard API → Dashboard callbacks: registers callbacks
src/clinical_scope/dash_api/core_api.py - Dashboard callbacks → Annotation model: updates annotations
src/clinical_scope/dash_api/callbacks/annotation_callbacks.py - Dashboard callbacks → Annotation storage: saves annotations
src/clinical_scope/dash_api/callbacks/annotation_callbacks.py - Dashboard API → Web browser: serves dashboard
README.md - Researcher → Annotation model: creates marks
README.md - Researcher → Data export: extracts data
README.md - CLI → Extraction API: runs extraction
- Extraction API → Source registry: selects sources
scripts/process_patient_data.py - Extraction API → Signal model: returns signals
scripts/visualization_patient_data.py