Crowdsourcing Validation Rules for Uganda National ID

I am curious about the ability to validate that the Uganda National Identification Number (NIN) is well formed. However this does not validate that the NIN actually belongs to the person presenting it or that it is correct.

The rules that I have been able to gleam are:

  1. Must be 14 characters long
  2. First character is a letter of the alphabet. C seems to be a common letter – does it stand for citizen?
  3. Second letter is either M or F – male or female
  4. Characters 3 and 4 are numbers, which are the year of birth. Cannot be after 00 since that would make a person below 18
  5. Characters 5, 6, 7 are numbers

How can you help? Which of these rules do not match your NIN? Share any additional patters to build a repository of rules that can later be mapped to programming language validations – Regular expressions and validation frameworks


Harvest Money Expo – What Next for Agribusiness in Uganda?

harvest_moneyOver the weekend, I took time to go to the Harvest Money Expo ( with the aim of getting some ideas to stimulate my mind with agribusiness opportunities. I awas fortunate to also meet with Robert Kabushenga, Dr Kisamba Mugerwa and Hon. Rosemary Sseninde.

I did some personal introspection on why agribusiness for a technology slanted and entrenched character like myself? My reasons are wide and varied, but include:

  1. The healthy eating challenge – with the rampant industrialization of the food industry, we are eating more and more hormone driven chemically enhanced meat and vegetables, sugar induced juices. This is an opportunity to start taking charge of my eating, in a small but significant way just like my friend James Wire Lunghabo (
  2. The investment challenge a long play – agribusiness is the next business frontier. Every one has to eat – you can skip for a day or two, but you must eat! So this is the best place to invest, however carefully & gradually growing a portifolio with focused investment.
  3. Retirement plans – oh yes, in about 15 years I will be knocking on retirement from the daily technology grind as I am not sure if my body will still be able to take the beating. So now is the time for me to start planning on what I will do then
  4. Family bonding activities – with all the technology drivers, concrete streets, walled homes, hustle and bustle, simple farm activities provide a chance for the family to bond, learning and teaching from each other. Let us mis-educate each other
  5. Learning platform – agriculture provides a different learning dimension and perspective, how to play well with mother nature at the same time trying to beat her at her game. GMO vs indeginous, do I need to make that capital investment or structure working capital, unskilled vs semi-skilled vs skilled human resources, business processes, organic or commerical business models, what kind of inputs to use, market approach and segmentation, to-do or not-to-do value addition, local vs foreign, and a hybrid to mix all of them together in one pot.

So did the expo deliver, oh yes, I had no expectations, walked around with an open mind, and obviously the depth and breadth of solutions and distributors was immense and varied.

Given all that, what next?

  1. Focused Agricultural Information provision in specific areas for farmers is truly a missing gap – this is what National Agricultural Advisory Services (NAADS) was meant to be. Not just extension workers going to farmers, but experience, exposure and eduction with the aim of improving productivity. The value chains exist, but how to bring all the players in line without exploiting the farmer
  2. Alternate Financing options are necessary – BOU Agricultural Credit Facility (ACF) is only in name, but not available to the farmers in the $5,000 to $50,000 range who are the main drivers of the sector. The commerical banks pay lip service to farmers treating them like lepers without taking time to create specialized vehicles for success.
  3. The need to coordinate players into “assembly lines” from seed/baby animal to plate. This is illustrated by the expo organization, which attracted government, public and private sector players, local and foreign, as well as across the value chains.
  4. In addition to knowledge, quality inputs are a missing link – seeds, fertilizers, chemicals (yes a necessary evil), practices and processes to improve production.
  5. Agribusiness education – the marriage between agriculture and business practices, which is a paradigm shift that is required to drive the sector to new heights. This will lead to the realization that there are multiple models that can be adopted, there is no single right way to approach agribusiness, but its all based on context, location and complimentary advantage.
  6. A need for a sprinkling of relevant appropriate technology (not only IT), but even tools, to spur growth in the new area. The soil stabilized bricks, hyroponics and natural shea butter based beauty & health products, are areas that really caught my eye.

The million dollar question for me is “How to drive agribusiness from subsistence to semi-intensive at a national scale?”


Boda boda registration – An approach for KCCA

There are job advertisements going all around social media for enumerators to support an exercise to register boda-boda drivers in Kampala city. These are thoughts on how the implementation can be done in a cost-effective manner, getting a reasonable return for the investment.

  1. Stakeholder engagement and management – outline the benefits of the registration to the different stakeholders, the motorcycle owners, riders, general public, law enforcement
  2. Digitize the process – in the era of cheap $100 – $150 tablets, this can manage the costs by combining both the data collection and data entry steps of process. This can also help provide immediate metrics of survey progress
  3. Leverage the social organization that is boda boda stages – these are the defacto locations where the riders congregate and organize themselves. At the stages is also a social circle and hierarchy with savings schemes, rules of behavior that is enforced.
  4. Leverage other databases – URA TIN and Vehicle Registration, National Identification Regulatory Authority (NIRA) for National ID verification to help verify the accuracy of the collected data
  5. Tag the boda bodas that have been registered – you can use passive RFID tags which can be checked quickly
  6. Use a local company to build the platform – rather than a foreign owned entity
  7. Plan for motorcycles that may be missed in the different verification waves, so that the exercise remains up to date

Additions and feedback are welcome

Software Delivery Skills Plan 2018

If you fail to plan, you are planning to fail! ~Benjamin Franklin

A new year is upon me, and looking over the horizon I am looking to do the following work streams to help better my development skills

1. Work with a new age Javascript framework – vue.js seems the rage, this is also working with webpack and new Javascript build tools

2. Make docker part of my development workflow – this will be project based

3. Distributed ledger proof of concept – the distributed ledger is the rage now, but what can be achieved to prove its capability

4. API First project – this is a separatation of the backend REST APIs from the front end, may be combined with the vue.js to deliver a working project. I will also look to leverage the OpenAPI

5. Write a paper for a scientific journal leveraging the health informatics work I have been doing over the last 3 years and present it at a conference.

UgandaEMR Bootcamp – Strengthening the Foundation for a National EMR

This article was originally published on the METS website at with photos courtesy of Nancy Karunganwa (

The week of November 20 – 24, 2017, was an exciting one for the EMR team at METS where we held the first UgandaEMR developer bootcamp, aimed at developing local capability to extend and build upon UgandaEMR. The end-goal was to have 4 new HMIS forms developed to be added to UgandaEMR by the participants, while building their understanding of the platform, how it works, and the software delivery process used by the METS team.

The blog post below is abridged in Twitter thread at


METS is the Monitoring and Evaluation Technical Support program a 5-year Centers for Disease Control (CDC) funded cooperative agreement, started in April 2015, led by Makerere University School of Public Health (MakSPH) as prime with University of California San Francisco (UCSF) as a sub-grantee. The aim of the program is to support Uganda Ministry of Health (MoH) with Strategic Information across multiple areas, one of which being the ability to leverage electronic medical records (EMRs) as the foundation for patient centered care starting with public health facilities.

From August 2015 to February 2016, the METS team embarked on updating an OpenMRS distribution, WHO Express, which was over 6 years old installed in about 350 public health facilities, to the latest released OpenMRS version as well as the the latest HMIS tools in ART care. In March 2016, the METS team started upgrades and training on how to use the new version of the EMR in Kabarole, a district in Western Uganda, with 20 sites. In May 2016, the first National Training of Trainers was held in Mbrarara with over 150 trainees, followed by an official rebranding of the OpenMRS distribution by MoH, to UgandaEMR.

Fast forward to September 2017, when METS released UgandaEMR 2.0.0 an upgrade from the 1.x series released in 2016, using the latest long term release OpenMRS platform (2.0.5) and Java 8, which is seen as the future foundation for the next 5 – 10 years.

The key challenge faced by the METS UgandaEMR team is that new features were not being added as fast as the implementing partners, MoH program areas and end-user facilities needed. This led to the concept of a bootcamp to seed the local tech scene with capacity to develop upon and extend UgandaEMR providing a key component of sustainability for the platform, through speeding up development of health tools needed by stakeholders.

The bootcamp with 20 participants, was split into 5 days, following the principles of agile software delivery, with focus on having usable forms by the end of the camp.

Day 1 – Problem definition and requirements gathering

To kick off the bootcamp was outlining of the expectations by the participants – most of which focused on learning about UgandaEMR, building on top of it and learning more about the software delivery process used to build the EMR.

The 4 HMIS tools to be developed in the week were introduced by a doctor from the METS team, building up an understanding of the purpose of the paper tools and how they are used within the context of a public health facility.

A parallel activity between the breaks of the tools discussion was setup of the development environment tools on participant laptops, which included MySQL/5.5, Java 8, git, maven, OpenMRS SDK, Intellij Community Edition & Visual Studio code that were to be used on preceeding days.

At the end of each day, the facilitators and participants had a “retrospective” looking at how the day went and what can be improved going forward.

UI Wireframe Showcase

Day 2 – Wireframing

The key challenge with digitizing paper records is how the paper tools are transformed to digital forms. The day kicked off with an overview and guidelines for UgandaEMR form design process at

The teams were handed pencils and paper, and with support from facilitators developed UI wireframes. After 3 hours of back-and-forth the teams were requested to show case their designs to provide feedback for each individual team but to also share learnings across all the teams.

Day 3 – Concept Management

OpenMRS Architecture Presentation

OpenMRS Architecture

This was the first day that the facilitators and participants delved into OpenMRS architecture and design, leveraging parts of a presentation “Health IT and OpenMRS: An Introduction

The idea was to introduce concepts and how the medical data is coded using concepts. Once the introduction was complete, the teams re-assembled to identifying the concepts needed for their forms following searching the locations below:

  • UgandaEMR concept dictionary
  • CIEL – a local instannce using the latest released concept dictionary
  • Identifying new custom concepts to be created

The discussion and modeling of the required concepts led to interesting discussions on differing approaches to handling repeated data capture dependent on the context of usage of the concepts. In certain cases we agreed to disagree about the models which would be tackled in subsequent iterations.

Day 4 – Coding HTML Forms

This was the long awaited activity, to see the forms come to life. Based on prior experiences, all laptops had setup and configured development environments.

The process copied from OpenMRS development guide was as follows:

  • Each team picked a single machine to work on
  • The team created a branch which was the HMIS number for the form being worked on by the team
  • An OpenMRS SDK  server named ugandaemr was created
  • The server was configured to watch the developement folder such that any changes to the forms would be automatically viewed following steps at

Once the initial form metadata was entered, with a quick primer on using HTML form entry tags, the teams worked leaving gaps where concepts were not yet defined.

The presentations were electrifying as the work for the whole week could be visualised. The approach to the team was the non-developer was to do the actual coding of the form, with the support of the team so as to slow down the “coding speed” to ensure all team members were active.

At the end of the day a working version of each team’s form was committed to GitHub and a pull request issued for progress monitoring.

Day 5 – Presentation Day

This is usually the most stressful day, however to make it fun the teams took the opportunity to self-organize in order of presentation, with a . number of constraints, teams decided the order to present, with opportunities being given to team members who had not lead any presentations during the week.

Dr Eddie Mukooyo, Ms Evelyn Akello with the best performing team at the bootcamp

This was to give all the team members an opportunity and to force the teams to prepare for the presentations.

A winning team was selected based on their presentation style, understanding of the HTML form being delivered and progress within the constraints.

Key Learnings

  1. The bootcamp was for 20 participants of whom 6 were female with a range of background from students of software engineering and Masters, software developers, M& E and public health practitioners
  2. The 5 days were not sufficient to complete working on the forms so the teams will work on their own with a planned follow-on activity to finalize for inclusion in UgandaEMR
  3. The positive feedback from the participants was with regard to the practical, collaborative and hands-on nature of the bootcamp, the learning experience of having to work within their teams which were randomly selected, balance brought to the teams from both the technical and non-technical members.

The event as seen by a little eye

Interactive discussions

Smiles and laughter to lighten up the day

Random selection of teams using sticky notes

Dr Eddie Mukooyo making closing remarks at the bootcamp on opportunity and expectations from the cohort of participants

Part of the METS UgandaEMR team with CDC Program Manager just after the first round of final day presentations

Group Photo – The first UgandaEMR Bootcamp participants and facilitators

TechTip: Installing Airtel Uganda Huawei E3131 on MacOS Sierra

If you are like me, there comes a time when you need to whip out old tech tools to solve a need. In my case it was Internet access in Hoima, which has MTN and Airtel as useable networks.

I have an old modem, which intially had a data simcard gone bad (that is a story for another day) however it was discontinued in 2012, so there were no drivers for Mac. The installation package terminates with errors so I was stumped.

Step 1 was finding the model which involved opening up the modem as below


Step 2 was to find an installation package, which after about an hour of Googling and reading involved using an Huawei Mobile Partner (

Once installed you can now use your modem readily. Hope this saves someone else some pain…

National Digital eHealth Systems Maturity Model

My thoughts on this topic were fully crystallized at a WHO workshop to disseminate the Consolidated Guidelines on Person-Centered HIV Patient Monitoring and Case Surveillance, from June 18 to June 23, 2017, where one of the discussions centered on the state of national eHealth data collection and management systems.

My thoughts on this model, were firmed up by the discussion and sharing following the three-age system adopted by history, anthropology and archeology in organizing human events. The stages are:

  1. Stone Age – communities of 25 to 100 people surviving on hunting and gathering. Some communities evolved into having temporary settlements at opportune locations for economic activities
  2. Agricultural Age – permanent settlements varying in size from villages to walled cities. Increased scale of domestication of animals, planting of fields and use of tools for agriculture.
  3. Industrial Age – Replacement of hand tools by power driven-tools, communities coming together in governance, planning and resource mobilization. Learning and culture starting to blossom, and new knowledge being created

Now to map those models into national digital eHealth initiatives

  1. Stone age
    • Paper based tools for patient monitoring and reporting
    • Limited use of electronic medical records (EMR) coverage below 20% of sites
    • Where EMRs are available used as dumb data dumps to simplify mandatory reporting needs
    • Adhoc usage of data for facility care and program monitoring
    • Single disease support in EMR
  2. Agricultural age
    • Increased rollout and usage of EMR tools at patient service sites over 60% coverage
    • Disparate integration efforts and capabilities between different systems
    • Routine mandatory reporting well established
    • Routine data usage for patient care and treatment program monitoring
    • Initial efforts at system inter-operability over and above point-to-point system integration
    • Adhoc dashboards and data analysis outputs developed
    • Unique identification processes at initial state of establishment
  3. Industrial Age
    • At least 85% of sites have an EMR installed and routinely used
    • EMR systems cover at least 60% of clinical data available
    • Routine patient treatment and monitoring data generated, analyzed and summarized
    • Connections between systems done following documented best practices and protocols leading to development of health information exchanges
    • Dashboards and data analysis tools routinely used to display summaries at different levels
    • Well established, documented and routinely used unique identification
    • Data de-identification done regularly to provide data sets for analysis

Looking forward to hearing your thoughts … Where does your nation lie

%d bloggers like this: