CoolFace
Datasetpublic

awinml/pubmed_case_reports

PubMed Case Reports A collection of 13,989 full-text case reports from the PubMed Central (PMC) Open Access subset, spanning 2005–2025. Each article includes structured metadata, abstract, full body text, and section-level annotations. This dataset is designed for medical NLP, clinical reasoning, and biomedical text mining. Dataset Description Summary This dataset comprises case reports published in peer-reviewed medical journals, sourced from the… See the full description on the dataset page: https://huggingface.co/datasets/awinml/pubmed_case_reports.

sourceHugging Facecc-by-4.0updated 3mo agoView on Hugging Face
0likes42downloads
Dataset Card

PubMed Case Reports

A collection of 13,989 full-text case reports from the PubMed Central (PMC) Open Access subset, spanning 2005–2025. Each article includes structured metadata, abstract, full body text, and section-level annotations. This dataset is designed for medical NLP, clinical reasoning, and biomedical text mining.

Dataset Description

Summary

This dataset comprises case reports published in peer-reviewed medical journals, sourced from the PMC Open Access Subset. Case reports are detailed accounts of individual patient encounters — including presentation, diagnosis, treatment, and outcome — making them a rich resource for clinical reasoning research.

Each row corresponds to one article with:

  • Bibliographic metadata (title, journal, publication date, PMCID, license)
  • Structured abstract and full body text
  • Section-level breakdown of the body text with normalised section types (background, case presentation, investigations, management, outcome, discussion, etc.)

Supported Tasks

TaskDescription
Clinical text generationPre-train or fine-tune language models on medical case report text
Abstractive QA / summarisationGenerate summaries of clinical encounters from full text
Section classificationClassify paragraphs by clinical section type
Information extractionExtract medical entities, relations, and treatment-outcome pairs
Clinical reasoning evaluationUse as a knowledge source for retrieval-augmented generation (RAG) pipelines

Languages

All articles are in English.

Dataset Structure

Data Fields

FieldTypeDescription
pmcidstringPubMed Central identifier (e.g., PMC1234567)
titlestringArticle title
journalstringJournal name
publication_datestringPublication date in YYYY-MM-DD format
article_linkstringURL to the article on PubMed Central
licensestringLicense text or URL
abstractstringArticle abstract (may be empty for some entries)
body_textstringFull body text, concatenated from all sections
sectionslist[dict]Section-level breakdown (see below)
backgroundstringConcatenated text of all background‑type sections
case_presentationstringConcatenated text of all case_presentation‑type sections
discussionstringConcatenated text of all discussion‑type sections
conclusionstringConcatenated text of all conclusion‑type sections
investigationsstringConcatenated text of all investigations‑type sections
managementstringConcatenated text of all management‑type sections
outcomestringConcatenated text of all outcome‑type sections
otherstringConcatenated text of all other‑type sections (declarations, ethics, supplementary, etc.)
referencesstringConcatenated text of all references‑type sections

Each element in the sections list is a dictionary with:

Sub-fieldTypeDescription
section_typestringNormalised section type (one of: abstract, background, case_presentation, investigations, management, outcome, discussion, conclusion, references, other)
headingstringOriginal section heading (e.g., "Case Presentation", "Discussion")
textstringSection body text

In addition to the nested sections list, each section type is also available as a top-level string column (e.g. background, case_presentation, discussion) containing the concatenated text of all sections of that type, making it easy to access specific clinical sections without iterating over lists.

Data Splits

The dataset contains a single split:

SplitSize
train13,989

Data Instance Example

json
{
  "pmcid": "PMC10000501",
  "title": "Multisystem Inflammatory Syndrome in Adults Associated with Recent Infection with COVID-19",
  "journal": "Diagnostics",
  "publication_date": "2023-03-04",
  "article_link": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10000501/",
  "license": "© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license",
  "abstract": "Multisystem inflammatory syndrome in adults (MIS-A) is a rare but severe complication of coronavirus disease 2019 (COVID-19)...",
  "body_text": "Background\\n\\nMultisystem inflammatory syndrome in adults (MIS-A) is a rare but severe complication...",
  "sections": [
    {"section_type": "background", "heading": "1. Introduction", "text": "Multisystem inflammatory syndrome in adults (MIS-A) is a rare..."},
    {"section_type": "case_presentation", "heading": "2. Case Report", "text": "A 34-year-old male with no significant past medical history..."},
    {"section_type": "discussion", "heading": "3. Discussion", "text": "MIS-A is a newly recognized entity that presents with..."},
    {"section_type": "conclusion", "heading": "4. Conclusions", "text": "This case highlights the importance of considering MIS-A..."}
  ],
  "background": "Multisystem inflammatory syndrome in adults (MIS-A) is a rare...",
  "case_presentation": "A 34-year-old male with no significant past medical history...",
  "discussion": "MIS-A is a newly recognized entity that presents with...",
  "conclusion": "This case highlights the importance of considering MIS-A...",
  "investigations": "",
  "management": "",
  "outcome": "",
  "other": "",
  "references": ""
}

