DEV Community

Rory | QIS PROTOCOL
Rory | QIS PROTOCOL

Posted on • Originally published at qisprotocol.com

8,000 OpenMRS Deployments Are Treating HIV, TB, and Malaria in 40 Countries. None of Them Learn From Each Other.

Article #209 — QIS Protocol Series


A clinic in Kigali has been treating HIV-positive patients with a modified first-line antiretroviral regimen for three years. Their virologic suppression rate is 23 points above the regional average. They have identified which patient profile drives the outperformance — a combination of adherence intervention timing, nutritional co-management, and a specific drug substitution for patients with comorbid tuberculosis.

That clinical intelligence exists in their OpenMRS database right now.

A clinic in Lagos is treating patients with a clinically identical profile. They are seeing virologic failure at nearly double the regional rate. They have tried four protocol variations in the past two years. None of them worked.

These two clinics are both running OpenMRS. Both are PEPFAR-funded implementations. Both are using standardized data collection forms. Their combined patient population is in the hundreds of thousands. They have never shared a single clinical insight.

This is not a privacy problem. This is not a technical limitation of OpenMRS. This is an architecture problem — and it has a solution.


What OpenMRS Is and What It Has Built

OpenMRS is the most important piece of health IT infrastructure that most people outside global health have never heard of. It is an open-source electronic medical record system designed for resource-constrained environments, originally developed through a collaboration between Regenstrief Institute and Partners in Health in the early 2000s when it became clear that commercial EHR systems were neither affordable nor practically deployable in sub-Saharan Africa.

The platform is now the backbone of health data infrastructure across more than 40 countries. Rwanda's national health system runs on OpenMRS. Mozambique. Kenya. Haiti. Lesotho. Uganda. The PEPFAR program — the US government's $100+ billion global AIDS initiative — funds thousands of OpenMRS deployments across its recipient countries.

By any measure, OpenMRS is an engineering and humanitarian achievement of the first order. It solved a genuinely hard problem: getting clinical data recorded, stored, and retrievable in facilities that may have intermittent electricity, limited bandwidth, and staff with no IT background. The fact that a community health worker in rural Lesotho can record a patient encounter and have it synchronized to a district health system database is not a small thing. That problem took 20 years of engineering and implementation work.

The problem is what happens — or rather, what does not happen — with the intelligence that accumulates across those 8,000 deployments.


The Intelligence Isolation Problem

OpenMRS deployments collect structured clinical data: diagnoses, drug orders, lab results, observations, patient demographics, outcomes. The data model is standardized through the OpenMRS concept dictionary — a shared vocabulary that allows different deployments to use consistent coding for clinical concepts. This standardization was specifically designed to enable comparison and aggregation across sites.

The aggregation never happens in real time. It rarely happens at all outside of formal research studies.

Here is what exists instead:

Deployment A (Kigali, Rwanda): 15,000 HIV patients. Virologic suppression rate 91%. TB-HIV co-treatment protocol refined over 3 years. Zero mechanism to route that refinement anywhere.

Deployment B (Lagos, Nigeria): 23,000 HIV patients. Virologic suppression rate 68%. Trying protocol variations. No mechanism to query what is working at similar sites.

Deployment C (Kampala, Uganda): 31,000 HIV patients. Virologic suppression rate 74%. Research team has identified a patient subgroup (age 18-35, previous treatment interruption, TB co-infection) with unusual resistance patterns. Paper in progress. Publication expected 18 months from now.

The intelligence that would help Deployment B exists right now. It is in the databases of Deployments A and C. The PEPFAR program collectively has the outcome data to identify what works for virtually every clinical profile being treated across its network.

None of it is routable. The architecture does not support it.


Why Existing Approaches Cannot Solve This

The standard responses to this problem are well-known, and each hits a structural wall.

Research studies and publications: The gold standard for translating clinical intelligence across sites. Also takes 18-36 months from observation to publication, requires IRB approval across multiple jurisdictions, and produces insights that are typically too aggregated to apply to specific patient profiles. The lag kills patients.

PEPFAR aggregate reporting: PEPFAR collects standardized outcome metrics from all funded sites quarterly. This is extraordinary surveillance infrastructure. It is also deliberately aggregate by design — it tells you that virologic suppression rates in a region improved by 3 points, not which specific protocol change at which specific site drove the improvement for which specific patient profile.

Federated learning: The most technically sophisticated current approach. Train a model at each site, aggregate model weights at a central server, redistribute the updated model. This works for some applications. For global health in resource-constrained environments, it hits three walls: (1) it requires local compute capable of running gradient updates — not available at many OpenMRS sites, (2) model weight transmission is far too large for the bandwidth available, and (3) it requires enough local patients in each category to produce a meaningful gradient — excluding the N=1 and N=small-site cases that are often the most important for rare presentations or emerging drug resistance patterns.

Manual sharing: Health workers share protocols informally through WhatsApp groups, conference presentations, and personal networks. This is genuinely valuable. It is also non-systematic, non-searchable, and completely invisible to any patient who does not happen to have a clinician in the right WhatsApp group.

