Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

##Malaria Tool

This tool is written the following techstack.

  • Python 2.7
  • Django 1.8.3
  • Postgres

####Installation: Ensure Python 2.7.x, pip and virtualenv installed.

Because its a python/django project is advised to run in separate virtual environment using either virtualenv by installing it via pip install virtualenv and creating one virtualenv malariatool

####Installing of requirements. Activate the virtualenv source malariatool/bin/activate then install python requirements using pip pip install -r requirements.txt

####To runserver:

python malariatool/ runserver

####To run test:

python malariatool/ test

####User Management: There are three user roles AdminRole, IPUserRole and Public Users.

To create a admin user:

python malariatool/ createsuperuser

And use that to login and create other users.

####Data Management: To download initial data from DHIS2 run the commands below

  • python dhis2_download_org_units region

  • python dhis2_download_org_units district

  • python dhis2_download_org_units subcounty

  • python dhis2_download_facilities

  • python dhis2_set_org_unit_parents region

  • python dhis2_set_org_unit_parents district

  • python dhis2_set_org_unit_parents sub_county

  • python dhis2_set_org_unit_parents facility

  • python dhis2_load_district_populations ../dist_population.txt

  • python loaddata dhisdash/fixtures/dhisdash_new_data_elements.json

  • python loaddata dhisdash/fixtures/dhisdash_new_data_sets.json

  • python loaddata dhisdash/fixtures/dhisdash_new_category_option_combos.json

Make sure the 'downloads' folder is created before running the next 2 commands

There are two commands to ensure that data is synced.

To download:

python malariatool/ dhis2_data_download 201502

To parse:

python malariatool/ dhis2_data_parse 201502

The above commands should be setup to run as cron jobs late in the night.


The deployment process is based on a free software platform called Ansible which enables one to provision multiple servers with just a single command.

The Ansible software is not supported on the Windows platform even though certain people have managed to get it running on Cygwin.

Installing Ansible onto a Ubuntu machine

$ sudo apt-get update

$ sudo apt-get install software-properties-common

$ sudo apt-add-repository ppa:ansible/ansible

$ sudo apt-get update

$ sudo apt-get install ansible

Cloning the Malaria Tool repository

$ sudo apt-get install git

$ git clone

$ cd ~/MalariaTool/provision

Update the hosts configuration file (inventory/hosts.ini)

x.x.x.x ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/key.pem

Update the vars configuration file (vars.yml)

Set the secret to the database password e.g. postgres

Run deployment

$ ansible-playbook app_server.yml -i inventory/hosts.ini -vvvv

Wrapping up

Rename the file to in the provisioned instance and make changes to it accordingly.

The frontend is written in BoostrapCSS, JQuery with a few plugins and LeafLetJs for the maps section.


Malaria program management and dashboard tool for Uganda






No packages published

Contributors 4