Data Synchronization and Analytics

Using CHT Sync for data synchronization and analytics

The pages in this section apply to both CHT 3.x (beyond 3.12) and CHT 4.x.

Most CHT deployments require some sort of analytics so that stakeholders can make data driven decisions. CouchDB, which is the database used by the CHT, is not designed for analytics. It is a document database, which means that it is optimized for storing and retrieving documents, and not for aggregating data. For example, if you wanted to know how many patients were registered in a particular area, you would have to query the database for all the patients in that area, and then count them. This is not a very efficient process. It is much more efficient to store the number of patients in a particular area in a separate database, and update that number whenever a patient is registered or unregistered. This is what CHT Sync is designed to do.

CHT Sync is an integrated solution designed to enable data synchronization between CouchDB and PostgreSQL for the purpose of analytics. It has been designed to work in both local development environments for testing models or workflows, and in production environments. It can be deployed using Docker or Kubernetes. It is supported on CHT 3.12 and later, including CHT 4.x. By using CHT Sync, a CHT deployment can easily get analytics by using a data visualization tool, such as Superset. CHT Sync is open-source and has no licensing fees.


CHT Sync Setup with Kubernetes

Setting up CHT Sync with Kubernetes and the CHT

CHT Sync Setup with Docker

Setting up CHT Sync with Docker and the CHT

Migrating from couch2pg to CHT Sync

Instructions on migrating from couch2pg to CHT Sync for data synchronization and analytics.

dbt Models for CHT Applications

Guide for building dbt models for CHT applications

Testing dbt Models

Guide for testing dbt models

Data visualization

Data visualization tools for CHT Sync

Environment Variables

Environment variables for running CHT Sync


CHT Core Framework > Overview > CHT Sync

Data synchronization tools to enable analytics

CHT Core Framework > Overview > Data Flows

An overview of data flows in the CHT for analytics, impact monitoring, and data science