Database Credentialed Access
MIMIC-III-Ext-MIMIC-Patient: Structured Per-Patient JSON Records for Clinical Question Answering
Tianqi Shang , Weiqing He , Charles Zheng , Lingyao Li , Li Shen , Bingxin Zhao
Published: Sept. 11, 2026. Version: 1.0.0
When using this resource, please cite:
Shang, T., He, W., Zheng, C., Li, L., Shen, L., & Zhao, B. (2026). MIMIC-III-Ext-MIMIC-Patient: Structured Per-Patient JSON Records for Clinical Question Answering (version 1.0.0). PhysioNet. RRID:SCR_007345. https://doi.org/10.13026/bzzd-w075
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://rdcu.be/faatM
Abstract
This project provides MIMIC-Patient, a structured, per-patient representation of the MIMIC-III database designed for large language model (LLM)–based clinical question answering. For each of 500 admissions, we reconstruct the patient’s episode into a single JSON file that aggregates demographics, admission information, diagnoses, procedures, medications, vital signs, laboratory results, imaging reports, and key free-text clinical notes. The schema is designed to be fine-grained yet compact, so that LLMs can access clinically relevant information without being overwhelmed by the full raw database.
In addition to the dataset, we provide an answer generation script (answer_agent.py) that implements a patient QA system built on keyword-based routing from natural-language questions to the appropriate JSON fields, followed by LLM-based answer synthesis. This enables standardized benchmarking of LLM performance on retrieval, reasoning, and answer stability when operating on structured EHR abstractions.
The resource is intended for researchers working on clinical NLP, medical decision-making agents, and evaluation of LLMs on real-world electronic health records. All data are derived from the de-identified MIMIC-III database and are shared under a credentialed health data license. Scientific analyses and benchmark results using this resource are described in a separate manuscript.
Background
Electronic health record (EHR) databases such as MIMIC-III are widely used for clinical research and for the development and evaluation of computational models, including models for patient outcome prediction and analysis of unstructured clinical notes [1]. However, MIMIC-III contains heterogeneous clinical information distributed across multiple relational tables and data modalities, including structured measurements, semi-structured reports, and free-text clinical notes [1,2]. This distributed representation creates practical challenges for large language model (LLM)-based applications that need to integrate patient information across multiple sources. In addition, hallucination and reliability remain important concerns when applying LLMs, particularly when models are exposed to irrelevant or excessive context [2–5]. To enable more controlled use of LLMs on real-world ICU data, we constructed MIMIC-Patient, a per-patient JSON abstraction of MIMIC-III [2].
Each file bundles an individual admission into a coherent, human-readable structure containing admission information, demographic attributes, diagnoses and procedures, problem-focused histories, serial laboratory results, vital signs, imaging reports, and other key clinical data [2]. Building on this representation, we implemented a patient answering system that maps natural-language questions to relevant JSON sections using a keyword-based routing mechanism and then generates answers with an LLM [2].
This resource is shared to support reproducible research on clinical question answering, interactive and multi-agent medical decision making, and evaluation of LLM behavior under controlled information exposure [2].
Methods
Data Source
The MIMIC-Patient dataset was derived from the MIMIC-III database, a publicly available, de-identified electronic health record (EHR) dataset comprising 58,976 hospital admissions for over 40,000 patients admitted to critical care units at Beth Israel Deaconess Medical Center between 2001 and 2012.
MIMIC-III contains heterogeneous clinical data distributed across multiple relational tables, including structured records (e.g., laboratory values, diagnoses), semi-structured reports (e.g., radiology notes), and unstructured free-text clinical documentation (e.g., discharge summaries).
Data Selection
To construct a patient-level dataset suitable for interactive and open-ended clinical reasoning tasks, admissions were filtered using the following inclusion criteria:
-
Limited diagnostic complexity: Admissions with fewer than five documented diagnoses were retained. This constraint was introduced to reduce excessive multimorbidity that could confound evaluation of diagnostic reasoning.
-
Non-newborn admissions: Neonatal admissions were excluded due to distinct clinical pathways and data structures.
-
Surviving patients: Admissions in which the patient died during hospitalization were excluded to avoid incomplete or atypical clinical trajectories.
-
Data completeness: Admissions were required to contain all major categories of structured data and at least one discharge summary to ensure sufficient clinical context for downstream tasks.
After applying these criteria, 2,597 eligible admissions remained. From this subset, 500 admissions were randomly selected without replacement to form the final dataset. Each admission corresponds to a single hospital stay and is treated as one patient-level case in the dataset.
Data Extraction and Integration
Clinical information in MIMIC-III is distributed across multiple relational tables. To create a unified and structured representation for each patient admission, relevant data were extracted and merged into a single JSON file per patient.
Data were categorized into three types based on structure and extraction strategy:
1. Structured Data
Structured data consist of tabular records with explicit field definitions. These were extracted using admission identifiers and directly merged into patient-level records. Structured data elements include:
-
Admission information (e.g., admission time, discharge time)
-
Demographics (e.g., age, sex)
-
Diagnoses (ICD-9 codes)
-
Prescriptions
-
Procedures (with codes and timestamps)
-
Chart events (vital signs and clinical measurements)
-
Laboratory results
Each structured entry was matched by hospital admission ID and consolidated into the corresponding patient JSON file.
2. Semi-Structured Text
Semi-structured reports (e.g., ECG reports, echocardiogram reports, radiology reports) typically follow partially standardized formats with recurring section headers such as Findings and Impression.
These reports were processed using rule-based parsing methods:
-
Section headers were identified using regular expressions.
-
Text was segmented into labeled subsections.
-
Parsed sections were stored in structured
JSONformat.
This approach preserved clinically meaningful segmentation while avoiding loss of contextual information.
3. Unstructured Text
Unstructured discharge summaries often lack consistent formatting and may contain long, narrative descriptions spanning multiple clinical events.
To structure these documents:
-
Discharge summaries were processed using a large language model (GPT-4).
-
The model was prompted to extract key clinical elements and organize them into structured
JSONfields. -
Extracted fields were incorporated into the patient-level JSON representation.
This step enabled integration of complex narrative data into a machine-readable format while preserving clinically relevant content.
Dataset Structure
The final dataset consists of 500 JSON files, each representing a single hospital admission. Each JSON file consolidates heterogeneous clinical information spanning:
-
Demographic characteristics
-
Diagnoses and procedures
-
Medication records
-
Vital signs and laboratory measurements -
Diagnostic reports
-
Structured discharge summary content
The volume of data per patient varies naturally according to length of stay and clinical complexity.
Data Description
MIMIC-Patient is a patient-level dataset in which each patient's clinical information is consolidated into a single, well-structured JSON file (see the following table). Each file is named with a unique identifier (e.g., 100173.json) and stored within the patient_json/ directory.
| Data Type | Clinical Info |
|---|---|
| Structured Data | Admission Info |
| Demographics | |
| Diagnoses | |
| Prescription | |
| Procedure | |
| Chart Data | |
| Lab Data | |
| Semi-Structured Text | ECG reports |
| Echo reports | |
| Radiology reports | |
| Unstructured Text | Discharge Summary |
The following is an example of a patient JSON file.
// Listing 2: Patient JSON example (**** indicates placeholders for privacy issues.)
"Patient": {
"Admission_info": {
"patient_id": "****",
"admission_id": "***",
"admission_diagnosis": "arrhythmia"
},
"Demographics": {
"insurance": "private",
"language": "engl",
"marital_status": "****",
"ethnicity": "white",
"gender": "****",
"age": ***
},
"Diagnoses": [[
"4019",
"Hypertension NOS",
"Unspecified essential hypertension"
], ...],
"Prescription": [
"Sodium Chloride 0.9% Flush",
"Lisinopril",
"Heparin", ...
],
"Introduction": "Hi, I’m a ****. I was referred here by my clinic ...my doctor was concerned about a possible arrhythmia.",
"ECG": [[
"2105-03-03",
"...",
"Atrial pacing and A-V conduction which is new compared to previous tracings."
], ...],
"Radiology": [{
"time": "2105-03-03",
"part": "CHEST (PA & LAT)",
"medical_condition": "**** with new dual chamber",
"ppm reason for this examination": "Evaluate lead position",
"final report history": "Pacemaker placement.",
"findings": "In comparison with the study of ****, there has been placement of ... other acute cardiopulmonary disease."
}, ...],
"Allergies": "No Known Allergies / Adverse Drug Reactions",
"Chief Complaint": "Fatigue, lightheadedness, bradycardia, sinus pauses",
"Major Surgical or Invasive Procedure": "Pacemaker placement (St. Medical Accent PM2210 dual chamber pacemaker)",
"Physical Exam": {
"Admission": {
"VS": "T=98.0 BP=158/91 HR=61 RR=18 O2 sat=95",
"General": "WDWN M in NAD. Oriented x3. Mood, affect appropriate. Fit",
"HEENT": "NCAT. Sclera anicteric. PERRL, EOMI. Conjunctiva were pink, no pallor or cyanosis of the oral mucosa. No xanthelasma.",
"Neck": "Supple with JVP below clavicle at 90 degrees.",
"Cardiac": "PMI located in 5th intercostal space, midclavicular line. RR, normal S1, S2. No m/r/g. No thrills, lifts. No S3 or S4.",
"Lungs": "No chest wall deformities, scoliosis or kyphosis. Resp were unlabored, no accessory muscle use. CTAB, no crackles, wheezes or rhonchi.",
"Abdomen": "Soft, NTND. No HSM or tenderness. Abd aorta not enlarged by palpation. No abdominal bruits.",
"Extremities": "No c/c/e. No femoral bruits.",
"Skin": "No stasis dermatitis, ulcers, scars, or xanthomas.",
"Pulses": {
"Right": "Carotid 2+ Femoral 2+ Popliteal 2+ DP 2+ PT 2+",
"Left": "Carotid 2+ Femoral 2+ Popliteal 2+ DP 2+ PT 2+"
}, ...
},
"Respiratory": {
"O2 saturation pulseoxymetry": [[
"2105-02-28 03:15:00",
"97.0 %"
], ...]
}, ...
}
}
Usage Notes
Usage
Place answer_agent.py and the patient_json/ directory under the same root folder. When answer_agent.py is executed, it will automatically load the corresponding patient data from the patient_json/ directory.
Prior use
MIMIC-Patient was developed and used in DynamiCare, a multi-agent framework for interactive and open-ended medical decision-making [2]. In that work, the 500 patient records were used to support patient-level question answering and evaluation of multi-agent diagnostic reasoning.
Reuse potential
The dataset is intended for research on clinical question answering, structured EHR reasoning, LLM-based medical agents, and evaluation of model behavior under controlled information exposure. Each admission is represented as a single JSON record, allowing researchers to access consolidated patient information without reconstructing it from multiple MIMIC-III tables. The accompanying answer_agent.py provides one example interface for querying these records.
Limitations
MIMIC-Patient is a selected subset of MIMIC-III rather than a representative sample of all admissions. The dataset includes non-newborn, surviving admissions with fewer than five documented diagnoses and sufficient data completeness; 500 admissions were randomly selected from 2,597 eligible cases. These criteria introduce selection bias toward less diagnostically complex and more complete cases. In addition, MIMIC-III contains de-identified critical-care data from a single medical center collected between 2001 and 2012, which may limit generalizability to other institutions, populations, or more recent clinical practice. Finally, some semi-structured reports were processed using rule-based parsing and discharge summaries were structured using GPT-4, so derived fields may contain minor extraction or summarization errors.
Use of External LLM Services
The provided answer_agent.py can be configured to use external LLM APIs. Users must ensure that their use of any external service complies with the MIMIC-III Data Use Agreement and applicable data-use requirements. Credentialed MIMIC data should not be transmitted to third-party services unless the service's data retention and privacy policies are compatible with these requirements. Users are responsible for reviewing the policies of any external API before use.
Release Notes
Version 1.0.0
Initial Release
Ethics
All data used in this work are fully de-identified, and no additional identifiable information was introduced during dataset construction. The MIMIC-Patient dataset was generated through structured extraction, transformation, and reorganization of existing de-identified records. No new patient data were collected for this study.
Access to the original MIMIC-III database requires completion of human subjects training and acceptance of a data use agreement. The derived dataset maintains the same privacy-preserving standards.
For any large language model (LLM) processing used in this work, we used a zero data retention configuration, such that prompts and outputs are not stored and are not used for model training.
The authors declare no additional ethics concerns.
Acknowledgements
This research project (including this dataset) was supported by National Institute of Mental Health under Award Number R01MH136055; National Institute on Aging under Award Numbers RF1AG082938, R01AG085581, and P30AG073105; and National Science Foundation Award Number 2500343. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health and the National Science Foundation. The study has also been partially supported by funding from the Department of Statistics and Data Science at the University of Pennsylvania, Wharton Dean’s Research Fund, Analytics at Wharton, Wharton AI \& Analytics Initiative, Perelman School of Medicine CCEB Innovation Center Grant, and the University Research Foundation at the University of Pennsylvania. We would like to thank the research computing and IT group at the Wharton School of the University of Pennsylvania for providing computational resources and support that have contributed to these research results.
Conflicts of Interest
The authors declare that they have no financial, commercial, legal, or professional relationships with any organizations or individuals that could be construed as influencing the research presented in this study. The authors report no conflicts of interest.
References
- Johnson, A. E., Pollard, T. J., Shen, L., Lehman, L. W. H., Feng, M., Ghassemi, M., ... & Mark, R. G. (2016). MIMIC-III, a freely accessible critical care database. Scientific data, 3(1), 160035.
- Shang, T., He, W., Zheng, C., Li, L., Shen, L., & Zhao, B. (2025). Dynamicare: A dynamic multi-agent framework for interactive and open-ended medical decision-making.
- Huang, L., Yu, W., Ma, W., Zhong, W., Feng, Z., Wang, H., ... & Liu, T. (2025). A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM transactions on information systems, 43(2), 1-55.
- Zhang, Y., Li, Y., Cui, L., Cai, D., Liu, L., Fu, T., ... & Shi, S. (2025). 🧜 Siren’s Song in the AI Ocean: A Survey on Hallucination in Large Language Models. Computational Linguistics, 51(4), 1373-1418.
- Liu, Y., Yao, Y., Ton, J. F., Zhang, X., Guo, R., Cheng, H., ... & Li, H. (2023). Trustworthy llms: a survey and guideline for evaluating large language models' alignment. arXiv preprint arXiv:2308.05374.
Parent Projects
Access
Access Policy:
Only credentialed users who sign the DUA can access the files.
License (for files):
PhysioNet Credentialed Health Data License 1.5.0
Data Use Agreement:
PhysioNet Credentialed Health Data Use Agreement 1.5.0
Required training:
CITI Data or Specimens Only Research
Discovery
DOI (version 1.0.0):
https://doi.org/10.13026/bzzd-w075
DOI (latest version):
https://doi.org/10.13026/n19w-aw59
Project Website:
https://github.com/THEGREATICE/DynamiCare
Project Views
1
Current Version1
All VersionsCorresponding Author
Versions
Files
- be a credentialed user
- complete required training:
- CITI Data or Specimens Only Research You may submit your training here.
- sign the data use agreement for the project