How to Analyze Your Medical Records with AI — Without Sending Them to the Cloud
Your lab results, EOBs, imaging reports, and discharge summaries contain some of the most sensitive data you own. When you upload them to ChatGPT, Claude.ai, or Google Gemini to ask "what does this mean?" — you're handing your complete health picture to a corporation with opaque data retention policies and a business model built on data.
There's a better way. Local AI models can now answer complex questions about your medical records with surprisingly good accuracy — running entirely on your own machine, with zero data transmitted anywhere.
This guide shows you exactly how to set it up in about 30 minutes.
Why Medical Records Are Different From Other Sensitive Files
Most people treat health data like regular files. It's not. Medical records sit in a special threat category:
- Data brokers actively buy and sell health data to insurers, employers, and marketers
- Identity thieves prize stolen medical records — worth 10x a stolen credit card on the dark web
- Insurance underwriters have started using AI pattern-matching on disclosed health histories
When you paste a lab result into ChatGPT, OpenAI's terms allow that data to be used for model training unless you've manually opted out — and even with opt-out enabled, the data still transits their servers. HIPAA protects healthcare providers from sharing your records without consent. It doesn't apply to AI companies.
Local AI is the only stack where your health data genuinely stays on your machine.
What You'll Need
Hardware: Any Mac (M1/M2/M3 is ideal), a Windows PC with 16GB+ RAM, or a Linux machine. You don't need a dedicated GPU for medical text analysis — Llama 3.1 8B runs comfortably on CPU for reading and summarizing documents.
Software (all free, all open-source):
- Ollama — local model runner
- Open WebUI — browser-based chat interface that connects to Ollama
- A PDF-to-text tool (Preview on macOS, or
pdftotexton any platform)
Encrypted storage: Covered in Step 5. Don't skip it.
Step 1: Install Ollama
Ollama handles the heavy lifting of downloading, running, and managing local LLMs. One command installs it:
macOS / Linux:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
Windows: Download the installer at ollama.com. It runs as a background service.
Once installed, pull a capable model. For medical documents, Llama 3.1 8B hits the right balance of speed and comprehension on most hardware:
```bash
ollama pull llama3.1:8b
```
If you have 32GB+ RAM or an M2 Pro / M3 Mac, the 70B model gives meaningfully better analysis on complex clinical language:
```bash
ollama pull llama3.1:70b
```
Verify it's running:
```bash
ollama list
```
Step 2: Add Open WebUI for a Usable Interface
The command line works, but a browser-based interface makes it practical to paste long documents and carry on multi-turn conversations. Open WebUI is a self-hosted ChatGPT-style front end that connects directly to your local Ollama instance:
```bash
docker run -d -p 3000:8080 \
-v open-webui:/app/backend/data \
--add-host=host.docker.internal:host-gateway \
ghcr.io/open-webui/open-webui:main
```
Open http://localhost:3000 in your browser. Create a local account (this is local-only, no signup sent anywhere), select your Llama model, and you're ready.
No Docker? Install via pip: pip install open-webui && open-webui serve
Critical: Open WebUI defaults to listening on localhost only. Don't expose port 3000 to your network or the internet — this is the one configuration mistake that would undermine your privacy setup.
Step 3: Extract Text From Your Records
Medical PDFs fall into two categories:
Searchable PDFs (most records from 2015 onward): You can copy-paste directly, or extract all text at once:
```bash
pdftotext your-lab-results.pdf output.txt
```
Install pdftotext via brew install poppler on macOS or apt install poppler-utils on Debian/Ubuntu.
Scanned PDFs (older records, paper-based imaging reports): These are images, not text. On macOS, open the PDF in Preview — the Live Text feature can select and copy scanned text in most cases. On Linux, tesseract-ocr is the standard OCR tool:
```bash
tesseract input.pdf output txt
```
Keep all extracted files in one dedicated folder while you work. You'll encrypt this folder in Step 5.
Step 4: Run Your Analysis
In Open WebUI, start a new conversation, paste your extracted text, and be specific with your prompts. Vague questions get vague answers.
For lab results:
> "Here are my blood lab results. For each value outside the reference range, explain in plain language what it measures, what an out-of-range reading typically indicates, and what follow-up questions I should ask my doctor."
For insurance EOBs:
> "This is an Explanation of Benefits. Identify any charges that look unusually high compared to typical costs, any services that were denied, any billing codes worth questioning, and what I should follow up on with my insurer or provider."
For discharge summaries:
> "Summarize this hospital discharge summary in plain language. List every diagnosis mentioned, all medications prescribed with their purposes, and every follow-up instruction."
For imaging reports (MRI, X-ray, CT):
> "Translate the clinical language in this radiology report into plain English. Flag any findings described as abnormal, uncertain, or requiring follow-up."
The model processes only what you paste into that conversation — nothing persists to an external server between sessions. If you close Open WebUI and reopen it, conversation history is stored locally in Docker's named volume only.
Important disclaimer: Local AI is a tool for comprehension, not diagnosis. Use these insights to ask better questions in your next appointment — not to self-treat or skip medical care.
Step 5: Secure Your Health Data Vault
You now have a folder of sensitive medical records. Leaving it as plain files on a laptop is not acceptable — laptops get lost, stolen, and imaged.
Local encryption: On macOS, create an encrypted disk image via Disk Utility (File → New Image → Blank Image → AES-256 encryption). Mount it when you need access, eject it when you don't. On Windows, use BitLocker (built in) or VeraCrypt (open-source, cross-platform). On Linux, LUKS encrypted volumes via cryptsetup are the standard.
Encrypted cloud backup: If you want an off-site backup — and medical records are exactly the kind of data where you do — use a zero-knowledge encrypted service. Tresorit is the strongest option for health data specifically: your files are encrypted on your device before upload, and Tresorit's servers never hold the decryption keys. Even under a legal request, they cannot hand over readable records.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
Use Perplexity to research medical terminology, understand diagnoses at a population level, and prepare questions for your doctor. Use your local model to process records that contain your name, DOB, insurance ID, and actual test values. Keep those two workflows explicitly separate — that separation is most of your privacy protection.
Common Mistakes That Undermine This Setup
Pasting records into any cloud AI tool. Even with privacy settings configured, your data transits their infrastructure. The entire value of local AI is that it doesn't.
Organizing records in Google Docs or Notion. Both platforms scan content for their own purposes. Your health data folder should exist only in your encrypted local storage and your encrypted backup service.
Skipping the encryption step. Plain-text medical records in a folder called health-records on a stolen MacBook is a serious, reportable data breach — even if you're the only victim.
Forgetting to update your models. Ollama makes this a single command. Newer models consistently outperform older ones on medical text comprehension:
```bash
ollama pull llama3.1:8b
```
Exposing Open WebUI beyond localhost. If you put it behind a public URL without authentication, you've effectively given anyone your analysis tool — and potentially your conversation history.
Setup Checklist
Run through this before your first session:
- [ ]
ollama listreturns your model without errors - [ ] Open WebUI is accessible at
http://localhost:3000only - [ ] Records are stored in an AES-256 encrypted disk image or VeraCrypt volume
- [ ] Cloud backup, if configured, uses Tresorit or Proton Drive (zero-knowledge)
- [ ] No health records exist as plain files in your Downloads, Desktop, or Documents folder
- [ ] You have a separate Perplexity Pro session for general medical research queries
- [ ] Open WebUI's Docker container is not mapped to a public network interface
The Bigger Picture
Health data is one of the last categories of deeply personal information that most people haven't thought to protect. Corporate AI tools have made it very easy to just paste and ask — and the habit forms before anyone thinks about where that data goes.
The tools in this guide are free, open-source, and purpose-built for exactly this problem. Thirty minutes of setup gives you a workflow you can trust with your most sensitive records for years.
Last updated: 2026-06-27
Get weekly breakdowns of local AI setups, encrypted storage tools, and data sovereignty guides — written for people who actually read the privacy policy. Join 12,000+ privacy-conscious tech workers who get the PrivateAI newsletter every Thursday. No tracking pixels. No third-party analytics.