Bates-Cited Search for 10,000-Page Medical Record Productions

By John Mahoney | May 2026 | 7 min read

Verify it yourself — free, no login

See how AI medical-record review links every fact to the exact Bates page that proves it — click any citation and jump straight to the record.

See the 60-second demo →

You opened a 10,750-page medical record production yesterday. The defendant deposed your client's primary care physician this morning. Opposing counsel just asked, in a deposition you're cross-noticing tomorrow, "Did you ever discuss her shortness of breath in the weeks before the surgery?"

You need the answer in the next twenty minutes. The chart is somewhere in those 10,750 pages. The Bates stamps run SE_001247 through SE_011996. You don't have time to scroll.

This is what Case Record Search was built for.

What it does, in one sentence

You type a phrase. It returns every page across every uploaded file in the case where that phrase appears, with the Bates number, the file name, the page index, and a snippet showing the match in context.

SE_002424 medical-records-batch-3.pdf · page 2,432
"...the patient reports increasing shortness of breath over the last three weeks. Denies chest pain. Plan: pulmonary function testing, follow-up in 5 days..."

That's a real result shape from a real case in our index.

Why this is hard for everyone else

Most "medical records" tools fall into one of three buckets, and none of them solve this problem:

BucketWhat they give youWhat's missing
PDF readers (Acrobat, Preview)Search inside one fileNo cross-file search; no Bates extraction; OCR pages return nothing
Chronology builders (CaseFleet, Supio)An ordered timeline of eventsYou can't search for arbitrary phrases; the chronology is summarized, not the raw record
Cloud storage with search (Box, Dropbox)Filename and full-text matchesNo page-anchored hits; no Bates citation; can't cite the result back to the producing party

To do this right, you need three things working together that almost nobody bothers to build:

  1. Real OCR on every page — including the scanned hospital records that ship as image-only PDFs
  2. Page-aware indexing — break each PDF into individual pages, store the text per page, attach metadata
  3. Bates extraction — recognize the dozens of stamp formats producing parties actually use (SMITH_001247, BATES12345, R252290_000007, NJ_008240, "Page 42 of 500", and on and on) and tag the hit with the citation

How Case Record Search works

The pipeline runs the moment you upload a file:

  1. Text extraction. Digital PDFs get parsed natively (fast). Scanned PDFs go through tesseract OCR at 300 DPI, page-by-page. Word docs and TIFFs are also handled.
  2. Page splitting. The extracted text is broken at form-feed boundaries (the standard PDF page separator). For OCR'd records that lost form-feeds, we fall back to splitting on Bates-stamp transitions — a single Bates number per page.
  3. Bates extraction. Each page is regex-scanned for the producing party's stamp. We recognize PREFIX_NUMBER, BATES NUMBER, "Page X of Y," and several looser forms. The page is tagged with the canonical Bates ID.
  4. Provider + date extraction. Where present, "Dr. So-and-So," "Signed by," and dates in long, ISO, or US formats are captured per page.
  5. FTS5 indexing. Every page is added to a full-text search index (SQLite FTS5 with porter stemming). Queries return BM25-ranked results in milliseconds.
  6. Optional semantic re-rank. Top-K hits get passed to Claude (Haiku 4.5) which extracts the most relevant sentence per page and rates relevance 0–100. The semantic layer catches paraphrased matches that exact-keyword search misses.

Results from a real plaintiff's case file

One attorney on our platform has 52 cases indexed. We measured the search performance on the five largest:

CasePagesFilesQueryHitsw/ Bates
Cochran v. Jennie Stuart Medical Center10,7509"pulmonary embolism"55/5
Pinkney9,07315"standard of care"2712/27
Enley v. Ogbara2,72611"allergy"4141/41
Myra Cross v. James Little MD2,5182"admission"5050/50
Cochran (same case, different query)10,7509"patient"5050/50

Total: 45,421 indexed pages across 41 cases, queries return in under a second, Bates citations on the vast majority of hits.

How it changes the work

Three concrete swings in your daily practice:

1. Faster deposition prep

You're prepping a treating-physician depo at 9 PM. You want every page where the doctor mentions "weight gain" or "edema." You type the phrase. You get 17 hits with Bates numbers and snippets in under a second. You drop them into your outline.

2. Stronger cross-examination

Defense expert in his report claims your client "never reported chest pain pre-op." You search the production for "chest pain." You get four hits in pre-op visit notes with Bates citations. The expert's report is now contradicted on the face of the record — and you have the cite.

3. Faster case screening

A potential client sends you 4,000 pages of records. You're deciding whether to take the case. You search "informed consent" + "anesthesia" + "off-label." Three minutes later you have a defensible read on whether the malpractice claim is real before you've spent more than the consult fee.

What it costs

Case Record Search is included in every MedLegal AI plan starting at $49/month. There's no per-page or per-search fee. Upload the records once; search them forever.

Search any case file in 30 seconds

Free trial: 3 cases, no credit card. Upload one chart, run a search, and see what you've been missing in the records you already paid for.

Start Free Trial →

FAQ

Does it work on scanned (image-only) PDFs?

Yes. Every uploaded file runs through pdf-parse first (for born-digital text), then falls back to pdftotext, then to tesseract OCR at 300 DPI for image-only pages. The OCR pages are indexed alongside the digital ones.

What if the producing party used an unusual Bates format?

The regex patterns recognize the most common formats — PREFIX_NUMBER (most med-mal productions), BATES NUMBER (federal court), letter+number combinations, "Page X of Y," and several looser variants. If your case uses something exotic, contact us and we'll add a pattern; the change ships within a day.

Is the data secure?

Files are stored in encrypted S3, search indexes live in HIPAA-compliant infrastructure, and access is scoped per-user-per-case. We don't share data across customers and we don't train models on your records.

How does this differ from CaseFleet, Supio, or the AI chronology tools?

Those tools build a curated summary of the record — a chronology of events. Case Record Search is the opposite: it gives you raw search across the full producing record, with citations. You'd use a chronology tool to brief your case to an expert; you'd use Case Record Search to find a specific phrase before tomorrow's deposition.

John Mahoney is the founder of MedLegal AI. Questions? [email protected]

See the AI cite its source — no login
Most legal AI is wrong 17–33% of the time. Watch MedLegal AI pin every finding to the exact record page — click any citation and it jumps to the line that proves it.
Watch the 30-second demo →