Open AI Models & Ollama for Local DHIS2 Workflows

Hi everyone!

As AI tools become more common, many of us in the DHIS2 community are looking for ways to use AI without losing control of our data, compromising patient privacy, or paying high API fees.

I want to share some notes about Open AI Models (and their licenses) and how tools like Ollama can help us run AI locally with DHIS2.

1. What Are “Open Models” and Why Do Licenses Matter for Health Data?

When you use external cloud AI services (like ChatGPT or Claude), health data has to leave your local network. For Ministries of Health and DHIS2 projects, sending data outside can violate privacy laws or fail when internet connections are down.

Open Models let you download the AI model and run it on your own computer or server. However, “open” does not always mean free without rules:

  • Fully Open Licenses (Apache 2.0, MIT): Models like Mistral or Qwen allow you to use, change, and host them locally for any purpose.

  • Open Models with Rules (e.g., Llama Licenses): Models like Meta’s Llama 3 are free to download, but they come with usage rules (for example, restrictions on automated medical diagnosis without a doctor involved).

2. What is Ollama and How Does It Help DHIS2?

Ollama is an open-source tool published under the MIT License. It lets you run open AI models on your own machine with simple commands, creating a local service that works like online AI APIs.

Main benefits for DHIS2:

  1. Full Data Privacy: Patient records and health data never leave your local network or server.

  2. Works Offline: Functions smoothly in places with poor or no internet connection.

  3. No Subscription Fees: You don’t pay per question or per page generated.

Community Examples: Members of our community are already building with local AI:

:light_bulb: A Note on Server & Hardware Costs:

While Ollama is free software, hosting models locally shifts costs from API subscriptions to server hardware. Small models (7B–8B parameters) can run on low-cost server hardware or laptops with 8–16 GB RAM. However, larger agentic or reasoning models need dedicated server GPUs (16 GB+ VRAM) or specialized unified memory hardware, which incurs upfront server hardware or local hosting costs.

3. Practical Ideas for DHIS2 + Local AI

  • Voice & Vision Data Entry: Digitizing paper forms and voice recordings directly into DHIS2 data entry forms using vision-language local models (digitizing DHIS2 data with voice, images, and AI).

  • Checking and fixing Metadata: Help admins build programs, data elements, and program rules faster using plain English commands. See the complete post (MCP behind the scenes).

  • Querying DHIS2 analytics in plain language: See more about it from HISP Rwanda.

  • Data Summaries: Use a local AI model to read DHIS2 report data and write simple weekly text summaries for health officers.

  • Offline Helpdesk: Train a local AI on DHIS2 user manuals so staff in rural clinics can ask questions without internet access.

Thank you Carlos @ctejo for this summary of the current status and use of AI in the community! Quite a helpful post.. :+1::+1::+1: