Inspiration
Since the 21st Century Cures Act rules took effect in 2021, pathology results are released to patient portals the moment they're signed, often before the doctor has called. That means people open a page that says "pT2 pN0(sn), HER2 (IHC): Negative (Score 1+), LVI: Not identified" alone, often late at night. In a 2023 survey of 8,139 portal users, 16.5% of people with abnormal results felt more worried reading them before talking to a clinician, and 39.9% went searching online. Search results are generic and frightening, and chatbots take your health record and can make things up. We wanted to build something that sits beside the patient and explains their own report, accurately and privately.
What it does
PathLight turns a cancer pathology report into an annotated document, right in the browser.
- Any input: paste the text, upload the PDF, or snap a photo of the paper copy. Text recognition runs on the device.
- Annotates your own report: every finding (cancer type, grade, size, TNM stage code, margins, lymph nodes, ER/PR/HER2, Ki-67, Gleason, mismatch repair, Breslow depth and more) is highlighted in the report and numbered like a footnote. A plain-language note sits in the margin beside it, with a picture drawn to scale and the guideline behind it. Dotted words open definitions.
- Plain-English summary: an opening paragraph about the whole report, with every phrase linked to its evidence.
- Catches what the wording hides: a report that says "HER2 Negative (Score 1+)" is actually HER2-low, which can make a newer drug (trastuzumab deruxtecan) an option. PathLight explains this and adds it as a question to ask.
- Questions for the care team: chosen from the patient's own results. Copy or print them.
- Live clinical-trial search: queries ClinicalTrials.gov for recruiting trials near you. It sends only a cancer type, one marker and a place, and shows the exact query first.
- Humane design: a "Before you read" check-in that lets the patient set the pace, calm language with no alarm colors, read-aloud, larger text, dark mode, and a layout that works on phones.
It supports breast, colorectal, prostate, lung and melanoma reports, plus a glossary of 76 terms for any report. It's free, needs no account, and the report never leaves the device.
How we built it
- Clinical language engine (TypeScript): we wrote it from scratch, with no AI API. It splits the report into sentences while tracking each character's position, detects the organ, and runs more than 20 extractors. A NegEx-style negation module tells "no lymphovascular invasion" from "lymphovascular invasion present". Lymph nodes are counted per specimen. Every finding keeps the exact text it came from, which drives the highlights, footnotes and margin notes.
- Guidelines encoded as rules: AJCC 8th edition TNM staging wording, the ASCO/CAP HER2 scoring rules (including HER2-low and ultralow), ER "low positive", ISUP Grade Groups and IKWG Ki-67 cut-offs.
- Front end: React + Vite on a static site (GitHub Pages). pdf.js reads PDFs, and tesseract.js (WebAssembly) handles OCR, both served from our own site.
- Privacy enforced, not promised: the page ships a Content-Security-Policy whose
connect-srcallows only the site itself and clinicaltrials.gov. The browser itself blocks any other upload. - Validation: we tested on TCGA-Reports, 9,523 real OCR'd pathology reports from The Cancer Genome Atlas, compared with curated clinical records from cBioPortal. We split patients 50/50, studied errors only on one half, and scored the held-out half.
- Testing: 118 automated tests, with CI running the tests and the accuracy evaluation on every push.
Challenges we ran into
- Real reports are messy. OCR turns
pN0intopNOandpT1cintopTic. Forms print scaffolding like(0-3+,n/a), and legends say "Positive (3+)" without describing the patient. Some reports write the result before the marker ("positive for ER and PR"). Each of these produced wrong answers until we fixed it. - Lymph node counting. Totals are restated after their parts ("7/8" and "1/5", then "Positive 8/13"), and separate sentinel specimens can have identical counts ("0/1" each). We built specimen-aware counting to handle both.
- Being honest about accuracy. Our synthetic tests scored 100%, which proved nothing about real reports. That pushed us to find real data and use a proper held-out split.
- Laying out the margin notes. Keeping each note level with its highlight, without overlaps, across fonts, screen sizes and notes that open and close.
Accomplishments that we're proud of
- 92.6% agreement on 1,548 held-out real pathology reports (ER 97.5%, pathologic T 96.8%, N 98.2%), up from 89.5% before our error analysis. When PathLight isn't sure, it stays silent instead of guessing.
- A privacy guarantee the browser enforces, which we show on the landing page word for word.
- Catching HER2-low results hidden behind the word "negative".
- A design that makes the patient's own report the interface, instead of another dashboard.
- It runs for free at any scale, with no servers holding health data.
What we learned
- Good results on synthetic tests aren't enough. Real-world data and a held-out split are the only honest way to report accuracy.
- In health tools, "say nothing when unsure" beats a confident wrong answer, and showing the source of every claim builds trust.
- Privacy can be guaranteed by design, not just promised in a policy.
- Tone matters as much as accuracy: a calm, paced experience changes how scary information lands.
What's next for PathLight
- Review of every explanation by a pathologist, and a usability study with patients and caregivers measuring comprehension and anxiety before and after.
- Spanish and more languages.
- Better HER2 and lymph-node extraction, our weakest fields today.
- More organs (kidney, bladder, thyroid, endometrium) and blood cancers.
- An installable offline app, and partnerships so patient portals and cancer centers can link to PathLight next to the report.
Built With
- cbioportal
- clinicaltrials.gov-api
- css3
- github
- github-actions
- html5
- javascript
- natural-language-processing
- node.js
- pdf.js
- react
- tesseract.js
- typescript
- vite
- vitest
- webassembly
Log in or sign up for Devpost to join the conversation.