Database Credentialed Access

MIMIC-IV-Ext-CPT - Procedure Code Labels for MIMIC Clinical Notes

,  ,  ,  ,  , 

Published Nov. 12, 2026 · Version 1.0.1
When using this resource, please cite:

Wang, B., Shangguan, Z., Zhang, Z., Chheang, S., Cohan, A., & Tegtmeyer, K. (2026). MIMIC-IV-Ext-CPT - Procedure Code Labels for MIMIC Clinical Notes (version 1.0.1). PhysioNet. RRID:SCR_007345. https://doi.org/10.13026/15h1-9682

Additionally, please cite the original publication:

Wang B, Shangguan Z, Tegtmeyer K, Zhang Z, Chheang S, Cohan A. CPTCoder: a reliable LLM system for medical procedure code prediction. In: Durrett G, Jian P, editors. Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics, Volume 3: System Demonstrations. San Diego: Association for Computational Linguistics; 2026. p. 605–614. doi:10.18653/v1/2026.acl-demo.60. https://aclanthology.org/2026.acl-demo.60/

Please include the standard citation for PhysioNet:

Pollard, T., Moody, B. E., Lehman, L., Gow, B., Fernandes, C., Xie, C., Johnson, A., Mark, R. G., & Heldt, T. (2026). PhysioNet as a global platform for biomedical research. Nature Health. https://doi.org/10.1038/s44360-026-00096-z. Available from: https://pmc.ncbi.nlm.nih.gov/articles/PMC13641116/

Abstract

MIMIC-IV-Ext-CPT is a credentialed-access dataset for predicting procedure and service code identifiers from deidentified MIMIC clinical notes. Version 1.0.1 contains 30,938 historically curated radiology training records, 7,705 annotated clinical test records, and 412,297 auxiliary records with weak admission-level labels. The auxiliary records come from MIMIC-III radiology and discharge notes and MIMIC-IV-Note discharge summaries.

Each record contains one report and its assigned code set in seven columns: a project-specific sample_id, deidentified report text, pipe-delimited non-E/M cpt_codes, pipe-delimited Evaluation and Management em_codes, and three corresponding label counts. Labels originate from structured coding fields; admission-level labels are not verified evidence of every procedure in an individual note. This revision removes 30 test records whose report text also occurs in training after Unicode, whitespace, and case normalization. Training and auxiliary files are unchanged. Test labels remain within the training vocabulary. The resource supports research on multi-label procedure-code prediction. It does not establish patient-level split independence or support autonomous billing.


Background

Current Procedural Terminology (CPT) is the American Medical Association's system for representing medical procedures and services. Evaluation and Management (E/M) codes are a CPT service category covering patient assessment and management encounters, including office and hospital visits [@ama, @amab]. The release stores code identifiers rather than the CPT codebook or its descriptions.

MIMIC provides deidentified clinical records for research [@johnson2015, @johnson2016, @johnson2023, @johnson2024]. Established medical-code prediction work such as CAML uses MIMIC discharge summaries to predict ICD-9 diagnosis and procedure codes [@mullenbach2018]. That task does not directly evaluate CPT procedure and service prediction from a radiology report. This resource provides a complementary report-to-code task, together with an auxiliary weak-label corpus. It supports studying infrequent labels and combinations of codes while making the different note types and label-alignment strengths visible. It is associated with CPTCoder [@wang2026]; it is not claimed to be a comprehensive collection of every CPT-coded radiology report.


Methods

Source-pool inclusion and exclusion

The recovered builder reads six files: MIMIC-IV-Note v2.2 radiology.csv.gz, radiology_detail.csv.gz, and discharge.csv.gz; MIMIC-IV v3.1 hcpcsevents.csv.gz; and MIMIC-III v1.4 NOTEEVENTS.csv.gz and CPTEVENTS.csv.gz. Its retained settings enable F/T codes and require at least one character after trimming text for the eligibility check.

