Database Credentialed Access

MIMIC-IV-Ext Triage Instruction Corpus

Qingyang Shen Quan Guo

Published: March 4, 2025. Version: 1.0.0


When using this resource, please cite: (show more options)
Shen, Q., & Guo, Q. (2025). MIMIC-IV-Ext Triage Instruction Corpus (version 1.0.0). PhysioNet. https://doi.org/10.13026/q1nc-2e47.

Please include the standard citation for PhysioNet: (show more options)
Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., ... & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.

Abstract

Emergency department (ED) overcrowding leads to delayed care, increased patient risk, and inefficient resource use. The MIMIC-IV-Ext Triage Instruction Corpus (MIETIC) addresses this by providing 9,629 structured triage cases from MIMIC-IV, aligned with the Emergency Severity Index (ESI).

MIETIC supports large language model (LLM) training for AI-assisted triage, improving accuracy, consistency, and risk assessment. The dataset includes chief complaints, vital signs, demographics, and medical history, ensuring realistic triage decision-making. Developed through automated quality control and expert validation, MIETIC enhances model performance in high-risk and moderate-risk classification.

Available in CSV formats, MIETIC enables research in clinical NLP, AI-driven triage, and decision-support tools. The dataset module includes:

  1. Structured triage cases with ESI labels.
  2. Triage case generation prompts for instruction tuning.
  3. Expert-validated samples for quality control.
  4. SQL scripts for data extraction and validation, hosted on GitHub.

MIETIC provides a standardized, reproducible dataset to advance AI-driven emergency triage, optimizing accuracy, efficiency, and resource allocation.


Background

Emergency department overcrowding leads to delays in care and resource misallocation[1-3]. Triage, particularly the Emergency Severity Index[4], helps prioritize patients but relies on subjective assessments, causing inconsistencies.

The MIMIC-IV-Ext Triage Instruction Corpus(MIETIC) addresses this by providing a structured, instruction-based dataset derived from MIMIC-IV v3.1, MIMIC-IV-ED v2.2 and MIMIC-IV-Note v2.2[5-9], ensuring alignment with triage guidelines. Developed through data extraction, quality control, and case generation, MIETIC enhances large language models for accurate triage classification and resource optimization.

By standardizing AI-driven triage, MIETIC supports research in clinical NLP, emergency decision support, and healthcare automation, improving consistency and efficiency in emergency care.


Methods

The MIMIC-IV-Ext Triage Instruction Corpus was constructed through a multi-step process to ensure clinical relevance, data quality, and alignment with emergency triage guidelines. The methodology involved data extraction, quality control, triage case generation, and instruction corpus creation, designed to optimize large language models for triage classification.

1. Data Collection and Extraction

MIETIC was derived from MIMIC-IV, specifically from MIMIC-IV-ED and MIMIC-IV-Note. The dataset includes vital signs, chief complaints, patient demographics, and triage outcomes. SQL queries were used to extract relevant records, ensuring that each case contained complete triage information, ESI levels, and necessary clinical context. Cases missing critical information, such as ESI assignments or essential time variables, were excluded.

2. Data Quality Control

To minimize inconsistencies in triage labels, a multi-step quality control process was implemented:

  • Automated Filtering: SQL-based rules identified cases with conflicting Emergency Severity Index (ESI) assignments, inconsistent resource usage, or missing triage variables. The SQL scripts used for this automated filtering are available in the project's code repository on GitHub[10].
  • Clinical Validation: Medical experts manually reviewed a randomly sampled subset of cases to verify label accuracy. Samples of validation desicions by human experts are included in MIETIC-validate-samples.csv.
  • Guideline Alignment: Each case was cross-checked against Emergency Severity Index (ESI) criteria, ensuring consistency in acuity classification.

3. Triage Case Generation

Structured triage cases were created by integrating structured (vital signs, demographics) and unstructured (clinical notes) data. Using large language model, raw data was converted into realistic, anonymized patient presentations, closely following ESI triage scenarios. All post-triage information (e.g., discharge outcomes) was removed to prevent data leakage.

4. Instruction Corpus Creation

To fine-tune models for triage decision-making, instruction-response pairs were generated based on ESI decision points:

  • Immediate life-saving interventions (ESI-1)
  • High-risk patient assessment (ESI-2)
  • Resource estimation for moderate/low acuity cases (ESI-3 to ESI-5)

Prompts were systematically crafted to align with real-world triage logic, ensuring models learn context-driven decision-making. The final dataset is provided in CSV and JSONL formats for broad compatibility.

