The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
idx int64 | instruction string | input string | output string | candidates list | task_info dict |
|---|---|---|---|---|---|
0 | Given the sequence of events that have occurred in a hospital, please give the next Procedures International Classification of Diseases Item suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 33
- Gender: M
## Discharge [2118-12-25 00:00:00]
- Note_Type: DS
- Text:
Name: ___ Unit No: ___
Admission Date: ___ Discharge Date: ___
Date of Birth: ___ Sex: M
Service: SURGERY
Allergies:
azithromycin / Pe... | Insertion of Infusion Device into Left Basilic Vein, Percutaneous Approach | [
"Dilation of Left Axillary Vein, Percutaneous Approach",
"Dilation of Left Brachial Vein with Intraluminal Device, Percutaneous Approach",
"Insertion of Pacemaker Lead into Left Atrium, Percutaneous Approach",
"Supplement Left Axillary Artery with Synthetic Substitute, Open Approach",
"Dilation of Right Sub... | {
"target_key": "procedures",
"metric": "recall",
"task_type": "decision_making",
"task": "procedures_icd",
"event": "procedures_icd",
"target": "[\"Insertion of Infusion Device into Left Basilic Vein, Percutaneous Approach\"]",
"idx": 264291,
"label": [
"Insertion of Infusion Device into Left Basil... |
1 | Given the sequence of events that have occurred in a hospital, please give the next Procedure Events suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 67
- Gender: M
## Admissions [2158-04-04 13:41:00]
- Admission_Type: EW EMER.
- Admission_Location: PROCEDURE SITE
- Admission_Info: None
## Procedures on International Classification of Diseases [2158-04-06 00:00:00]
| Procedures | Ccs Type |
| ------ | ------ |
| (Aort... | Extubation | [
"Esophogeal Balloon",
"Liver Biopsy",
"Intraventricular Drain Inserted",
"C-Spine Clearance",
"TLS Spine",
"Chest X-Ray",
"Dialysis - CRRT",
"BAL Fluid Culture",
"Extubation",
"Interventional Radiology",
"Travel to Radiology",
"Presep Catheter",
"Pheresis Catheter",
"OR Sent",
"Lumbar Dr... | {
"target_key": "item_name",
"metric": "em",
"task_type": "decision_making",
"task": "procedureevents",
"event": "procedureevents",
"target": "[\"Extubation\"]",
"idx": 250979,
"label": [
"Extubation"
],
"reasoning": "## Extraction\n\n1. **Procedures on International Classification of Diseases [... |
2 | Given the sequence of events that have occurred in a hospital, please give the next Procedures Clinical Classifications Software Item suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 48
- Gender: F
## Discharge [2123-07-30 00:00:00]
- Note_Type: DS
- Text:
Name: ___ Unit No: ___
Admission Date: ___ Discharge Date: ___
Date of Birth: ___ Sex: F
Service: MEDICINE
Allergies:
Sulfa (Sulfonamid... | Abdominal paracentesis | [
"Abdominal paracentesis"
] | {
"target_key": "CCS Type",
"metric": "recall",
"task_type": "decision_making",
"task": "procedures_ccs",
"event": "procedures_icd",
"target": "[\"Abdominal paracentesis\"]",
"idx": 114812,
"label": [
"Abdominal paracentesis"
],
"reasoning": "## Extraction\n\n**Discharge [2123-07-30 00:00:00]**:... |
3 | Given the sequence of events that have occurred in a hospital, please give the next ED Pyxis suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 78
- Gender: F
## Discharge [2163-05-30 00:00:00]
- Note_Type: DS
- Text:
Name: ___ Unit No: ___
Admission Date: ___ Discharge Date: ___
Date of Birth: ___ Sex: F
Service: MEDICINE
Allergies:
Aspirin / Penicill... | Furosemide
Labetalol
Losartan Potassium
Docusate Sodium
Amlodipine
Ranitidine | [
"HydrALAZINE",
"Lisinopril",
"Tamsulosin",
"Magnesium Sulfate (Latex Free)",
"Procainamide",
"Atenolol",
"Bisacodyl (Rectal) 10mg SUPP",
"AmLODIPine",
"Esmolol 2000mg/100mL 100mL Bag",
"Morphine Sulfate 4mg/1mL 1mL SYR",
"TiCAGRELOR",
"HydrALAZINE 20mg/1mL 1mL VIAL",
"Benztropine Mesylate",
... | {
"target_key": "name",
"metric": "em",
"task_type": "decision_making",
"task": "pyxis",
"event": "pyxis",
"target": "[\"Furosemide\", \"Labetalol\", \"Losartan Potassium\", \"Docusate Sodium\", \"Amlodipine\", \"Ranitidine\"]",
"idx": 307993,
"label": [
"Furosemide",
"Labetalol",
"Losartan ... |
4 | Given the sequence of events that have occurred in a hospital, please give the next Admissions suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 66
- Gender: F
## Transfers [2124-05-10 13:19:00]
- Eventtype: ED
- Careunit: Emergency Department
## EDstays [2124-05-10 13:19:00]
- Gender: F
- Race: OTHER
## Triage [2124-05-10 13:19:01]
- Temperature: 98.7
- Heartrate: 73.0
- Resprate: 18.0
- O2Sat: 96.0
- Sbp: ... | DIRECT OBSERVATION | [
"SURGICAL SAME DAY ADMISSION",
"DIRECT OBSERVATION",
"ELECTIVE",
"EU OBSERVATION",
"EW EMER.",
"AMBULATORY OBSERVATION",
"OBSERVATION ADMIT",
"DIRECT EMER."
] | {
"target_key": "admission_type",
"metric": "em",
"task_type": "decision_making",
"task": "admissions",
"event": "admissions",
"target": "[\"DIRECT OBSERVATION\"]",
"idx": 379251,
"label": [
"DIRECT OBSERVATION"
],
"reasoning": "## Extraction\n\n1. **Triage [2124-05-10 13:19:01]**: The patient p... |
5 | Given the sequence of events that have occurred in a hospital, please give the next Electronic Medicine Administration Record suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 36
- Gender: F
## Admissions [2150-10-30 21:13:00]
- Admission_Type: URGENT
- Admission_Location: PHYSICIAN REFERRAL
- Admission_Info: None
## Electronic Medicine Administration Record [2150-10-30 20:47:00]
- Medication: Misoprostol
- Event_Txt: Administered
## Provider... | Nalbuphine HCl | [
"Codeine Sulfate",
"norethindrone acetate (bulk)",
"VICOdin",
"Nicotrol",
"Labetalol",
"Buprenorphine-Naloxone (8mg-2mg)",
"fentaNYL (PF)-bupivacaine-NaCl",
"Felbatol",
"Cymbalta",
"norethindrone acetate",
"Opium Tincture",
"BRIVAracetam",
"Buprenorphine-Naloxone Film (2mg-0.5mg)",
"HYDROm... | {
"target_key": "medication",
"metric": "em",
"task_type": "decision_making",
"task": "emar",
"event": "emar",
"target": "[\"Nalbuphine HCl\"]",
"idx": 118022,
"label": [
"Nalbuphine HCl"
],
"reasoning": "## Extraction\n\n1. **Electronic Medicine Administration Record [2150-10-30 20:47:00]**: Mi... |
6 | Given the sequence of events that have occurred in a hospital, please give the next Procedure Events suggestion for the patiens. | ## Patient Demographics [None]
- Anchor_Age: 45
- Gender: F
## Admissions [2172-02-27 07:30:00]
- Admission_Type: SURGICAL SAME DAY ADMISSION
- Admission_Location: PHYSICIAN REFERRAL
- Admission_Info: None
## Procedures on International Classification of Diseases [2172-02-27 00:00:00]
- Procedures: Other excision o... | Arterial Line | [
"18 Gauge",
"Tandem Heart Outflow Line",
"Interventional Radiology",
"EVD #1",
"Epidural Placement",
"Indwelling Port",
"Sheath (Arterial)",
"Extubation",
"ECMO Inflow Line",
"EKOS",
"Chest X-Ray",
"Cardiac Arrest",
"Transthoracic Echo",
"RIC",
"Urine Culture",
"Blakemore / MinnesotaTu... | {
"target_key": "item_name",
"metric": "em",
"task_type": "decision_making",
"task": "procedureevents",
"event": "procedureevents",
"target": "[\"Arterial Line\"]",
"idx": 225721,
"label": [
"Arterial Line"
],
"reasoning": "## Extraction\n\n1. **Radiology Examinations [2172-02-27 05:36:00]**: Th... |
7 | "Given the sequence of events that have occurred in a hospital, please give the next Procedures Inte(...TRUNCATED) | "## Patient Demographics [None]\n- Anchor_Age: 58\n- Gender: M\n\n\n\n## Admissions [2169-10-06 02:1(...TRUNCATED) | Venous catheterization for renal dialysis | ["Irrigation of Peritoneal Cavity using Dialysate, Percutaneous Approach","Fluoroscopy of Dialysis S(...TRUNCATED) | {"target_key":"procedures","metric":"recall","task_type":"decision_making","task":"procedures_icd","(...TRUNCATED) |
8 | "Given the sequence of events that have occurred in a hospital, please give the next ED Medrecon on (...TRUNCATED) | "## Patient Demographics [None]\n- Anchor_Age: 73\n- Gender: F\n\n\n\n\n\n## Triage [2129-03-28 13:3(...TRUNCATED) | "digoxin\ninsulin lispro\ncinacalcet\ncalcium compounds\nwarfarin\ntimolol, combinations\natorvastat(...TRUNCATED) | ["diclofenac, combinations","nicotinamide","insulin lispro","linagliptin","colestipol","atropine","a(...TRUNCATED) | {"target_key":"ATC Type","metric":"recall","task_type":"decision_making","task":"medrecon_atc","even(...TRUNCATED) |
9 | "Given the sequence of events that have occurred in a hospital, please give the next Procedures Inte(...TRUNCATED) | "## Patient Demographics [None]\n- Anchor_Age: 80\n- Gender: F\n\n## Discharge [2131-09-26 00:00:00](...TRUNCATED) | Other partial ostectomy, tarsals and metatarsals | ["Bunionectomy with soft tissue correction and osteotomy of the first metatarsal","Excision of Right(...TRUNCATED) | {"target_key":"procedures","metric":"recall","task_type":"decision_making","task":"procedures_icd","(...TRUNCATED) |
EHR-R1: A Reasoning-Enhanced Foundational Language Model for Electronic Health Record Analysis
This repository contains the EHR-Ins-Reasoning dataset, as presented in the paper EHR-R1: A Reasoning-Enhanced Foundational Language Model for Electronic Health Record Analysis.
EHR-Ins is a large-scale, comprehensive instruction dataset developed to enhance the reasoning and analysis capabilities of Large Language Models (LLMs) for Electronic Health Records (EHR).
Composition and Scale: It is a instruction corpus that comprises two major types of data:
- High-Quality Reasoning Cases: 300K reasoning cases.
- Non-Reasoning Cases: Approximately 3.5 to 4 million non-reasoning cases.
Task Coverage: The dataset spans a wide variety of 42 distinct EHR tasks, categorized into two types: decision-making (e.g., diagnosis and treatment recommendations) and risk-prediction (e.g., mortality and readmission).
Core Innovation (Thinking-Graph): The dataset's core innovation is a "thinking-graph-driven framework" used to synthesize the high-quality reasoning data at scale. This pipeline works by:
- Identifying key related medical entities from EHRs.
- Linking these entities using external knowledge, such as the UMLS knowledge base.
- Prompting a model (like GPT-4o) to produce structured, step-by-step clinical reasoning based on the generated graph.
Purpose: EHR-Ins provides explicit medical reasoning supervision, which enables models like the EHR-R1 series to systematically acquire diverse, context-rich reasoning capabilities necessary for accurate and robust EHR analysis.
GitHub Repository: https://github.com/MAGIC-AI4Med/EHR-R1
Structure
Each item in the jsonl file contains the key as below:
- idx: Unique ID for each sample
- instruction: Task instruction; the instruction is the same if the task is the same
- input: EHR input after text serialization
- output: Output used for training (this item is not useful for the test set)
- candidates: Candidate options provided for the untrained model
- task_info: Task-related information is included in this item, including:
- target_key: The column name from the EHR used to retrieve the prediction label; this item is
Nonefor therisk predictiontask - events: Event types related to the prediction label
- metric: The metric used to calculate the score for this task
- target: The raw label in string format
- label: The label used to calculate the score
- target_key: The column name from the EHR used to retrieve the prediction label; this item is
To prevent the leakage of native data information within the MIMIC-IV dataset, we removed information such as subject_id, harm_id, and other details that might link to the original MIMIC-IV data. The complete dataset can be found in MIMIC-IV-Ext-EHR-Analysis on PhysioNet (not yet released).
๐ Citation
If you find our work helpful or inspiring, please feel free to cite it:
@article{liao2025ehrr1,
title={{EHR-R1: A Reasoning-Enhanced Foundational Language Model for Electronic Health Record Analysis}},
author={Liao, Yusheng and Wu, Chaoyi and Liu, Junwei and Jiang, Shuyang and Qiu, Pengcheng and Wang, Haowen and Yue, Yun and Zhen, Shuai and Wang, Jian and Fan, Qianrui and Gu, Jinjie and Zhang, Ya and Wang, Yanfeng and Wang, Yu and Xie, Weidi},
journal={arXiv preprint arXiv:2510.25628},
year={2025}
}
- Downloads last month
- 24