1 of 14

DHIS2 Mobile apps implementation with Flutter

~ Eric Chingalo, Systems Developer - HISP Tanzania

2 of 14

  • Primarily at HISP Tanzania, mobile application solutions are implemented by using the DHIS2 capture.
  • Due to complexity and very specific user requirements, there are some projects that requires mobile application development.

Mobile apps implementation

Background

  • Most of mobile applications solutions, are developed targeting both iOS and Android platforms.
  • Initially development of mobile application, was done by using a javascript framework called Ionic.
  • In early 2020, with the rise of popularity and community support in the flutter framework, the development team decided to migrate to using this new framework.

Mobile apps development

3 of 14

What is Flutter?

  • Flutter was first released in 2017, and has grown rapidly in popularity ever since.
  • Flutter apps are written in Dart programming language, that is a object-oriented, garbage-collected, and class-based C-styled programming language.
  • Dart is strongly typed and hence more developer friend.
  • In addition to blazing fast performance of flutter apps, its wide community makes it easy to get started with development.
  • The architecture of flutter apps is based on Widgets, that defines specific visual elements that makes up the app. In fluttle everything is a widget.

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

4 of 14

Why Flutter?

  • Fast performance: Flutter apps are built using natively compiled code, which means they perform fast and smoothly, even on older devices.

  • Hot reload: Flutter's hot reload feature enables developers to see the changes they make to their code instantly in the app, saving time and improving productivity.

  • Single codebase for multiple platforms: Flutter allows developers to write a single codebase that can run on both iOS and Android, reducing the time and effort required to develop apps for multiple platforms.

  • Large and active community: Flutter has a large and active community of developers, who contribute to the framework and provide support and resources for building great apps

5 of 14

DHIS2 mobile apps with Flutter

  • Initially we had all the https services, local database implementations and numerous utility functions handled within the code base of an application.

  • Implementation of of these applications utilized the DHIS2 web API to ensure connection with a DHIS2 instance.

  • This enabled us to build flutter applications that can support connection with the DHIS2 server through the exposed web API, offline data entry and synchronization with online DHIS2 server.

6 of 14

Quick Demo

Here is the link to github repository: https://github.com/hisptz/dhis2_flutter_demo

In the following short demo we will see:

  • Authentication handling in HTTP.
  • Fetching data using DHIS2 API.
  • Sending data into DHIS2 through its API.

The demo will involve user authentication, programs exploration and saving program summary on data store.

7 of 14

Our Experience So far

  • With multiple applications to maintain, we decided to develop a flutter package for the common user interface widgets to improve fast app development and maintenance.

  • Additionally to support offline evaluation of program rules and program indicator, DHIS2 data models and other basic utilities, we had to also develop a dart utilities library.

  • Due to these challenges, two packages the development of flutter apps became faster and easily maintainable.

8 of 14

Our Dart and Flutter Packages

These packages can be found at https://pub.dev/

9 of 14

Examples of DHIS2 apps we built

LODIIS (Lesotho OVC and DREAMS Integrated Information System ) mobile app

10 of 14

Examples of DHIS2 apps we built

Offline Covid19 vaccination mobile application

11 of 14

Examples of DHIS2 apps we built

Tanzania MoH reports app

12 of 14

Examples of DHIS2 apps we built

Android

iOS

Tanzania National Health Portal

13 of 14

Way Forward

  • We are currently improving and extending the capabilities of the two packages to cater for more use cases.

  • We are planning to extended the use of these packages in other flutter supported platforms such as Windows, macOS and Linux.

  • We are planning to have a complete DHIS2 Flutter SDK that could support for building DHIS2 mobile applications using this powerful flutter framework.

14 of 14

THANK YOU!