By following this structured methodology, MIMIC-IV-Ext Triage Instruction Corpus offers a high-fidelity, reproducible dataset for training AI-driven triage models, improving accuracy, consistency, and resource allocation in emergency departments.


Data Description

The MIETIC.csv file is the core component of the MIETIC dataset and comprises 9,629 records with a total token count of 5.8 million. The dataset is available in both CSV and JSONL file formats.

Demographics:

  • Age Distribution:

    • 18-30 years: 25.18%
    • 31-50 years: 23.38%
    • 51-70 years: 29.75%
    • 71+ years: 21.69%
  • Gender Composition:

    • Male: 49.76%
    • Female: 50.24%

ESI Levels Distribution:

  • ESI-1: 23.08%
  • ESI-2: 23.08%
  • ESI-3: 23.08%
  • ESI-4: 23.08%
  • ESI-5: 7.69%

Instruction Types:

  • ESI-1 Life-saving: 31.17%
  • ESI-2 High-Risk Assessment: 31.17%
  • ESI-3 to ESI-5 Resource Estimation: 37.66%

The MIETIC dataset comprises several components designed to support the development and evaluation of large language models for emergency triage tasks. The data are organized into multiple files and directories as follows:

  1. MIETIC.csv
    This file contains the core Triage Instruction Corpus in CSV format. Each row in the file represents a unique triage instruction case, and the file is structured with three columns:

    • instruction: A detailed directive describing the triage task.
    • input: The associated contextual information of patient description used to inform the triage decision.
    • output: The expected result or response based on the instruction and input, typically reflecting the appropriate triage categorization according to the Emergency Severity Index framework.
  2. MIETIC-validate-samples.csv
    This CSV file includes 50 human-expert validated samples that have undergone quality control. It provides comprehensive metadata and clinical parameters for each triage case, facilitating both validation and further analysis. The columns in this file include:

    • Patient and Stay Identifiers: subject_id, stay_id, hadm_id
    • Timestamps: intime, outtime
    • Demographics: gender, race
    • Admission and Discharge Information: arrival_transport, disposition
    • Triage Vital Signs and Clinical Metrics: temperature, heartrate, resprate, o2sat, sbp, dbp, pain, acuity, and chiefcomplaint
    • Interventions and Resource Usage Indicators: Columns such as invasive_ventilation, non_invasive_ventilation, various transfer and procedure indicators, medication usage tiers, and other intervention-related flags
    • Additional Clinical Data: Including laboratory and exam counts, as well as derived fields like age and resources_used
    • Triage Case and Expert Annotations: tiragecase, Expert 1 Opinion, Expert 2 Opinion, Expert 3 Opinion, and Final Decision.

    In cases where the opinions of Expert 1 and Expert 2 are inconsistent, the annotation provided by Expert 3 is considered the definitive judgment. This file serves as the ground truth for assessing the performance of the triage models and ensuring data quality.

  3. sql_scripts

    The sql_scripts directory contains a suite of SQL scripts that are used to generate quality control metrics and derive patient assessment guidelines. Each script focuses on a specific intervention or assessment indicator. The files include:

    edstaysCriticalProcedures.sql

    edstaysExpiredBeyond1h.sql

    edstaysExpiredWithin1h.sql

    edstaysIntraosseousLinePlaced.sql

    edstaysPsychotropicMedications.sql

    edstaysRedCellOrderMoreThan1.sql

    edstaysTransferBeyond1h.sql

    edstaysTransferWithin1h.sql

    edstaysTransfusionBeyond1h.sql

    edstaysTransfusionWithin1h.sql

    invasiveVentilation1h.sql

    invasiveVentilationBeyond1h.sql

    noninvasiveVentilation.sql

    tier1MedUsageBeyond1H.sql

    tier1Medusage1h.sql

    tier2MedUsage.sql

    tier3MedUsage.sql

    tier4MedUsage.sql

    transfer2icubeyond1h.sql

    transfer2icuin1h.sql

    transfer2surgerybeyond1h.sql

    transfer2surgeryin1h.sql

    SQL01-interventionFinalComp.sql

    SQL02-recourcesCount.sql

    All scripts add patient assessment guidelines based on various clinical interventions and resource usage parameters. These scripts are intended to standardize the evaluation of critical triage indicators and provide consistent metrics across the dataset.

  4. Prompts

    The prompts directory contains a collection of prompt templates designed for two primary purposes: generating triage cases and evaluating model outputs. These templates are instrumental in simulating clinical triage scenarios and guiding large language models (LLMs) to produce outputs that are consistent with established clinical guidelines. The directory is organized into two subcategories:

    Triage Case Generation
    GenerateTriageCase.txt: This prompt is used to generate the textual input for triage cases. It provides the necessary context and structure to simulate real-world emergency department scenarios, ensuring that the generated corpus accurately reflects the complexity and nuances of clinical triage.

    Triage Judgment and Formatting
    For each Emergency Severity Index (ESI) level, there are two types of prompt templates:
    ESI-<N>-Analysis.txt: For each ESI level (e.g., ESI-1, ESI-2, ESI-3), these prompts guide the LLMs in generating the triage judgment or analysis specific to that level. They instruct the models to focus on the critical parameters and clinical indicators relevant to the corresponding ESI categorization.
    ESI-<N>-Format.txt: These prompts are designed to format the generated triage outputs in a standardized manner. They ensure that the final outputs are consistent, structured, and readily interpretable.

    Together, these prompt templates facilitate both the creation of a rich triage corpus and the systematic evaluation of model outputs, thereby supporting the development of robust, clinically-informed triage models.

