← Projects/Client build

Medical Documents AI OCR

An AI system that parses medical report PDFs of around 100 pages (tested up to 250), stores the extracted content in a database, vectorizes it, and lets users chat with each case file. Each document also produces a filled-in template report, and every answer cites its source for audit.

MedDoc Intelligence home page: AI-powered OCR, human verification and role-based access

How It Works

1

Upload and assign

A case handler uploads the medical record PDF and assigns the case to a doctor. The portal tracks processing status per case.

2

Self-hosted OCR

A self-hosted DeepSeek OCR model reads every page, so patient documents never go to a third-party OCR API. Each page gets a confidence score.

3

Anonymize, store and embed

Patient identifiers are anonymized, the text is stored in Supabase, and chunks are embedded into a pgvector store for retrieval.

4

Chat with the case file

Doctors ask questions about the case and get answers that cite the document name, page and section, so every claim can be checked.

5

Template reports

Each report template is a set of predefined questions. The system answers them from the extracted content, cites the source page for each answer, and exports a PDF.

What it shows

  • •Self-hosted DeepSeek OCR model, so patient documents never go to a third-party OCR API
  • •Extracted text stored in Supabase and embedded into a Supabase vector store for retrieval
  • •Template reports: each template is a set of predefined questions, answered from the extracted content and exported as a PDF
  • •Chat answers and template answers cite the document name, page and section they came from, for audit
  • •Patient data anonymized before indexing, encrypted at rest and in transit, with role-based access for case handlers, doctors and admins
  • •Document portal: cases assigned to a case handler and doctor, processing status, original PDF, OCR report and template report per case

Stack

DeepSeek OCR (self-hosted)SupabasepgvectorRAGNext.jsClaude Code

Screens

Document portal listing cases with status, original PDF, OCR report, template report and chat (patient details redacted)
Document portal listing cases with status, original PDF, OCR report, template report and chat (patient details redacted)
Original 257-page medical record PDF next to the summary and chat panel (patient details redacted)
Original 257-page medical record PDF next to the summary and chat panel (patient details redacted)
OCR extracted text report with per-page confidence scores (patient details redacted)
OCR extracted text report with per-page confidence scores (patient details redacted)
Template report answering predefined questions, with each diagnosis citing its source page (patient details redacted)
Template report answering predefined questions, with each diagnosis citing its source page (patient details redacted)

Client work: patient details in every screenshot are redacted, and there is no public repo or demo.