Dataset Statistics

Overview

MetricValue
Total articles13,989
Unique PMCIDs13,989
Unique journals811
Year range2005–2025
Total characters (abstract + body)~171 M
Total words (abstract + body)~25 M

Per-Column Statistics

ColumnNon-emptyMean charsMean wordsMin charsMax chars
title13,98992137305
abstract13,5271,03814804,171
body_text13,98811,1741,635051,830
sections13,9886.0 sec/row042
background13,215 (94.5%)1,248184018,594
case_presentation11,557 (82.6%)3,082452020,614
discussion12,940 (92.5%)4,350637023,891
conclusion8,227 (58.8%)35652014,062
investigations468 (3.3%)64909,375
management918 (6.6%)751108,123
outcome161 (1.2%)7105,412
other9,311 (66.6%)1,982289049,658
references0 (0.0%)0000

Note: Section-type columns (background, case_presentation, etc.) contain empty strings when no section of that type is present in an article. The "Non-empty" column shows how many rows have content for each field.

Publication Years

Year RangeArticles
2005–2010418
2011–20152,498
2016–20204,167
2021–20257,205

The collection skews toward recent publications, with the majority (51%) from 2021–2025.

Top Journals

ArticlesJournal
1,136Journal of Medical Case Reports
1,057Clinical Case Reports
959International Journal of Surgery Case Reports
886Radiology Case Reports
403Journal of Surgical Case Reports
345JAAD Case Reports
299SAGE Open Medical Case Reports
294Journal of Orthopaedic Case Reports
263Case Reports in Medicine
228European Heart Journal: Case Reports
204American Journal of Ophthalmology Case Reports
190Case Reports in Dentistry

License Distribution (Top 10)

CountLicense
2,412CC BY-NC-ND 4.0
2,227Creative Commons Attribution License
1,321Terms of CC Attribution license
907CC BY 4.0
774CC BY-NC 4.0
703CC BY 3.0
609CC BY-NC-SA 4.0
567CC BY-NC-ND 3.0
420CC BY-SA 4.0
386CC BY 2.0

Section Types

Sections are normalised into the following categories:

Section TypeCoverageDescription
background94.5%Introduction, background
case_presentation82.6%Case report, clinical history, patient presentation
discussion92.5%Discussion, differential diagnosis
conclusion58.8%Conclusion
other66.6%Declarations, ethics, supplementary, etc.
management6.6%Treatment, therapeutic intervention
investigations3.3%Diagnostic workup, lab findings, imaging
outcome1.2%Follow-up, outcome
references<0.1%References
abstract¹Article abstract (stored as top-level abstract column)

¹ abstract section types from the body are not duplicated as a separate column since the article's structured abstract is already available as the top-level abstract field.

Dataset Creation

Source Data

The raw XML files were downloaded from the PMC Open Access Subset via the PMC Cloud Service S3 bucket (pmc-oa-opendata).

Curation Process

  1. 1.Discovery: Case report PMCIDs were discovered by querying PubMed with the Case Reports[pt] filter, segmented by year to stay within the 10K-result cap.
  2. 2.Download: Full-text XML was downloaded in parallel using async HTTP (aiohttp) from the PMC Cloud Service S3 bucket.
  3. 3.Parsing: Each XML file was parsed to extract:
  4. 4.Article metadata (title, journal, publication date, license, abstract)
  5. 5.Section-aware body text with normalised section type labels
  6. 6.Text cleaning (citation markers, figure references, whitespace normalisation)
  7. 7.Format: The parsed data was saved as a Parquet file.

Curation Rationale

Clinical case reports are a uniquely valuable genre of medical literature. Unlike randomised trials or systematic reviews, case reports provide fine-grained, narrative descriptions of individual patient journeys — from initial presentation through diagnosis, treatment, and follow-up. This makes them especially suited for:

  • Evaluating clinical reasoning capabilities of language models
  • Building retrieval-augmented generation systems for rare conditions
  • Training models to understand the structure of clinical narratives