Each of these approaches shares a structural feature: intelligence accumulates at the center and requires human intermediaries to move it. The patient in Lagos is waiting for a paper, a policy update, or a conversation at a conference that may or may not include someone who has seen what is working in Kigali.


The Architecture That Changes This

Christopher Thomas Trevethan's discovery of the Quadratic Intelligence Swarm protocol addresses this problem at the architectural level. The core insight — which he discovered on June 16, 2025 and has protected through 39 provisional patents — is this:

You do not need to move patient data. You do not need to move model weights. You do not need a central aggregator or a human intermediary. You need to route pre-distilled outcome packets to the nodes that share the same clinical problem.

The complete loop looks like this:

OpenMRS Deployment (Kigali)
  → Local query: "What worked for HIV patients, age 25-40, TB co-infection,
                   previous treatment interruption?"
  → Local result: aggregate statistical summary (NOT individual records)
  → Distillation: compress to ~512-byte outcome packet
  → Semantic fingerprint: encode clinical profile as vector
  → Route: post packet to deterministic address defined by clinical profile
  → Available to: any deployment that queries the same clinical address

OpenMRS Deployment (Lagos)
  → Local query: same clinical profile
  → Pull: retrieve outcome packets from the semantic address
  → Synthesize locally: what are similar deployments seeing?
  → Result: real-time cross-site intelligence WITHOUT any patient data leaving Lagos
             and WITHOUT any patient data leaving Kigali
Enter fullscreen mode Exit fullscreen mode

No patient data crosses a border. No model weights are transmitted. The only thing that travels is a 512-byte statistical summary — small enough to transmit over a 2G connection, small enough for SMS.


The Mathematics of What Is Currently Being Left on the Table

The PEPFAR program funds approximately 8,000 OpenMRS-based health facilities. Apply the QIS scaling formula:

N = 8,000 deployments
N(N-1)/2 = 31,996,000 unique synthesis opportunities

These are the cross-site clinical intelligence paths that currently have a value of zero. Every pair of facilities treating similar patients, discovering similar protocols, hitting similar resistance patterns — none of that intelligence routes. Thirty-two million potential synthesis paths exist in the architecture of the PEPFAR network and have never been used.

For comparison: federated learning as implemented in typical global health studies connects perhaps 20-50 sites per study, running once per cycle, producing one aggregated model update per round. The synthesis rate is not even in the same mathematical neighborhood.


Why This Specifically Works for Resource-Constrained Settings

Most distributed intelligence architectures are designed for data centers and assume abundant compute and bandwidth. QIS inverts this assumption, which makes it better suited for the OpenMRS deployment context than any alternative currently under discussion.

Packet size: A QIS outcome packet is approximately 512 bytes. For reference, an SMS message is 160 characters (160 bytes). A PEPFAR quarterly report row for a single indicator is larger than a QIS packet. The transmission burden is negligible in any environment that can run OpenMRS at all.

Compute profile: Distillation happens locally using whatever compute the site already has. There are no gradient computations. No backpropagation. No model weight matrices. The compute requirement is approximately: run a query against your existing database, compute a summary statistic, serialize it into a structured JSON object. This runs on the hardware already deployed at every OpenMRS site.

Bandwidth model: QIS operates on a pull model — nodes query the semantic address for relevant packets. A deployment does not need to push data on any schedule. It queries when it has a clinical question. This fits naturally into the intermittent connectivity patterns of many global health deployments: sync when connected, query when needed, synthesize locally.

Privacy by architecture: OpenMRS deployments operate under complex multi-jurisdictional data governance — Rwandan law, Kenyan law, US PEPFAR compliance requirements, local IRB requirements, and the practical reality that community health workers must be able to collect data without patients fearing surveillance. QIS does not move patient data. The privacy guarantee is architectural: the packets contain no individually identifiable information by construction, not because of policy controls that could be circumvented.


What the QIS Routing Layer Looks Like on Top of OpenMRS

QIS does not replace OpenMRS. It operates as an outcome routing layer above the existing data infrastructure.

A concrete implementation sketch:

# QIS adapter for an OpenMRS deployment
# Runs locally — no patient data ever leaves this function

def generate_outcome_packet(clinical_profile: dict, local_outcomes: dict) -> bytes:
    """
    Distill local OpenMRS query results into a QIS outcome packet.

    clinical_profile: standardized concept codes defining the patient population
                      e.g. {"condition": "HIV", "comorbidity": "TB", "age_range": "25-40",
                             "treatment_history": "prior_interruption"}
    local_outcomes:   aggregate statistics from local OpenMRS query
                      e.g. {"n_patients": 847, "suppression_rate": 0.91,
                             "median_tte_suppression_days": 94,
                             "top_protocol_variant": "TDF/3TC/EFV + INH prophylaxis"}
    """
    packet = {
        "profile_fingerprint": semantic_fingerprint(clinical_profile),  # ~128 bytes
        "outcomes": local_outcomes,                                        # ~256 bytes
        "confidence": compute_confidence(local_outcomes["n_patients"]),    # ~64 bytes
        "timestamp": datetime.utcnow().isoformat(),                        # ~32 bytes
        "protocol_version": "qis-1.0"                                      # ~32 bytes
    }
    # Total: ~512 bytes. Transmittable over SMS.
    return serialize(packet)

