Coronary Decision Support

PCI or CABG? Bring the angiogram.

Upload an ICA or CCTA coronary angiogram report. It reads the findings and recommends PCI, CABG or medical therapy, citing the 2021 ACC/AHA/SCAI guideline statement behind each point.

Demo only. Not a medical device, and not for decisions about real patients.

Try it

Run the sample report, or upload an ICA or CCTA report of your own as a PDF (up to 20 MB; scans and phone photos saved as PDF work). It covers NSTEMI and other non‑ST‑elevation presentations and takes 15–45 seconds.

High-level architecture

An analysis takes 15–45 seconds, so the page never waits on one request: it starts a job, uploads the PDF straight to S3, and polls until the result is ready.

How it works

Three stops between the PDF and the recommendation.

  1. Extract

    Claude reads the PDF, scans included, into a validated Pydantic schema: segment-level stenosis, dominance, LV function, comorbidities and presentation.

  2. Retrieve

    Rule-based queries built from those findings, plus a few the model writes for anything the rules miss, search a ChromaDB index of the guideline text and its 135 graded recommendations, embedded with Amazon Titan on Bedrock. Each hit pulls in its whole guideline section.

  3. Recommend

    The model weighs the findings against the retrieved sections and returns a strategy, a confidence level, the factors on each side and graded citations.

Lesion severity is computed in code from the guideline's thresholds rather than left to the model, and every citation names the guideline section it comes from, with its Class of Recommendation and Level of Evidence, so each claim can be checked against the source.

Validation

Tested on 491 real cath findings from MIMIC-IV discharge notes: NSTEMI and unstable angina admissions at one Boston hospital, each paired with the treatment the patient actually received.

96.5%of recommendations cite a graded guideline statement
72.2%agree with the PCI or CABG the care team chose

How the set was built. Admissions were selected by ICD code and labelled CABG or PCI from the procedures done in the same stay: 491 cases in total (264 CABG, 227 PCI). Discharge notes describe the treatment that followed, so only the cath findings were kept, with anything that hinted at the treatment removed.

Reading the agreement number. What a care team did is not the same as what the guideline supports. The choice also depends on surgical risk, patient preference, timing and which teams and facilities are available, none of which are in a cath report.

PCI vs CABG

RecommendedPrecisionRecallF1
CABG69.0%90.2%78.2%
PCI80.6%50.0%61.7%
Macro average74.8%70.1%70.0%

Scored on the 371 cases where it chose PCI or CABG. In the other 116 it answered insufficient data, either acceptable, or medical therapy. Cohen's κ 0.42.

These results come from the original version of this app, which embeds the guideline with PubMedBERT. This AWS version uses Titan embeddings and hasn't been scored on the set.

Clinical background

For patients with disease in more than one coronary artery, choosing between a stent and bypass surgery is one of the bigger calls in cardiology.

NSTEMI
A heart attack in which one or more coronary arteries are partly blocked. Many of these patients have disease in several vessels and need a plan to restore blood flow.
PCI
A catheter procedure that opens the artery with a balloon and a stent. Less invasive with a faster recovery; favoured for simpler anatomy.
CABG
Open-heart bypass surgery that routes blood around the blockages. Generally preferred for complex multivessel or left main disease, especially with diabetes.

The guideline grades each recommendation by Class of Recommendation (how strongly it applies) and Level of Evidence (how good the data are). Applying it means weighing anatomy, diabetes, heart function and surgical risk together, which is what this tool lays out with the source text attached.

Stack

Extraction and reasoningClaude Haiku 5.5 with structured output
OrchestrationLangChain (retrievers, LCEL)
APIAPI Gateway (HTTP API) and AWS Lambda; the PDF goes straight to S3 through a presigned upload
JobsAn S3 upload triggers the analysis Lambda, which records progress in DynamoDB for the page to poll
Vector storeChromaDB
EmbeddingsAmazon Titan Text Embeddings V2 on Bedrock
Guideline2021 ACC/AHA/SCAI Coronary Revascularization Guideline
Front endStatic HTML on S3 and CloudFront, Cloudflare Turnstile
InfrastructureTerraform