Usage

Loading the Dataset

python
from datasets import load_dataset

# Load the full dataset
ds = load_dataset("awinml/pubmed_case_reports", split="train")

# Access a single example
example = ds[0]
print(example["title"])
print(example["abstract"])

# Iterate in streaming mode (low memory)
ds_stream = load_dataset("awinml/pubmed_case_reports", split="train", streaming=True)
for i, row in enumerate(ds_stream):
    if i >= 10:
        break
    print(row["pmcid"], row["title"][:80])

Working with Sections

The dataset provides two ways to access section text:

1. Via the `sections` list (full detail with original headings):

python
from datasets import load_dataset

ds = load_dataset("awinml/pubmed_case_reports", split="train")

for row in ds:
    sections = row["sections"]
    presentation = [s for s in sections if s["section_type"] == "case_presentation"]
    if presentation:
        print(f"PMCID: {row['pmcid']}")
        print(f"Heading: {presentation[0]['heading']}")
        print(f"Text: {presentation[0]['text'][:200]}...")
        break

2. Via direct section columns (simpler, concatenated across all sections of that type):

python
from datasets import load_dataset

ds = load_dataset("awinml/pubmed_case_reports", split="train")

for row in ds:
    if row["case_presentation"]:
        print(f"PMCID: {row['pmcid']}")
        print(f"Case presentation: {row['case_presentation'][:200]}...")
        break

3. Section length analysis with pandas:

python
from datasets import load_dataset
import pandas as pd

ds = load_dataset("awinml/pubmed_case_reports", split="train")
df = ds.to_pandas()

# Which sections are most common?
for col in ["background", "case_presentation", "discussion", "conclusion"]:
    pct = (df[col].str.len() > 0).mean() * 100
    print(f"{col}: {pct:.1f}% of articles have this section")

# Average discussion length
df[df["discussion"] != ""]["discussion"].str.len().describe()

Converting to Pandas

python
import pandas as pd
from datasets import load_dataset

ds = load_dataset("awinml/pubmed_case_reports", split="train")
df = ds.to_pandas()

# Journal distribution
print(df["journal"].value_counts().head(10))

# Average body text length by year
df["year"] = pd.to_datetime(df["publication_date"]).dt.year
print(df.groupby("year")["body_text"].apply(lambda x: x.str.len().mean()))

Retrieval-Augmented Generation

python
from datasets import load_dataset
from sentence_transformers import SentenceTransformer

# Load and chunk for RAG
ds = load_dataset("awinml/pubmed_case_reports", split="train", streaming=True)

# Build a simple in-memory index from body texts
corpus = []
pmcids = []
for i, row in enumerate(ds):
    if i >= 1000:
        break
    corpus.append(row["body_text"][:2000])  # first 2000 chars
    pmcids.append(row["pmcid"])

model = SentenceTransformer("all-MiniLM-L6-v2")
embeddings = model.encode(corpus, show_progress_bar=True)

Limitations & Considerations

  • Case reports are inherently anecdotal: They describe individual patient experiences and should not be treated as population-level evidence.
  • Publication bias: Journals are more likely to publish rare or novel cases, so the dataset may overrepresent unusual presentations.
  • Temporal skew: The collection is weighted toward recent publications (51% from 2021–2025).
  • No structured outcome labels: The dataset does not include standardised diagnostic or treatment outcome labels — this is a raw text corpus.
  • License variability: Articles carry different Creative Commons licenses. Users should verify license compatibility for their specific use case (see the license field per row).
  • No PHI redaction guarantee: While the source articles are published in open-access journals, individual case reports may contain identifiable patient information. Users should exercise appropriate caution.

Citation

If you use this dataset, please cite it as:

bibtex
@misc{awinml_pubmed_case_reports_2025,
  author       = {Ashwin Mathur},
  title        = {PubMed Case Reports: A Dataset of Full-Text Clinical Case Reports from PMC},
  year         = {2025},
  publisher    = {Hugging Face},
  journal      = {Hugging Face Datasets},
  howpublished = {\\url{https://huggingface.co/datasets/awinml/pubmed_case_reports}}
}

License

The dataset itself is released under CC BY 4.0. Individual articles carry their own licenses as specified in the license field and may have additional restrictions.

Contact

For questions or feedback, open an issue on the dataset repository.