Skip to content

mpiers110/AiSHA

Repository files navigation

AiSHA — Health Financing Intelligence Layer (HFIL)

Fixing how Kenya's Social Health Insurance makes decisions


The Problem

When the Social Health Authority (SHA) rolled out in Kenya, it exposed a structural failure, that the system making high-stakes financial decisions about millions of Kenyans was doing so with unreliable data, rigid rules, and no mechanism to learn from its mistakes.

The consequences are felt every day:

  • A low-income household in Turkana gets assigned the same contribution bracket as a middle-income family in Nairobi, because the same national model is applied everywhere
  • A clinic in Kisumu submits a legitimate claim and waits weeks for payment, with no explanation for the delay
  • A member checks their SHA records and discovers they were "treated" at a hospital they have never visited
  • A family that genuinely cannot afford their contribution drops out of the scheme entirely, losing coverage precisely when they need it most
  • A member receives a contribution demand and has no way to understand how it was calculated or challenge it if it is wrong

These are not edge cases. They are the default experience for a significant portion of the 50+ million Kenyans the system is meant to serve.

The root cause is not that SHA lacks data. It is that the system does not know what to do with imperfect data, and it is not designed to improve over time.


What HFIL Is

The Health Financing Intelligence Layer is a decision-support system that sits between individuals, healthcare providers, and SHA. It does not replace SHA. It does not replace any hospital system or medical record. It makes the decisions SHA already has to make — contribution assessment, claims processing, facility accreditation — fairer, faster, and more explainable.

Think of it as the brain that should have been built into the system from the start.

It works in three directions:

For members — it answers the question "Is what I am being charged fair?" It takes into account where you live, what you do for a living, how many people are in your household, and regional income baselines. It does not pretend to know your exact income. It produces a range, a confidence level, and a plain-language explanation of how it arrived at that range. If your assigned contribution does not match, it generates a structured appeal report you can submit.

For providers — it answers the question "Will this claim be paid, and if not, why?" Before a clinic submits a claim, the system can flag likely rejection reasons, check that the diagnosis codes match the services billed, verify that the facility is authorised to provide those services, and estimate the probability of approval. This reduces the back-and-forth that currently costs providers weeks of lost revenue.

For SHA and the broader system — it provides a continuously improving signal about what is true. Every appeal filed, every claim rejected, every dispute raised by a member feeds back into the system, making the next decision more accurate than the last.


The Core Problems It Solves

1. Informal sector income is essentially invisible

Approximately 83% of Kenyans work outside the formal economy. They have no payslips, no tax records, no employer contributions. Under the current approach, a single national model attempts to estimate income for everyone using outdated survey data. The result is a model with a reported error rate of around 37% which means more than one in three assessments is significantly wrong.

HFIL replaces the single national model with regional micro-models that account for the specific economic conditions of each county or cluster. It outputs income bands rather than false precision — "this household likely falls between KES 8,000 and KES 15,000 per month, with 72% confidence" — which is more honest and more useful than a single number that is probably wrong.

2. Decisions are made in a black box

Currently, a member who receives a contribution demand has no practical way to understand why that number was chosen or what they would need to demonstrate to have it changed. A provider whose claim is rejected receives a rejection code with no explanation of what specifically was wrong.

Every decision the intelligence layer produces comes with a plain-language explanation. Not "Error Code 47", but "This claim was flagged because the procedure billed requires a pre-authorisation that was not requested, and the facility type is not licensed to perform this category of service." Every contribution assessment comes with the factors that drove it and what evidence could change the outcome.

3. Fraud goes undetected until it is too late

The tweet that captures this perfectly:

"I am in the office, working and healthy but on my medical records on SHA, it shows that I have gone to hospital and treated today. I have UTI and being given an antibiotic and paracetamol."

A real member. A claim they never authorised. A facility they never visited. Under the current system, this claim would likely be processed and paid with no one the wiser until the member happened to check their records.

HFIL addresses this at two levels. At the facility level, it scores every newly accredited facility for risk at the point of registration — flagging patterns like multiple facilities registered to the same address, suspicious ownership structures, or facilities that sit dormant for months before suddenly filing high claim volumes. At the claim level, it cross-references each claim against member history and facility baselines. A claim filed against a member with no prior history, by a facility billing at four times its peer group average, for a service that member has never needed before, gets flagged before payment is released — and the member/next-of-kin gets an SMS asking them to confirm or dispute it.

4. One size fits all — and it fits no one well

The same model that works reasonably well for urban Nairobi performs poorly in rural Marsabit. The same contribution brackets that are manageable for a stable household become catastrophic during a drought or a family illness. HFIL is built to adapt to region, to economic shocks and to seasonal patterns because a system that cannot adapt will always produce inequitable outcomes.

5. The appeals process is broken

When a member believes their contribution is wrong, the current process is difficult to navigate, opaque in its criteria, and frequently ends in rejection without explanation. HFIL includes a dedicated appeals pathway therefore a member or a healthcare worker assisting them can submit contextual information and receive back a structured assessment of whether the contribution appears fair, what the basis for that assessment is, and a pre-formatted appeal report they can submit through official channels. The goal is not to replace the appeals process but to make it navigable for people who have no legal or administrative expertise.


Who It Is Built For

Members — especially those in the informal sector, in low-income households, or in counties where the national model systematically underestimates economic hardship. And members like the one in the tweet above, whose identity is being used without their knowledge.

Healthcare providers — particularly small clinics and dispensaries in underserved areas, who cannot afford to absorb weeks of delayed payments because a claim was rejected for a reason no one explained to them.

Civil society and patient advocacy organisations — who can use the appeals tool on behalf of members who lack the literacy, connectivity, or confidence to navigate the system themselves.

SHA itself — because a system that makes better decisions, loses less money to fraud, and generates fewer legitimate complaints is a more sustainable and credible system.


What It Is Not

HFIL is not a replacement for SHA, for hospital management systems, or for electronic health records. It does not store clinical data. It does not make final decisions — it produces recommendations, flags, confidence scores, and explanations that feed into human and institutional decision-making. It is not a silver bullet for a problem that is ultimately as much political and institutional as it is technical.

What it is: a layer of intelligence that the system desperately needs, built to work with the imperfect data that actually exists, designed to improve over time, and grounded in the principle that a system making high-stakes decisions about people's health and financial security owes those people an explanation.


The Long View

If this works at the scale of SHA Kenya, the same intelligence layer — the same approach to probabilistic income estimation, explainable claims decisioning, fraud detection, and adaptive regional modelling — applies to every social health insurance system in sub-Saharan Africa facing the same structural challenges. The informal sector problem is not unique to Kenya. The opacity problem is not unique to Kenya. The fraud problem is not unique to Kenya.

The goal is not to build one tool for one country. The goal is to build the standard for how health financing decisions get made in markets where the data has never been clean and the stakes have always been high.


AiSHA is an independent project. It is not affiliated with, endorsed by, or operating on behalf of the Social Health Authority of Kenya.

About

AiSHA is a decision-support system that makes contribution assessment, claims processing and facility accreditation fairer, faster, and more explainable. Its grounded in the principle that a system making high-stakes decisions about people's health and financial security owes those people an explanation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors