# heikobre/screening-dashboard-sandbox architecture

> Architecture diagram of the GitHub repository heikobre/screening-dashboard-sandbox, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/heikobre/screening-dashboard-sandbox
- Repository: https://github.com/heikobre/screening-dashboard-sandbox

## Overview

This is a single-file Streamlit app for facilitating a modified Delphi review of gene–disease combinations for genomic newborn screening. The main workflow imports LimeSurvey CSV results, summarizes national and study responses, supports expert decisions and notes, then exports documentation and analysis. Session state holds the uploaded data and review inputs; the README describes these data as session-based and non-persistent. The sampled source confirms response aggregation, export preparation, PDF generation, and external reference-data loading. Other UI wiring is inferred only from the README and is not shown in the excerpts.

Main entry points: [`app.py`](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py) (Reference loading), [`docs/Overlap_annotated_NBS.csv`](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Overlap_annotated_NBS.csv) (Screening overlap data), [`docs/Prospective_studies.xlsx`](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Prospective_studies.xlsx) (Prospective study data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_review["Review workflow"]
  node_app["Streamlit application<br/>[app.py]"]
  node_upload["CSV upload<br/>[app.py]"]
  node_session["Session state<br/>[app.py]"]
  node_review_ui["Gene review tabs<br/>[app.py]"]
  node_decision["Decision and notes<br/>[app.py]"]
  node_attendees["Attendee metadata<br/>[app.py]"]
end

subgraph group_analysis["Survey analysis"]
  node_csv_parser["CSV parsing<br/>[app.py]"]
  node_gene_index["Gene-question mapping<br/>[app.py]"]
  node_response_summary["Response statistics<br/>[app.py]"]
  node_charts["Survey visualizations<br/>[app.py]"]
  node_recommendation["Cutoff recommendation<br/>[app.py]"]
end

subgraph group_reference["Reference context"]
  node_reference_data["Screening overlap data"]
  node_study_data["Prospective study data"]
  node_reference_loader["Reference loading<br/>[app.py]"]
end

subgraph group_exports["Documentation exports"]
  node_csv_export["Analysis CSV export<br/>[app.py]"]
  node_pdf_export["Review PDF export<br/>[app.py]"]
end

node_reviewer(("Expert reviewer"))
node_limesurvey["LimeSurvey CSV"]
node_github["GitHub raw content"]

node_reviewer -->|"uploads CSV"| node_upload
node_limesurvey -->|"provides responses"| node_upload
node_app -->|"renders"| node_upload
node_upload -->|"passes CSV"| node_csv_parser
node_csv_parser -->|"identifies questions"| node_gene_index
node_gene_index -->|"maps response columns"| node_response_summary
node_response_summary -->|"stores summaries"| node_session
node_app -->|"renders tabs"| node_review_ui
node_review_ui -->|"shows responses"| node_charts
node_review_ui -->|"shows cutoff"| node_recommendation
node_reviewer -->|"enters review"| node_decision
node_decision -->|"stores choices"| node_session
node_reviewer -->|"confirms attendees"| node_attendees
node_attendees -->|"stores metadata"| node_session
node_app -->|"loads reference data"| node_reference_loader
node_reference_loader -.->|"fetches overlap data"| node_github
node_reference_loader -->|"reads reference"| node_reference_data
node_reference_loader -->|"loads studies"| node_study_data
node_reference_loader -->|"provides study context"| node_review_ui
node_response_summary -->|"supplies statistics"| node_csv_export
node_session -->|"supplies decisions"| node_csv_export
node_session -->|"supplies review inputs"| node_pdf_export
node_reviewer -->|"downloads"| node_csv_export
node_reviewer -->|"downloads"| node_pdf_export

click node_app "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_upload "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_session "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_review_ui "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_decision "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_attendees "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_csv_parser "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_gene_index "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_response_summary "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_charts "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_recommendation "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_reference_data "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Overlap_annotated_NBS.csv"
click node_study_data "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Prospective_studies.xlsx"
click node_reference_loader "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_csv_export "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"
click node_pdf_export "https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_upload,node_session,node_review_ui,node_decision,node_attendees,node_reviewer toneBlue
class node_csv_parser,node_gene_index,node_response_summary,node_charts,node_recommendation toneAmber
class node_reference_data,node_study_data,node_reference_loader toneMint
class node_csv_export,node_pdf_export toneRose
class node_limesurvey,node_github toneIndigo
```

## Components

### Review workflow

- [Streamlit application](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [CSV upload](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Session state](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Gene review tabs](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Decision and notes](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Attendee metadata](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`

### Survey analysis

- [CSV parsing](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Gene-question mapping](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Response statistics](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Survey visualizations](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Cutoff recommendation](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`

### Reference context

- [Screening overlap data](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Overlap_annotated_NBS.csv): `docs/Overlap_annotated_NBS.csv`
- [Prospective study data](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/docs/Prospective_studies.xlsx): `docs/Prospective_studies.xlsx`
- [Reference loading](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`

### Documentation exports

- [Analysis CSV export](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`
- [Review PDF export](https://github.com/heikobre/screening-dashboard-sandbox/blob/main/app.py): `app.py`

### Other components

- **Expert reviewer**
- **LimeSurvey CSV**
- **GitHub raw content**

## Connections

- Expert reviewer → CSV upload: uploads CSV
- LimeSurvey CSV → CSV upload: provides responses
- Streamlit application → CSV upload: renders
- CSV upload → CSV parsing: passes CSV
- CSV parsing → Gene-question mapping: identifies questions
- Gene-question mapping → Response statistics: maps response columns
- Response statistics → Session state: stores summaries
- Streamlit application → Gene review tabs: renders tabs
- Gene review tabs → Survey visualizations: shows responses
- Gene review tabs → Cutoff recommendation: shows cutoff
- Expert reviewer → Decision and notes: enters review
- Decision and notes → Session state: stores choices
- Expert reviewer → Attendee metadata: confirms attendees
- Attendee metadata → Session state: stores metadata
- Streamlit application → Reference loading: loads reference data
- Reference loading → GitHub raw content: fetches overlap data
- Reference loading → Screening overlap data: reads reference
- Reference loading → Prospective study data: loads studies
- Reference loading → Gene review tabs: provides study context
- Response statistics → Analysis CSV export: supplies statistics
- Session state → Analysis CSV export: supplies decisions
- Session state → Review PDF export: supplies review inputs
- Expert reviewer → Analysis CSV export: downloads
- Expert reviewer → Review PDF export: downloads