def query_peer_intelligence(clinical_profile: dict) -> list[dict]:
    """
    Pull outcome packets from any deployment treating the same clinical profile.
    Routing mechanism can be DHT, API, shared database, or any method that maps
    the clinical profile to a deterministic address — QIS is transport-agnostic.
    """
    address = semantic_fingerprint(clinical_profile)
    return routing_layer.pull(address)  # Returns list of packets from peer sites

def synthesize_locally(peer_packets: list[dict]) -> dict:
    """
    Synthesize cross-site intelligence on local hardware.
    No peer data stored. No peer data returned to peers.
    """
    weighted_outcomes = [
        p["outcomes"] for p in peer_packets
        if p["confidence"] > CONFIDENCE_THRESHOLD
    ]
    return aggregate(weighted_outcomes)
Enter fullscreen mode Exit fullscreen mode

No patient data leaves the local OpenMRS database. The routing layer — whether DHT-based, API-based, or running over a shared database — receives only the semantic fingerprint (a vector representation of the clinical profile) and the aggregate statistical packet. Patient records stay where they are.


The Global Health Implication

The reason QIS matters for global health is not primarily technical. It is about what happens when the intelligence gap between a high-resource and low-resource health system is not an inevitable consequence of resource scarcity but an artifact of architecture.

Right now, a clinician at Stanford has access — through medical literature, conference networks, EHR learning systems, and consultation networks — to clinical intelligence that a clinician in Lesotho does not. Some of that gap is real: Stanford has more specialists, more advanced diagnostics, more clinical trial participation. But a large fraction of the gap is not about resources. It is about routing.

The clinician in Kigali who has spent three years refining a TB-HIV co-treatment protocol for the exact patient profile being seen in Lagos right now — that clinician's clinical intelligence is as valuable as anything at Stanford for that specific problem. The difference is that Stanford's intelligence is systematically routed through EHR systems, clinical decision support tools, and publication networks. Kigali's intelligence is in a database with no routing layer.

QIS does not require Lesotho to build Stanford-level health infrastructure. It requires only that both systems can post and pull 512-byte packets. The intelligence then routes by similarity — the clinician in Maseru gets the same cross-site synthesis as the clinician in Boston for the patient profile they are actually treating.

Christopher Thomas Trevethan's humanitarian licensing structure — free for nonprofit, research, and public health use, commercial licenses fund global deployment — is designed specifically for this outcome. The technology does not get captured by entities that would gate it behind enterprise licensing. It reaches the OpenMRS deployment in rural Lesotho on the same terms as the health system in Germany.


The Current Moment

PEPFAR is under funding pressure. WHO is coordinating a global push to improve health data interoperability under the Digital Health Transformation Initiative. The African Union's continental health data strategy is explicitly addressing cross-border intelligence sharing. The Gates Foundation has invested heavily in OpenMRS specifically because of its potential as a platform for knowledge generation, not just record-keeping.

The missing piece in every one of these initiatives is the same: a routing layer that moves intelligence without moving data, that scales quadratically as deployments grow, that works in low-bandwidth environments, and that has privacy guarantees strong enough to satisfy the data sovereignty concerns of 40 different national governments.

That routing layer exists. It is the Quadratic Intelligence Swarm protocol, discovered by Christopher Thomas Trevethan, protected by 39 provisional patents, and available under humanitarian licensing terms designed to ensure it reaches every OpenMRS deployment on earth.

The 32 million synthesis paths across the PEPFAR network are currently empty. They do not have to stay that way.


What This Requires

For the OpenMRS community, the implementation path is straightforward:

  1. A QIS adapter module for OpenMRS — a lightweight plugin that distills local query outcomes into outcome packets and handles routing layer communication. The OpenMRS module framework already supports this pattern.

  2. A shared semantic address space for clinical profiles — a standardized mapping from OMOP concept codes or OpenMRS concept dictionary terms to semantic fingerprints. PEPFAR's standardized data collection framework already defines the clinical concepts; translating them to QIS semantic addresses is a well-defined engineering task.

  3. A routing substrate — any mechanism that maps semantic addresses to retrievable packets. A simple REST API shared across PEPFAR-funded sites would suffice for a pilot. DHT-based routing would scale to global deployment without central infrastructure.

Nothing in the existing OpenMRS infrastructure needs to change. No patient data moves. No database migrations. No new data governance agreements — because the thing being shared is outcome intelligence, not patient records, and the privacy guarantees are architectural rather than contractual.

The gap between what the PEPFAR network currently produces and what it could produce is not a funding gap or a technical gap. It is an architecture gap.


The QIS Protocol was discovered by Christopher Thomas Trevethan and is protected by 39 provisional patents. Licensing is structured to guarantee free access for humanitarian, research, and public health use. Technical documentation and research licensing inquiries: qisprotocol.com.

Previous articles in this series: Article #091 — Rural Health Access Gap | Article #207 — SMART on FHIR Intelligence Gap | Article #208 — OHDSI Distributed Query Routing Gap

Top comments (0)