TrueTrend: Making Medical Reports Understandable, Traceable, and Private with Open AI
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.
🔗 Explore the product: TrueTrend
💻 Source code: GitHub Repository
The Problem: Medical Reports Contain Data. Patients Need Understanding.
Every medical test generates information. Yet for millions of patients, understanding that information remains unnecessarily difficult.
Laboratory reports are often distributed as PDFs containing clinical terminology, abbreviations, numerical measurements, and reference ranges. Understanding an individual result can be challenging. Understanding how that result has changed over months or years is even harder.
Consider a patient managing a chronic condition such as Type 2 diabetes.
Their HbA1c results may be distributed across multiple reports, generated by different laboratories, using different layouts and sometimes different units. The patient must manually locate previous results, compare values, interpret changes, and determine what questions to raise during their next consultation.
The information exists. What is missing is a reliable, accessible way to connect it.
TrueTrend addresses this gap by transforming disconnected laboratory reports into a longitudinal, understandable, and verifiable health record.
Introducing TrueTrend
TrueTrend is a privacy-first, AI-powered medical report intelligence platform designed to help individuals understand their laboratory results and track changes over time.
Built around the principle of आरोग्य वही — a personal health notebook — TrueTrend brings medical reports together into a single interface where patients can explore trends, understand measurements, and access explanations in their preferred language.
Rather than functioning as another generic AI health chatbot, TrueTrend focuses on three fundamental requirements:
- Continuity: Connect laboratory results across reports and time.
- Trust: Ensure that displayed values can be traced to their original source.
- Accessibility: Make health information understandable through multilingual explanations and local voice assistance.
What TrueTrend Enables
1. A Unified Health Record
Import laboratory reports from different dates and providers into one personal health notebook.
TrueTrend organizes supported test results chronologically, allowing users to review their medical history without manually navigating multiple PDF attachments.
2. Longitudinal Health Tracking
View individual biomarkers across multiple tests through interactive charts.
For example, a patient's HbA1c history can be displayed as a continuous trend, even when the measurements originate from different laboratories.
Where conversion is supported, units are standardized to enable meaningful comparison.
Clinically Informed Change Detection
A numerical difference does not necessarily indicate a meaningful health change.
TrueTrend evaluates supported measurements against documented analytical variation thresholds and distinguishes between:
- Real Increase: A change exceeding the applicable variation threshold.
- Normal Variation: A difference within the expected variation range.
- Not Compared: A reliable comparison cannot be established.
When laboratory methods, units, or available evidence do not support a dependable comparison, the platform avoids presenting an unsupported conclusion.
Multilingual Voice Assistance
TrueTrend provides concise explanations in English and Marathi, including locally generated Marathi speech.
Users can ask questions such as:
माझी साखर वाढली आहे का?
Has my blood sugar increased?
The application responds using the patient's recorded results and identifies the relevant measurements and dates.
This makes the platform more accessible to users who are less comfortable interpreting medical terminology or reading lengthy reports.
Our Core Differentiator: Every Number Must Be Verifiable
In healthcare applications, a confident but incorrect answer is not merely a technical defect. It can undermine user trust and lead to misunderstanding.
TrueTrend is built around a strict design principle:
The AI must never present a numerical medical result that cannot be verified against its original source.
Language models are useful for interpreting documents and understanding questions, but they can occasionally misread values, confuse table columns, or generate information that was never present in the source.
TrueTrend separates AI interpretation from numerical verification.
How the verification architecture works
- The AI identifies candidate test names, values, dates, and units from the report.
- The application independently extracts the underlying PDF text and document structure.
- Each proposed result is checked against the source, including its associated test name and unit.
- Unverified values are flagged for human review.
- Only verified values are eligible for charts, spoken responses, and trend analysis.
Users can select a plotted result and navigate directly to the corresponding page of the original report, where the source value is highlighted.
This creates a transparent relationship between the original medical document and the information presented by the application.
Initial Verification Results
In our current sample evaluation:
- 34 of 34 extracted values were confirmed against their source documents.
- Eight deliberately introduced incorrect values were detected.
- The application includes 603 automated tests, with no network access required by the test suite.
These are initial engineering validation results, not clinical validation or a guarantee of accuracy across all laboratory formats.
Beyond Comparison: Distinguishing Meaningful Change from Measurement Noise
One of the central challenges in longitudinal health tracking is determining whether a difference between two measurements is meaningful.
Biological variation, laboratory measurement uncertainty, and testing conditions can cause values to fluctuate even when a patient's underlying condition has not materially changed.
A system that treats every numerical movement as a meaningful trend risks producing unnecessary concern and gradually eroding user confidence.
TrueTrend incorporates documented variation thresholds for supported tests and adopts a conservative comparison strategy.
Every supported threshold is linked to its research source within the codebase. When adequate evidence is unavailable, the application declines to classify the change.
The objective is not to generate more alerts. It is to provide fewer, more defensible interpretations.
Privacy by Architecture, Not Just Policy
Medical records are among the most sensitive categories of personal information.
Traditional cloud-based AI workflows can require users to transmit documents to external servers for processing. TrueTrend takes a different approach.
The application is designed to run locally on the user's computer.
Its open-weight AI model, Google Gemma 4, runs through Ollama. Report processing, storage, and analysis take place on the local machine.
This architecture provides:
- No mandatory cloud account.
- No external medical-report upload.
- Local processing and storage.
- Offline operation after the required model and voice assets have been installed.
Privacy is therefore not dependent solely on a promise in a policy document. It is supported by the system's architecture.
The application does not require users to surrender control of their medical documents to access its core functionality.
Product Demonstration
🔗 Product website: https://dnyaneshu.github.io/TrueTrend/
The product page provides screenshots, an overview of the workflow, and the underlying implementation.
Run TrueTrend Locally
The repository includes four synthetic sample reports representing multiple laboratories and document layouts. These allow users and reviewers to explore the application without uploading real patient information.
git clone https://github.com/DnyaneshU/TrueTrend
cd TrueTrend
pip install -e ".[voice]"
ollama pull gemma4:e4b
truetrend-voice install
truetrend-serve
Open:
http://127.0.0.1:8000
Create a local account and import the sample PDFs from the samples/ directory.
Processing time is approximately 30 seconds per page on the tested setup, subject to hardware and document complexity.
Why We Do Not Offer a Hosted Medical-Report Demo
A conventional hosted demonstration would require users to upload medical documents to an externally managed server.
That would conflict with one of TrueTrend's central product commitments.
Instead, we provide a product walkthrough and a reproducible local installation. This allows users to evaluate the application while keeping their medical information under their own control.
Technology and Architecture
TrueTrend combines open-weight AI with deterministic document-processing and verification components.
| Technology | Role |
|---|---|
| Google Gemma 4 via Ollama | Document interpretation and question understanding |
| Piper | Local Marathi text-to-speech |
| PyMuPDF | PDF text extraction, source verification, and value highlighting |
| FastAPI | Application backend and API |
| HTML, CSS, JavaScript | Lightweight frontend |
The implementation deliberately avoids a frontend build pipeline, keeping the application straightforward to install and inspect.
An Engineering Challenge: Understanding Laboratory Tables
The most difficult part of the implementation was not simply extracting text from a PDF. It was preserving the relationship between values and their corresponding test names.
PDF documents often represent tables as positioned text rather than structured rows and columns.
For example, a test named Vitamin D, 25 Hydroxy may contain the number 25 as part of the test name itself.
A naïve line-by-line extraction process can confuse that number with the actual result.
TrueTrend therefore reconstructs document content into table-like structures before attempting verification.
This structural processing is essential to maintaining the reliability of the numerical verification layer.
Why We Constrained AI-Generated Explanations
During development, unrestricted AI rewriting of Marathi explanations introduced risks such as changing numerical associations, adding unsupported qualifiers, or reversing the intended direction of a statement.
The generative rewriting feature was removed.
TrueTrend instead uses controlled, data-grounded sentence generation for its core health summaries.
The design prioritizes factual consistency over conversational fluency.
Why Open Innovation Matters
Open innovation is particularly important when developing AI products for sensitive domains.
For TrueTrend, open-weight models and inspectable software provide four essential advantages.
1. Data Sovereignty
Users can process sensitive health documents locally without requiring an external AI service to receive their reports.
2. Inspectability
Developers can examine the complete pipeline between document extraction, AI interpretation, verification, and user-facing output.
3. Auditable Reasoning
Clinical variation thresholds are linked to their research sources, allowing reviewers to inspect the basis for supported comparisons.
4. Accessibility Without Continuous Connectivity
Once the required components are installed, the core application can operate without an internet connection.
Open AI is not merely a cost-saving decision for TrueTrend. It enables a product architecture built around privacy, transparency, and user control.
Responsible Use and Current Limitations
TrueTrend is designed as a medical information organization and interpretation aid, not a diagnostic system or replacement for professional medical advice.
Its current scope includes:
- Support for 15 common laboratory tests.
- Comparison against the laboratory's own printed reference range.
- Supported longitudinal trend analysis.
- Conservative change classification.
- English and Marathi explanations.
Unsupported tests are excluded rather than interpreted through assumptions.
Photographs and scanned reports require additional human verification because the source-text verification process cannot establish the same level of certainty as supported text-based PDFs.
Users should consult qualified healthcare professionals for diagnosis, treatment decisions, and interpretation of clinically significant results.
The Vision
Medical information should not become less accessible simply because it is distributed across different laboratories, technical formats, languages, or digital platforms.
TrueTrend is an effort to make personal health records more understandable without compromising the accuracy, privacy, and traceability that sensitive information demands.
Our long-term direction is to make trustworthy, local-first health intelligence accessible to individuals who need it most, particularly those managing long-term conditions and navigating medical information across language barriers.
TrueTrend: Your health history, connected. Your information, in your control.
Project and Open-Source Links
- Product: https://dnyaneshu.github.io/TrueTrend/
- GitHub: https://github.com/DnyaneshU/TrueTrend
- Challenge: Hacktoberfest Weekend Challenge — Build for a Friend
We welcome feedback, technical review, and contributions from developers, healthcare professionals, and accessibility advocates interested in building more trustworthy open-source health technology.
Top comments (1)
Live fornow, if you'd like to try it: any-component-hash-intent.trycloud...
Sign in with dnyanesh / liquorice-tractor-92. It's loaded with the four synthetic
sample reports, so there's no real data in there.
One thing worth saying up front, since it's the first question people usually ask:
there's no hosted demo link, and that's deliberate.
Gemma 4 needs about 6 GB of RAM and a GPU, so it won't run on anything I could
reasonably host for free. But the real reason is simpler — a hosted demo means
strangers uploading medical reports to a server I control, which is exactly what this
is built to avoid. I didn't want to break the promise in order to advertise it.
So instead:
📸 Project page with screenshots of every screen — dnyaneshu.github.io/TrueTrend/
💻 Repo, runs in about five minutes if you have Ollama — github.com/DnyaneshU/TrueTrend
Four synthetic sample reports are included (three labs, three different layouts, one
invented family), so you can try the whole thing without anyone's real data.
The part I'd most like picked apart is the verification rule — specifically that a
value only counts as verified if it ends its cell in the table. That one constraint
catches most of what an LLM gets wrong on a lab report; it's what stops
"Vitamin D, 25 Hydroxy | 150.00" being read as 25. But it meant reconstructing table
structure from raw PDF coordinates first, which took longer than the AI integration did.
If anyone's solved lab-report table extraction more elegantly, I'd genuinely like to
hear it. verify.py and pages.py are where that lives.