Collectively, these components of the MIETIC dataset enable a comprehensive framework for training, validating, and refining LLMs in the context of emergency triage, ensuring that the models are well-aligned with real-world clinical decision-making processes.


Usage Notes

Usage Notes

The MIETIC dataset is designed to support the development and evaluation of large language models for emergency triage. Researchers can utilize the dataset to train models that improve triage accuracy and consistency, enhance resource allocation in emergency departments, and facilitate robust quality control analyses. Below are key points on how to use the dataset, along with external documentation and related software tools.

Data Organization and Usage

  • Core Files:

    • MIETIC.csv: Contains the Triage Instruction Corpus in CSV format. Each row includes an instruction (triage directive), an input (patient description), and an output (expected triage decision based on the Emergency Severity Index).
    • MIETIC-validate-samples.csv: Comprises 50 quality-controlled samples with detailed patient and clinical data. This file includes fields such as subject_id, stay_id, timestamps, demographics, vital signs, intervention indicators, and expert annotations. In cases of disagreement between Expert 1 and Expert 2, Expert 3's opinion is considered definitive.
  • Supplementary Directories:

    • sql_scripts: Contains SQL files that generate quality control metrics and derive patient assessment guidelines for ESI Level 2. These scripts standardize the evaluation of clinical interventions and resource usage. Researchers can run these scripts within any relational database management system (e.g., PostgreSQL) to extract and analyze data.
    • prompts: Includes prompt templates for generating and formatting triage cases. The templates are organized by ESI level (e.g., ESI-1, ESI-2, ESI-3) and are intended for both generating triage case descriptions and formatting model outputs for evaluation.

Intended Use and Analysis

  • Training and Fine-Tuning:
    The MIETIC dataset can be used to train large language models (LLMs) for emergency triage tasks through techniques such as instruction tuning and domain adaptation. It supports experiments that simulate clinical scenarios to generate triage decisions comparable to those made by experienced emergency physicians.

  • Quality Control and Evaluation:
    The accompanying SQL scripts allow users to derive patient assessment guidelines and calculate quality metrics. These metrics help validate model performance, particularly in critical triage scenarios, and ensure alignment with clinical standards.

  • Interoperability and Data Linkage:
    While MIETIC is designed as a standalone dataset for triage tasks, it can be linked with other clinical datasets (e.g., MIMIC-IV, MIMIC-CXR) via shared identifiers (e.g., subject_id), enabling broader clinical research and multi-modal analysis.

Limitations
Despite its strengths, the MIMIC-IV-Ext Triage Instruction Corpus has several limitations:

  • Single-Center Data: The dataset is derived from a single academic medical center, which may limit the generalizability of the triage decisions and clinical presentations to other institutions with different patient populations or triage protocols.
  • Limited ESI-5 Cases: There is a relatively low representation of ESI-5 cases. This imbalance may affect the performance of models, particularly in accurately identifying non-urgent cases.
  • Potential Bias in Expert Validation: Although expert validation was performed, the inherent subjectivity in clinical decision-making could introduce bias in the final triage labels.

External Documentation and Related Software

  • Documentation:

    • GitHub Repository: Comprehensive documentation, including detailed usage instructions, configuration examples, and experiment guidelines, is available on the GitHub repository[10].
    • PhysioNet Documentation: Researchers should refer to the official PhysioNet pages for information on accessing and using associated datasets such as MIMIC-IV[5], MIMIC-IV-ED[6] and MIMIC-IV-Note[7].
  • Related Software:

    • SQL Scripts: Located in the sql_scripts directory, these scripts are essential for quality control and data extraction. They are compatible with standard relational database systems (e.g., PostgreSQL).
    • Prompt Templates: Found in the prompts directory, these templates support both the generation and evaluation of triage cases using LLMs.
    • Experiment and Evaluation Scripts: The repository includes a variety of Python scripts for running experiments (e.g., exp1_local.py, exp2_local.py, etc.) and evaluation (e.g., eval.py, run_eval.sh). These scripts require Python 3.8+ and dependencies listed in the repository’s requirements.txt.