For the radiology source pool, the builder starts with records whose trimmed, uppercased note_type is RR. It uses parent_note_id and addendum_note_id fields in radiology_detail to associate parent reports, linked AR addenda, and code events. A parent report is eligible only when its assembled text is nonempty after the minimum-length check and at least one associated code passes the accepted format. Unlinked addenda are not emitted as independent radiology examples by this path. Rows without an accepted code or eligible text are excluded from the source pool.

For MIMIC-IV discharge source rows, note_type must be DS, the note must pass the text-length check, and its hadm_id must match a hospital admission with at least one accepted hcpcs_cd in hcpcsevents. For MIMIC-III, the builder requires a nonempty admission ID, a category of radiology or discharge summary, iserror other than 1, eligible text, and an admission with at least one accepted CPTEVENTS code. Other note categories, missing admission joins, and notes without accepted labels are excluded. The recovered source-pool code has no additional age, diagnosis, or disease filter.

Not all radiology source records with procedure labels were selected for the final dataset. The builder produces a source pool of 49,341 radiology records. In the original curation described in CPTCoder [@wang2026], CPT identifiers were normalized against the AMA CPT 2026 Professional Edition, and records containing deprecated or outdated CPT codes were excluded. The release therefore uses a curated subset of the source pool. Version 1.0.1 preserves the original training and auxiliary files and removes only 30 overlapping test records.

Report-text handling

The recovered radiology builder groups the parent report and linked addendum segments by parent note ID. Within a group, it sorts segments by storetime when available, otherwise charttime, then by numeric note_seq (defaulting to zero when unavailable), and finally by segment note ID. It concatenates the segment text in that order, inserting \n\n===== ADDENDUM =====\n\n before each segment after the first. This describes the implemented ordering; the code does not force the parent segment to be first independently of those sort keys.

The builder retains the source text for discharge and MIMIC-III notes. It trims source identifiers, field names, code strings, and metadata used for joins or comparisons. Its text-length condition evaluates a trimmed copy; it does not assign that trimmed copy back to note_text. Beyond radiology segment assembly and null-to-empty handling during that assembly, the recovered source-pool builder does not lowercase, tokenize, truncate, rewrite, or remove sections from clinical text. Deidentification is inherited from the parent MIMIC releases.

For version 1.0.1, comparison normalization is used only to detect training/test overlap. The stored text and labels of every retained row are unchanged.

Code extraction and representation

For radiology source rows, codes are extracted from radiology_detail entries whose trimmed, lowercased field_name is cpt_code. The builder trims and uppercases field_value, maps child-note code events to their parent where a parent relationship exists, and groups repeated events by parent note and code. Labels are taken from those structured fields, not inferred from the report prose.

For MIMIC-IV discharge rows, accepted hcpcsevents.hcpcs_cd values are trimmed, uppercased, grouped by admission and code, and assigned to each qualifying discharge note for that admission. For MIMIC-III rows, the builder first uses the trimmed concatenation of CPT_NUMBER and CPT_SUFFIX when nonempty, otherwise CPT_CD; it uppercases the result and groups accepted codes by admission. These discharge and MIMIC-III joins are admission-level weak alignment. They do not establish that every assigned code is evidenced by the particular note, and they apply no note-level temporal matching.

The source-pool format filter accepts exactly five digits or four digits followed by F or T: ^(?:[0-9]{5}|[0-9]{4}[FT])$. It excludes other formats, including alphabetic-prefix HCPCS identifiers. Format acceptance does not certify that a code remains valid in a current CPT edition. The historical builder marks numeric codes from 99201 through 99499 as E/M-like; the release stores these in em_codes and the remaining accepted identifiers in cpt_codes. This is the dataset's historical partition rule, not a replacement for current AMA coding guidance. In MIMIC-III structured intermediates, an evaluation and management section header also affects the separate keep_procfocus flag; it does not redefine the public em_codes field. Code lists in the public files are pipe-delimited, contain no duplicate identifier within a row, and have matching count columns.

