Survethi stands for Surveillance Ethiopia, a PAT/AICS project (link - AID011330)
Tool in Flask + Bootstrap (Python, Javascript) to show in real time and historical perspective, the data collected with OpenHospital tool in St.Luke Hospital of Wolisso, Region of Oromia, South West Shoa Zone (SWSZ), Ethiopia.
Data are collected from phisicians in real-time, the tool queries the DB with a refresh rate for aggregated data (patients' details are never exposed!) and shows on the map the total numbers with geo-positions (provenance declared by the patients) and grouped by disease.
Historical data are meant for long term studies and comparations and are lazily (or on demand, but not automatically) queried by the DB, with filtering on provenance and diseases.
-
Bootstrap 4.1.3
(+Toggle, +Select, +Popper.js, +tippy-bundle 6, +colors-css 2.2.0, +bootstrap-table 1.17.1, +bootstrap-table-export)
-
jQuery 3.5.1
(+ui 1.12.1, +touch-pouch 0.2.2, +tableExport)
-
Leaflet 1.5.1
(+MarkerCluser 1.4.1, +Fullscreen 1.0.1, +heat, +history, +TimeDimension 1.1.1, +shpfile)
-
HighCharts (+exporting, +offline-exporting, +export-data)
-
DaterangePicker (+FontAwesome)
-
Moment.js
-
Lodash 4.17.15
pip install Flask
python -m pip install -r requirements.txt
(edit with any text editor)
For Linux
export FLASK_APP=my-map-in-flask.py
export FLASK_ENV=development ### optional
For Windows
set FLASK_APP=my-map-in-flask.py
set FLASK_ENV=development
flask run
* Serving Flask app "my-map-in-flask.py"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
(need OpenHospital's Wolisso-DB with db_changes/
scripts applied)
Home (returns index.html)
'/'
Query by dates (retrieve data for Real Time map)
/query (default values = '2019-01-01'/'2019-12-31')
/query/<dateFrom>/<dateTo>
Query Grouped (just a different query)
/query_group (default values = '2019-01-01'/'2019-12-31')
/query_group/<dateFrom>/<dateTo>
Query Epoch (retrieve data for Historical Map)
/query_epoch (default values = '2019-01-01'/'2019-12-31')
/query_epoch/<dateFrom>/<dateTo>
Query Epoch Range (get the last available date range from historical data)
/query_epoch_range (default values = '2019-01-01'/'2019-12-31')
Query Epoch JSON (no query, just convert previous retrieved data to JSON)
/query_epoch_json_static (default values = '2019-01-01'/'2019-12-31')
Query Epoch GeoJSON (no query, just convert previous retrieved data to GeoJSON)
/query_epoch_json (default values = '2019-01-01'/'2019-12-31')
Diseases (returns the list of available diseases)
/diseases
Locations (returns the list of available locations)
/locations
/test (uses datasource/datasource.json)
/test_group (uses datasource/datasource_group.json)
/test_diseases (uses datasource/diseases.json)
/test_locations (uses datasource/locations.json)