Software Requirements

  • Programming Environment:
    Python 3.8 or later is required to run the provided scripts. All dependencies are listed in the requirements.txt file in the repository.

  • Database Management:
    For executing the SQL scripts, a relational database management system (e.g., PostgreSQL) is recommended.


Release Notes

MIMIC-IV-Ext Triage Instruction Corpus v1.0.0

MIMIC-IV-Ext Triage Instruction Corpus v1.0.0 was the first publicly available version of the database.


Ethics

The authors declare no ethical concerns regarding the MIMIC-IV Triage Instruction Corpus (MITIC). This project utilizes data from MIMIC-IV, MIMIC-IV-ED, and MIMIC-IV-Note, all of which are publicly available and fully de-identified. Data generation was performed using the GPT-4o 240806 model provided by Azure OpenAI, and we have completed the opt-out of human review via the Azure OpenAI Additional Use Case Form. These measures ensure that patient privacy and confidentiality are strictly maintained. No financial, legal, or professional conflicts of interest are associated with this work.


Acknowledgements

We would like to express our gratitude to the Sichuan University Center of Intelligent Medicine for their invaluable support and contributions throughout the development of the MIMIC-IV-Ext Triage Instruction Corpus. We also thank the emergency medicine professionals and triage nurses whose expertise was instrumental in validating and refining the dataset.


Conflicts of Interest

The authors declare no financial, commercial, legal, or professional relationships with other organizations or individuals that could be perceived as influencing the research. This dataset development and associated research were conducted independently, without any conflicts of interest that could affect the integrity or objectivity of the work.


References

  1. McCarthy ML, Zeger SL, Ding R, Levin SR, Desmond JS, Lee J, Aronsky D. Crowding delays treatment and lengthens emergency department length of stay, even among high-acuity patients. Ann Emerg Med. 2009;54(4):492–503.e4. doi:10.1016/j.annemergmed.2009.03.006.
  2. Richardson DB. Increase in patient mortality at 10 days associated with emergency department overcrowding. Med J Aust. 2006;184(5):213–216. doi:10.5694/j.1326-5377.2006.tb00204.x.
  3. Hoot NR, Aronsky D. Systematic review of emergency department crowding: Causes, effects, and solutions. Ann Emerg Med. 2008;52(2):126–136. doi:10.1016/j.annemergmed.2008.03.014.
  4. Gilboy N, Tanabe P, Travers DA, Rosenau AM, Eitel DR. Emergency Severity Index, version 4: Implementation handbook. Rockville (MD): Agency for Healthcare Research and Quality (AHRQ); 2005.
  5. Johnson A, Bulgarelli L, Pollard T, Gow B, Moody B, Horng S, Celi L A, Mark R. MIMIC-IV (version 3.1). PhysioNet. 2024. Available from: https://doi.org/10.13026/kpb9-mt58.
  6. Johnson A, Bulgarelli L, Pollard T, Celi L A, Mark R, Horng S. MIMIC-IV-ED (version 2.2). PhysioNet. 2023. Available from: https://doi.org/10.13026/5ntk-km72.
  7. Johnson A, Pollard T, Horng S, Celi L A, Mark R. MIMIC-IV-Note: Deidentified free-text clinical notes (version 2.2). PhysioNet. 2023. Available from: https://doi.org/10.13026/1n74-ne17.
  8. Goldberger A, Amaral L, Glass L, Hausdorff J, Ivanov PC, Mark R, Mietus JE, Moody GB, Peng CK, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.
  9. Johnson AEW, Bulgarelli L, Shen L, Gayles A, Shammout A, Horng S, et al. MIMIC-IV, a freely accessible electronic health record dataset. Scientific Data. 2023 Jan 3;10(1).
  10. Shen Q, Zhang X, Ren H, Guo Q, Yi Z. Knowledge-Embedded Large Language Models for Emergency Triage [Code repository]. GitHub; 2024. Available from: https://github.com/sqy941013/Knowledge-Embedded-Large-Language-Models-for-Emergency-Triage.

Parent Projects
MIMIC-IV-Ext Triage Instruction Corpus was derived from: Please cite them when using this project.
Share
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

Corresponding Author
You must be logged in to view the contact information.

Files