Version 1.0.1 overlap correction

Starting from the SHA-256-verified historical train and test files, the revision computes a comparison key for each report: apply Unicode NFKC normalization, replace each run of whitespace with one space, strip leading and trailing whitespace, then apply Unicode casefold(). It removes each test row whose key occurs in training, regardless of its labels. Of 30 removed test rows, 29 match training text exactly and one matches only after comparison normalization. Retained test rows keep their original order and all seven field values. Training and auxiliary silver gzip files remain byte-identical to version 1.0.0.

scripts/revise_test_split.py implements this correction. metadata/revision_removed_test_rows.csv records each removed sample ID, its one-based original test data-row position, the removal reason, and match type; it contains no report text. The current test has zero exact or comparison-normalized report overlap with training. This procedure removes duplicate report text; it does not establish patient- or admission-level disjointness and does not detect all semantic near-duplicates.


Data Description

  • data/gold/train.csv.gz: 30,938 historically curated radiology training records.
  • data/gold/test.csv.gz: 7,705 annotated clinical test records.
  • data/silver/silver_raw.csv.gz: 412,297 auxiliary records with admission-level weak labels.
  • croissant-metadata.json: machine-readable metadata for the three compressed CSV resources.
  • metadata/: data dictionary, source versions, current statistics, overlap checks, removal manifest, and checksums.
  • provenance/: source-build evidence and the revision flow.
  • code/: the fixed-commit source-pool builder and post hoc statistics scripts, with their own MIT license.
  • scripts/: the version 1.0.1 test correction, statistics updates, release validation, and checksum generation.

The data tables are RFC 4180-style UTF-8 CSV files compressed with gzip. Each data row represents one report with one or more assigned labels. Empty cpt_codes or em_codes means that no identifier from that family is assigned to that row.

The seven data columns are:

Column Meaning
sample_id Project-specific pseudonymous record identifier.
report Deidentified report text, including linked radiology addenda when assembled by the source builder.
cpt_codes Pipe-delimited non-E/M identifiers matching five digits or four digits followed by F/T; empty if none.
em_codes Pipe-delimited E/M-like identifiers, using the historical numeric range 99201–99499; empty if none.
num_cpt_codes Number of identifiers in cpt_codes.
num_em_codes Number of identifiers in em_codes.
num_all_codes Sum of the two label counts.

Version 1.0.1 contains 30,938 training records, 7,705 annotated clinical test records, and 412,297 auxiliary weakly aligned records, for a total of 450,940 records. The test has 31,217 label instances and 322 unique labels.


Usage Notes

The resource supports research on multi-label procedure and service code prediction, including infrequent labels and code combinations. The test vocabulary is closed relative to training. Users should report the dataset version used for their experiments.

Version 1.0.1 has a different test membership from the 7,735-row historical test used in CPTCoder [@wang2026]. The paper's published model results are not newly measured results for this 7,705-row test. Dataset hardening and overlap statistics are recomputed for the current files; they are not model-performance measurements.

The public seven-column files omit raw subject_id, hadm_id, source note IDs, and timestamps. Neither a lack of duplicate sample IDs nor the report-text overlap correction establishes patient- or admission-level independence. Within-file repeated reports and semantically similar reports can remain.

The files contain rich clinical text, project-specific pseudonymous identifiers, and inherited shifted or masked date strings. They must remain under the credentialed controls of the parent MIMIC resources. The dataset is intended for research and human-reviewed evaluation. It is not suitable for autonomous billing or clinical decision-making.


Release Notes

Version 1.0.1

