LOINC and the Challenge of Clinical Data in Nigeria

In the Nigerian clinical space, something as simple as "blood sugar" is not actually simple.
Depending on the hospital, lab, analyser, and available equipment, "blood sugar" could refer to:
- Fasting Blood Glucose
- Random Blood Glucose
- HbA1c
- Other glucose-related measurements
Each of these may be recorded differently:
- "FBS"
- "fasting sugar"
- "glucose (fasting)"
- "RBS"
To a human, these might seem interchangeable.
To a system, they are completely different.
This inconsistency creates a serious problem:
Clinical data becomes fragmented, difficult to aggregate, and unreliable for research.
Raw text alone cannot solve this.
Different labs, machines, and technicians will always describe the same observation in different ways.
What’s needed is a standard, universal vocabulary.
What is LOINC, and Why Does It Matter?
LOINC is a global standard for identifying laboratory tests and clinical observations.
Instead of relying on names, LOINC assigns each investigation:
- A unique code
- A structured definition (what is measured, how, and from what specimen)
This allows systems to:
- Speak the same language
- Exchange clinical data reliably
- Aggregate results across hospitals and time
In simple terms:
LOINC turns "what the test is called" into "what the test actually means."
The Reality: Why LOINC Isn’t Widely Used (Yet)
If LOINC is so useful, why isn’t it everywhere?
In practice, adoption across Nigeria and much of Africa is limited.
Common challenges include:
- Size and complexity: The LOINC database is large and highly detailed
- Frequent updates: New versions are released regularly
- Integration difficulty: Many EMRs are not designed to handle structured standards
- Local variation: Real-world hospital workflows don’t always map cleanly to global definitions
So while LOINC is powerful, it is not always easy to implement directly.
The Reality: Why LOINC Isn’t Widely Used (Yet)
If LOINC is so useful, why isn’t it everywhere?
In practice, adoption across Nigeria and much of Africa is limited.
Common challenges include:
- Size and complexity: The LOINC database is large and highly detailed
- Frequent updates: New versions are released regularly
- Integration difficulty: Many EMRs are not designed to handle structured standards
- Local variation: Real-world hospital workflows don’t always map cleanly to global definitions
So while LOINC is powerful, it is not always easy to implement directly.
Our Approach: The CRH Canonical Dataset
Rather than replacing LOINC, we built on top of it.
The CRH Canonical Investigations Dataset:
https://github.com/Janus-sama/crh_dataset/blob/main/canonical_investigations/investigations.csv
This dataset maps:
- Real-world investigation names used in Nigerian hospitals
→ to - Their corresponding LOINC codes
But we go a step further by introducing structure.
Each investigation is organized into:
- A Canonical Investigation (e.g. "Blood Glucos" or "Six Minute Walk Test")
- Multiple Investigation Atoms (specific measurable components)
- Each atom mapped to a precise LOINC code
This creates a system that is:
- Flexible for clinicians during data entry
- Structured and consistent for storage and analysis
Clinicians can work naturally, while the system maintains standardization underneath.
This dataset is not theoretical it is actively used within Tembo EMR in production.
How the CRH Dataset Works in Practice
To make this more concrete, consider the Six Minute Walk Test, a common functional assessment.
In many systems, this might be recorded as a single entry:
"6MWT: completed"
But in reality, the test consists of multiple measurable components:
- Distance walked
- Heart rate before the test
- Heart rate during the test
- Oxygen saturation
In the CRH dataset, this is represented as a structured set of “atoms,” each mapped to a LOINC code:
| LOINC Code | Atom Name | Canonical Investigation | Unit | Type | Required |
|---|---|---|---|---|---|
| 64098-7 | Six minute walk distance | Six Minute Walk Test | m/(6.min) | numeric | TRUE |
| 8889-8 | Heart rate by Pulse oximetry - Pre-test | Six Minute Walk Test | b/m | numeric | TRUE |
| 59408-5 | Oxygen saturation (Pre-test) | Six Minute Walk Test | % | numeric | TRUE |
| 8889-8 | Heart rate by Pulse oximetry - Minute 1 | Six Minute Walk Test | b/m | numeric | TRUE |
Instead of storing a single vague result, we capture:
- Multiple structured measurements
- Each with a precise meaning
- All linked to a single clinical investigation
This ensures:
- Consistency across hospitals
- Completeness through required fields
- Queryability for analytics and research
From Tables to Graphs: Why Structure Matters
Traditional databases store data in flat tables.
That works for storage, but struggles with relationships.
For example:
- How do you group all blood pressure-related tests?
- How do you link different variants of the same investigation?
- How do you aggregate across related observations?
To solve this, we model the dataset as a Directed Acyclic Graph (DAG).

In this structure:
- Nodes represent canonical investigations and their atoms
- Edges represent relationships (e.g. "is part of", "is a variant of")
This allows us to treat clinical data as a connected system, not isolated entries.
For example:
A "Six Minute Walk Test" node connects to all its measurement atoms, enabling traversal from the concept to every recorded data point.
Efficient Retrieval for Real Clinical Questions
Consider a practical question:
“What is the average blood pressure for patients diagnosed with hypertension?”
Answering this requires more than a simple query.
We need to:
- Identify all blood pressure-related investigations
- Include both systolic and diastolic variants
- Aggregate results across patients and time
Using the graph structure:
- We traverse related nodes (e.g. all blood pressure variants)
- We use recursive queries (CTEs) to navigate relationships
- We rely on indexed mappings for fast lookups
The result:
Accurate aggregation, even as datasets grow large and complex.
Why This Matters
Standardization is a necessary technical improvement to change what is possible.
With structured clinical data:
- Hospitals can analyze outcomes more reliably
- Researchers can work with cleaner datasets
- Systems can scale without losing consistency
Without it:
Data remains siloed, inconsistent, and difficult to use beyond its original context.
Closing Thought
LOINC provides the foundation for interoperable clinical data, but on its own, it is not enough.
By localizing and structuring LOINC through the CRH Canonical Dataset, and deploying it within Tembo EMR, we bridge the gap between:
- Global standards
- And real-world clinical practice in Africa
The goal is simple:
Make clinical data usable, not just collectible.



Comments