How simpledotorg/h360tk_grafana_core works
HEARTS360 Toolkit is a Docker-hosted health-data monitoring system. Its main workflow is facility staff uploading patient line lists, which a file watcher and Python ingester normalize into PostgreSQL; Grafana then presents facility and district dashboards and overdue-patient lists. A separate reporting exchange exports reporting data and imports versioned archives. The README documents hourly and admin-triggered dashboard refreshes, but the sampled source does not show their implementation, so those links are marked unverified. The refresh and dashboard capabilities are represented by the provisioned Grafana dashboards.
Main entry points: 01_heart360_tables.sql PostgreSQL · exporter.py Scheduled exporter · importer.py Scheduled importer · base.py Import operations
Components 18
Upload and ingestion
- File upload
docker-compose.yml - Uploaded files
docker-compose.yml - File watcher
inotify_scripts/fileproc.sh - Line-list ingestion
inotify_scripts/ingest_file_h360tk.py
Database and dashboards
- PostgreSQL
pg_init_scripts/01_heart360_tables.sql - Schema initialization
pg_init_scripts/00_schemas.sql - Grafana dashboards
grafana_provisioning/dashboards/HEARTS360 Dashboards - Refresh dashboard
grafana_provisioning/dashboards_admin/heart360.data.refresh.json
Reporting exchange
- Scheduled exporter
exporter_scripts/exporter.py - SFTP exchange
- S3 destination
- Scheduled importer
importer_scripts/importer.py - Version registry
importer_scripts/import_versions/__init__.py - Version 1 import
importer_scripts/import_versions/v1.py - Import operations
importer_scripts/import_versions/base.py
Data preparation
- Prepared CSV data
prepare_date.py
Other components
- Facility staff
- Data staff
Connections 18
- Facility staff → File upload: uploads file
README.md - File upload → Uploaded files: stores file
README.md - Uploaded files → File watcher: detects file
README.md - File watcher → Line-list ingestion: runs ingestion
README.md - Line-list ingestion → PostgreSQL: inserts records
README.md - PostgreSQL → Grafana dashboards: supplies dashboard data
README.md - Data staff → Refresh dashboard: requests refresh
README.md - Refresh dashboard → PostgreSQL: refreshes precomputed data
README.md - Scheduled exporter → PostgreSQL: queries reporting data
exporter_scripts/exporter.py - Scheduled exporter → SFTP exchange: uploads archives
exporter_scripts/exporter.py - Scheduled exporter → S3 destination: uploads archives
exporter_scripts/exporter.py - Scheduled importer → SFTP exchange: downloads archives
importer_scripts/importer.py - Scheduled importer → Version registry: selects importer
importer_scripts/importer.py - Version registry → Version 1 import: registers version
importer_scripts/import_versions/__init__.py - Version 1 import → Import operations: uses base operations
importer_scripts/import_versions/v1.py - Scheduled importer → Import operations: truncates tables
importer_scripts/importer.py - Import operations → PostgreSQL: loads reporting tables
- Prepared CSV data → Data staff: writes CSV outputs
prepare_date.py