The initial release on PhysioNet. It removes 30 test rows whose report text also occurs in training after Unicode NFKC normalization, whitespace collapse and stripping, and case folding. There are 29 exact-text matches and one normalized-only match. Retained fields and relative row order are preserved. The training and auxiliary-silver files are byte-identical to version 1.0.0. The current test has 7,705 annotated clinical records. It has zero exact or comparison-normalized report-text overlap with training. The correction script, removed-row manifest, current statistics, and checksums accompany the release. No patient-level independence or revised model-performance results are claimed. The expanded Methods section describes the source-pool rules and the current overlap correction.


Ethics

This project is a secondary derived resource created exclusively from deidentified data in MIMIC-III v1.4, MIMIC-IV v3.1, and MIMIC-IV-Note v2.2. The parent MIMIC resources document the applicable institutional review and waivers of informed consent: MIMIC-III was approved by the Institutional Review Boards of Beth Israel Deaconess Medical Center and the Massachusetts Institute of Technology, while MIMIC-IV and MIMIC-IV-Note were reviewed by the Beth Israel Deaconess Medical Center Institutional Review Board, which granted a waiver of informed consent and approved the data-sharing initiative. No new participants were recruited and no new patient data were collected for this project [@johnson2015, @johnson2023, @johnson2024].

The resource is intended for research and human-reviewed evaluation, not for autonomous clinical care or billing. Potential benefits include supporting reproducible research in clinical procedure-code prediction. Potential risks include misuse or inadvertent disclosure of sensitive clinical information; these risks are mitigated through deidentification, credentialed access, the applicable PhysioNet Data Use Agreement, data minimization, and human-review requirements.


Conflicts of Interest

The authors have no conflicts of interest to declare.


References

  1. @ama American Medical Association. CPT code set overview. https://www.ama-assn.org/practice-management/cpt/cpt-code-set-overview
  2. @amab American Medical Association. CPT Evaluation and Management. https://www.ama-assn.org/practice-management/cpt/cpt-evaluation-and-management
  3. @johnson2015 Johnson, A., Pollard, T., & Mark, R. (2015). MIMIC-III Clinical Database (Version 1.4) [Dataset]. PhysioNet. https://doi.org/10.13026/C2XW26
  4. @johnson2016 Johnson, A. E. W., Pollard, T. J., Shen, L., Lehman, L.-w. H., Feng, M., Ghassemi, M., Moody, B., Szolovits, P., Anthony Celi, L., & Mark, R. G. (2016). MIMIC-III, a freely accessible critical care database. Scientific Data, 3(1). https://doi.org/10.1038/sdata.2016.35
  5. @johnson2023 Johnson, A., Pollard, T., Horng, S., Celi, L. A., & Mark, R. (2023). MIMIC-IV-Note: Deidentified free-text clinical notes (Version 2.2) [Dataset]. PhysioNet. https://doi.org/10.13026/1n74-ne17
  6. @johnson2024 Johnson, A., Bulgarelli, L., Pollard, T., Gow, B., Moody, B., Horng, S., Celi, L. A., & Mark, R. (2024). MIMIC-IV (Version 3.1) [Dataset]. PhysioNet. https://doi.org/10.13026/kpb9-mt58
  7. @mullenbach2018 Mullenbach, J., Wiegreffe, S., Duke, J., Sun, J., & Eisenstein, J. (2018). Explainable Prediction of Medical Codes from Clinical Text. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), 1101–1111. https://doi.org/10.18653/v1/N18-1100
  8. @wang2026 Wang, B., Shangguan, Z., Tegtmeyer, K., Zhang, Z., Chheang, S., & Cohan, A. (2026). CPTCoder: A Reliable LLM System for Medical Procedure Code Prediction. Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations), 605–614. https://doi.org/10.18653/v1/2026.acl-demo.60
  9. @goldberger2000 Goldberger AL, Amaral LAN, Glass L, et al. PhysioBank, PhysioToolkit, and PhysioNet. Circulation. 2000;101(23):e215-e220. doi:10.1161/01.CIR.101.23.e215.

Files