Keeping Old Systems Alive: Notes from the HIV/AIDS MIS Trenches


Hey there 👋
If you’ve ever worked in public health tech in Pakistan, or anywhere that deals with legacy systems, you already know the drill: patching old codebases, wrangling broken reports, making things work on servers you’re afraid to reboot. That’s been a big chunk of my work lately. Mostly with HIV/AIDS information systems, plus a healthy dose of TB and malaria trackers, logistic dashboards, and whatever else lands in the inbox.
This post is less of a tutorial and more a brain dump of what it’s like maintaining critical-but-creaky health systems in the wild.
The Context: Real-World Software with Real-World Stakes
I currently work at the Common Management Unit for the Global Fund (CMU) under the Ministry of Health, where we manage national-scale systems for programs funded by The Global Fund, Bill and Melinda Gates Foundation etc. These aren’t side projects or sandbox builds, they’re the actual tools field staff, program managers, and decision-makers rely on.
And most of them weren’t built last week.
There’s HIV/AIDS MIS, which has been through enough cycles of grant requirements, reporting template changes, and tech shifts that just touching it requires some archaeology. I literally call it the dinosaur of CMU. And, the only documentation that exists is my boss who has been working on it since 2017. FYI, he also inherited the system from another developer.
But it works—tracking ART pateints, prevention programs, and logistics across the country.
Some Facts on the HIV/AIDS MIS
The National HIV/AIDS MIS is a web-based enterprise application built to support the end-to-end monitoring of HIV/AIDS services, logistics, and prevention programs across Pakistan. It is modular in design, with dedicated components for case registration, follow-up, prevention tracking, stock management, and reporting.
The system architecture follows the Model-View-Controller (MVC) pattern and is implemented using C# .NET Framework, Microsoft SQL Server, and Entity Framework (EF6). It supports role-based access control, dynamic dashboards, and RESTful API integration with external systems.
Key System Modules:
Patient Registration and Treatment: Tracks all registered PLHIV including demographic, clinical, and ART (Antiretroviral therapy) data.
Prevention Module: Captures outreach and service provision data for Transgender (TG), Female Sex Workers (FSW), and Male Sex Workers (MSM) populations via CBOs (Community Based Organisations). Includes integration of revised R&R tools and automated prevention reporting.
Logistics Management Information System (LMIS): Oversees stock levels, antiretroviral (ARV) distribution, and procurement tracking. Supports Good Receiving Notes, dispatches, expiries, and ledger reconciliation.
Reporting and Analytics: Generates programmatic and strategic reports including ART adherence, cohort tracking, and the Disease Burden Report.
Validation and Automation Engine: Powers automatic data validation sheets and report generation logic to ensure timeliness and consistency.
The MIS supports 94 ART centers, provincial AIDS control programs, and national dashboards. It enables efficient program management by aggregating, analyzing, and visualizing data for treatment scale-up, resource planning, and epidemic control efforts.
The application is accessed via browser and secured through ASP.NET Identity and OWIN, with audit trails and data encryption applied for confidentiality and integrity of sensitive health data.
Technology Stack
The development of the National HIV/AIDS MIS utilized a robust set of frameworks, libraries, and technologies that ensured system scalability, performance, and security. Below is the summary of the technology stack:
Frontend:
ASP.NET MVC – for web interface and route management
Razor Views (.cshtml) – for server-side rendering of HTML
jQuery and JavaScript – for dynamic form handling, validation, and AJAX requests
Bootstrap – for responsive UI and layout
Backend:
C# .NET Framework (v4.8) – core server-side development language
Entity Framework (EF6) – ORM for database access and LINQ-based queries
ASP.NET Identity & OWIN – for authentication, authorization, and role-based security
Microsoft Report Viewer – for generating dynamic and printable reports (ART, LMIS, Cohort)
Database:
Microsoft SQL Server – relational database engine with stored procedures and indexing
EDMX Model (Entity Data Model) – defines the object-relational mapping structure Utilities & Libraries
OfficeOpenXml (EPPlus) – for generating Excel-based exports
PagedList – for pagination of large datasets
Newtonsoft.Json – for JSON serialization and API responses
Deployment & Tools:
IIS Express / Local IIS – for local development and deployment
Visual Studio – primary IDE for development and debugging
SSMS (SQL Server Management Studio) – for database management
This stack provided a solid foundation to manage large-scale health information workflows, real-time reporting, and user management in a secure and maintainable environment.
What Maintenance Actually Looks Like
Some days, it’s database cleanup. Others, it’s bug hunting in C# .NET MVC apps that haven’t been touched in years. A few highlights:
Automated Monthly Treatment & Prevention Reports: Took what used to be manual data wrangling and turned it into one-click exports. Annual, Bi-annual, Quarterly and Monthly reports making efficiency up by 30–60%.
Field Coordination Ticketing System: Built this for the HIV/AIDS program to reduce the noise in WhatsApp groups. Clean UI, good data logging, and actual traceability.
R&R Tools for Grant Cycle: Built out entire CRUD-based reporting platforms in ASP.NET MVC with MS SQL to help field staff submit and track data in structured ways for the new grant cycle. Creating new indicators and integrating into the old reporting systems involving massive stored procedures is a drag.
API Integrations: The fun part, connecting this aging system to others via JSON/XML REST APIs. Fragile, but very satisfying when it works.
Challenges That Never Make It to the GitHub README
Let’s be honest, this kind of work rarely trends on dev Twitter. You won’t find “How I Debugged the HIV/AIDS MIS Reporting Engine at 2 A.M.” on Hacker News. But here’s where the hard problems live:
Changing Requirements, Same Old Stack: Every new grant cycle adds a new layer of logic. You can’t rewrite from scratch. You adapt, carefully.
Server Struggles: I’ve spent late nights tracking down slow SQL queries choking on massive ledgers and watching critical reports fail silently because the server just didn’t have enough RAM to breathe. Windows or Linux, it doesn’t matter when resources are tight and uptime matters. Backups are religion.
No Buffer for Bugs: These systems are live. People depend on them. If a report breaks, data stops flowing. If a server goes down, programs stall.
Why I Keep Doing It
Because this stuff matters.
The systems we maintain aren’t glamorous, but they’re the foundation for public health infrastructure in Pakistan. HIV/AIDS prevention reporting, TB case digitization, AI modeling for TB hotspots—all of it connects back to real lives, real decisions, real outcomes.
And for someone like me, who loves writing code, breaking things (safely), and solving messy problems, it’s a strange kind of satisfying.
For Fellow Devs Doing Similar Work
If you’re maintaining public health systems, here’s what’s helped me:
Automate the pain points. Reporting templates change? Build parameterized tools. Data validation is a mess? Automate that too.
Version control everything—even SQL scripts and form templates.
Document while it's fresh. You'll forget what that XML schema tweak was for next quarter.
Talk to users. Field staff know where the bugs are, even if they don’t speak your tech language.
Don’t be afraid of old code. Respect it. Refactor it. But don’t try to “modernize” everything just for the sake of it.
Wrapping Up
This blog isn’t a roadmap or a pitch deck. It’s just a space to unpack what I’m learning—sometimes deep dives, sometimes notes from the field.
For now, this one’s for the devs who keep the health systems running behind the scenes. If that’s you, solidarity. ✊
Catch you in the next one.
Subscribe to my newsletter
Read articles from Hijab Hassan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
