Hospital-Acquired Infection (HAI) Prediction Dataset
Authors: Ghasemi, Vahid, Bakhshi, Zahra, Zamanian, Mohammadhossein
Type: Dataset
Published: 2026-08-03

<div class="logged-in env-production page-responsive text-rendering-optimize-speed">
<div class="application-main ">
<div class="">
<div class="repository-content ">
<div>
<div>
<div class="prc-PageLayout-PageLayoutRoot--KH-d">
<div class="prc-PageLayout-PageLayoutWrapper-2BhU2">
<div class="prc-PageLayout-PageLayoutContent-BneH9">
<div class="prc-PageLayout-ContentWrapper-gR9eG">
<div class="prc-PageLayout-Content-xWL-A">
<div class="SharedPageLayout-module__content__IwGAp">
<div class="CodeView-module__contentWrapper__cG2JH">
<div class="d-flex flex-row">
<div class="container BlobViewContent-module__blobContainer__DtH2d">
<div class="BlobViewContent-module__blobContentWrapper__JS0W6">
<div class="js-snippet-clipboard-copy-unpositioned BlobContent-module__markdownBlob__T8jpG">
<div class="markdown-heading">
<h1 class="heading-element">🏥 Hospital-Acquired Infection (HAI) Prediction Dataset</h1>
</div>
<p>   </p>
<div class="markdown-heading">
<h2 class="heading-element">A comprehensive dataset of in-patient admission records from emergency and hospital wards, including demographic information, vital signs, laboratory results, and clinical outcomes.</h2>
</div>
<div class="markdown-heading">
<h2 class="heading-element">📊 Overview</h2>
</div>
<p>This dataset includes <strong>119,743 hospital admission records</strong> with <strong>32 clinical and demographic features</strong>. The data is derived from real‑world hospital records spanning the years <strong>June 2023 – February 2026</strong> at <strong>Imam-Reza Hospital, Kermanshah, Iran</strong>. The de-intefied dataset is included in a file, named <a href="https://github.com/vghasemi921/HAI/blob/main/Hospital_infection_data.csv">Hospital_infection_data.csv</a>.</p>
<div class="markdown-heading">
<h3 class="heading-element">General Statistics</h3>
</div>
<ul>
<li><strong>Total Records</strong>: 119,743</li>
<li><strong>Total Features</strong>: 32</li>
<li><strong>Time Period</strong>: June 2023 – February 2026</li>
<li><strong>Unique Complaints</strong>: 901 types</li>
</ul>
<div class="markdown-heading">
<h2 class="heading-element">📋 Feature Description</h2>
</div>
<div class="markdown-heading">
<h3 class="heading-element">Demographic Information</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>Age</code></td>
<td>Patient's age (years)</td>
<td>Float</td>
<td>0.01%</td>
</tr>
<tr>
<td><code>Sex</code></td>
<td>Gender (Male/Female)</td>
<td>String</td>
<td>0%</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Admission and Ward Information</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>Year</code></td>
<td>Admission year (Solar Hijri)</td>
<td>String</td>
<td>0%</td>
</tr>
<tr>
<td><code>Department</code></td>
<td>Hospital ward</td>
<td>String</td>
<td>0.01%</td>
</tr>
<tr>
<td><code>Triage level</code></td>
<td>Triage level (1 to 5)</td>
<td>Integer</td>
<td>0%</td>
</tr>
<tr>
<td><code>Patient complaint</code></td>
<td>Chief complaint</td>
<td>String</td>
<td>4.1%</td>
</tr>
<tr>
<td><code>diagnosis</code></td>
<td>ICD‑10 diagnosis code</td>
<td>String</td>
<td>63.2%</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Vital Signs</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>SPo2</code></td>
<td>Blood oxygen saturation (%)</td>
<td>Float</td>
<td>0.63%</td>
</tr>
<tr>
<td><code>BPMin</code></td>
<td>Diastolic blood pressure (mmHg)</td>
<td>Float</td>
<td>2.27%</td>
</tr>
<tr>
<td><code>BPMax</code></td>
<td>Systolic blood pressure (mmHg)</td>
<td>Float</td>
<td>2.27%</td>
</tr>
<tr>
<td><code>PR</code></td>
<td>Pulse rate (bpm)</td>
<td>Float</td>
<td>0.75%</td>
</tr>
<tr>
<td><code>RR</code></td>
<td>Respiratory rate (per minute)</td>
<td>Float</td>
<td>87.45%</td>
</tr>
<tr>
<td><code>T</code></td>
<td>Body temperature (°C)</td>
<td>String</td>
<td>1.51%</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Blood Tests</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
<th>Unit</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>BS</code></td>
<td>Random blood sugar</td>
<td>Float</td>
<td>74.02%</td>
<td>mg/dL</td>
</tr>
<tr>
<td><code>BS (second)</code></td>
<td>Blood sugar (second measurement)</td>
<td>Float</td>
<td>4.70%</td>
<td>mg/dL</td>
</tr>
<tr>
<td><code>WBC</code></td>
<td>White blood cell count</td>
<td>Float</td>
<td>2.48%</td>
<td>×10³/µL</td>
</tr>
<tr>
<td><code>RBC</code></td>
<td>Red blood cell count</td>
<td>Float</td>
<td>93.21%</td>
<td>—</td>
</tr>
<tr>
<td><code>HB</code></td>
<td>Hemoglobin</td>
<td>Float</td>
<td>0.59%</td>
<td>g/dL</td>
</tr>
<tr>
<td><code>HCT</code></td>
<td>Hematocrit</td>
<td>Float</td>
<td>0.59%</td>
<td>%</td>
</tr>
<tr>
<td><code>PLT</code></td>
<td>Platelet count</td>
<td>Float</td>
<td>0.66%</td>
<td>×10³/µL</td>
</tr>
<tr>
<td><code>ESR</code></td>
<td>Erythrocyte sedimentation rate</td>
<td>Float</td>
<td>81.73%</td>
<td>mm/hr</td>
</tr>
<tr>
<td><code>CRP</code></td>
<td>C‑reactive protein</td>
<td>String (Qualitative)</td>
<td>53.82%</td>
<td>—</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Blood Biochemistry</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
<th>Unit</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>UREA</code></td>
<td>Blood urea</td>
<td>Float</td>
<td>1.26%</td>
<td>mg/dL</td>
</tr>
<tr>
<td><code>CR</code></td>
<td>Creatinine</td>
<td>Float</td>
<td>1.17%</td>
<td>mg/dL</td>
</tr>
<tr>
<td><code>NA</code></td>
<td>Sodium</td>
<td>Float</td>
<td>16.12%</td>
<td>mEq/L</td>
</tr>
<tr>
<td><code>K</code></td>
<td>Potassium</td>
<td>Float</td>
<td>19.21%</td>
<td>mEq/L</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Coagulation</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>PT</code></td>
<td>Prothrombin time</td>
<td>String</td>
<td>99.25%</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Target Variable</h3>
</div>
<table>
<tbody>
<tr>
<th>Column</th>
<th>Description</th>
<th>Data Type</th>
<th>Missing %</th>
</tr>
</tbody>
<tbody>
<tr>
<td><code>Label</code></td>
<td>Clinical outcome (0 or 1)</td>
<td>Integer</td>
<td>0%</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h2 class="heading-element">⚠️ Data Quality Notes</h2>
</div>
<div class="markdown-heading">
<h3 class="heading-element">Missing Data</h3>
</div>
<p>Some columns have significant percentages of missing data:</p>
<table>
<tbody>
<tr>
<th>Status</th>
<th>Missing %</th>
<th>Columns</th>
</tr>
</tbody>
<tbody>
<tr>
<td><strong>Critical</strong></td>
<td>> 80%</td>
<td>RBC (93.2%), PT (99.3%), ESR (81.7%), RR (87.5%)</td>
</tr>
<tr>
<td><strong>High</strong></td>
<td>50–80%</td>
<td>BS (74%), CRP (53.8%), diagnosis (63.2%)</td>
</tr>
<tr>
<td><strong>Medium</strong></td>
<td>10–20%</td>
<td>NA (16.1%), K (19.2%)</td>
</tr>
<tr>
<td><strong>Good</strong></td>
<td>< 10%</td>
<td>Other columns</td>
</tr>
</tbody>
</table>
<div class="markdown-heading">
<h3 class="heading-element">Class Imbalance</h3>
</div>
<p>The target variable (<code>Label</code>) is imbalanced:</p>
<ul>
<li><strong>Negative Class (0)</strong>: 98.62% (118,083 cases)</li>
<li><strong>Positive Class (1)</strong>: 1.38% (1,660 cases)</li>
</ul>
<div class="markdown-heading">
<h2 class="heading-element">📝 Dataset Usage, Validation and Code</h2>
</div>
<p>We validated the dataset using classical machine learning methods to establish baseline performance for hospital-acquired infection (HAI) prediction on a subset of the dataset. The code is available in the <strong><code>CODE/</code></strong> subdirectory, in Python.</p>
<div class="markdown-heading">
<h3 class="heading-element">Requirements</h3>
</div>
<p>The scripts require the following Python packages:</p>
<ul>
<li><code>pandas</code></li>
<li><code>numpy</code></li>
<li><code>matplotlib</code></li>
<li><code>seaborn</code></li>
<li><code>scikit-learn</code></li>
<li><code>xgboost</code></li>
</ul>
<p>Install them with:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto">
<pre>pip install pandas numpy matplotlib seaborn scikit-learn xgboost</pre>
<div class="zeroclipboard-container"> </div>
</div>
<div class="markdown-heading">
<h3 class="heading-element">Running the Code</h3>
</div>
<p>Navigate to the <code>CODES/</code> folder and run:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto">
<pre>python CODE.py</pre>
<div class="zeroclipboard-container"> </div>
</div>
<p>The script will:</p>
<ul>
<li>Preprocess the data</li>
<li>Train classifiers (Logistic Regression, Random Forest, AdaBoost, XGBoost)</li>
<li>Evaluate performance using cross-validation</li>
<li>Generate metrics and visualizations</li>
</ul>
<div class="markdown-heading">
<h2 class="heading-element">🧑‍⚖️ License</h2>
</div>
<p>This repository contains two distinct components with different licenses:</p>
<ol>
<li><strong>Source Code (Python scripts)</strong>: Licensed under the <strong>MIT License</strong> – see the <a href="https://github.com/vghasemi921/HAI/blob/main/LICENSE">LICENSE</a> file.</li>
<li><strong>Dataset (CSV files)</strong>: Licensed under the <strong>Creative Commons Attribution‑NonCommercial 4.0 International License (CC BY‑NC 4.0)</strong> – see the <a href="https://github.com/vghasemi921/HAI/blob/main/LICENSE_DATA">LICENSE_DATA</a> file.
<ul>
<li>
<p>This license permits <strong>non‑commercial use</strong>, sharing, and adaptation, provided appropriate credit is given.</p>
</li>
<li>
<p><strong>Commercial use</strong> (including selling, licensing, or using the data in proprietary commercial products) is <strong>strictly prohibited</strong> without explicit written permission from the authors.</p>
</li>
<li>
<p>Users <strong>must not attempt to re‑identify</strong> any patients, although all data has been de-identified.</p>
</li>
<li>
<p><strong>Additional Terms of Use:</strong></p>
<p>By downloading, accessing, or using this dataset, you agree to the following additional terms:</p>
<p><strong>Citation Requirement:</strong> You must cite the associated Data Descriptor paper in any publication, presentation, or product that uses or references this dataset:</p>
<blockquote>
<p>Bakhshi, Z., Ghasemi, V., & Zamanian, M. H. (2026). A Large‑Scale Hospital Dataset for Early Prediction of Hospital‑Acquired Infections Based on Admission and First‑Day Clinical Data. <em>Submitted to The Journal of Biomedical Physics and Engineering</em>. [DOI: To be Inserted]</p>
</blockquote>
<p><strong>Dataset Citation (for data access):</strong></p>
<blockquote>
<p>Bakhshi, Z., Ghasemi, V., & Zamanian, M. H. (2026). A Large‑Scale Hospital Dataset for Early Prediction of Hospital‑Acquired Infections Based on Admission and First‑Day Clinical Data (Version 1.0.0) [Dataset]. Available online: <a href="https://doi.org/10.5281/zenodo.21777046" rel="nofollow">https://doi.org/10.5281/zenodo.21777046</a></p>
</blockquote>
<p><strong>Attribution:</strong> As required by the CC BY-NC 4.0 license, you must give appropriate credit to the dataset creators and provide a link to the license.</p>
</li>
</ul>
</li>
</ol>
<div class="markdown-heading">
<h2 class="heading-element">🛡️ Ethical Approval</h2>
</div>
<p>This study was conducted in compliance with the <strong>Declaration of Helsinki</strong> and approved by the <strong>Ethics Committee of the School of Medicine, Kermanshah University of Medical Sciences</strong> under approval code: <strong>IR.KUMS.MED.REC.1404.284</strong></p>
<p>All patient data were fully anonymized prior to extraction, and the requirement for informed consent was waived by the Ethics Committee due to the retrospective nature of the study.</p>
<div class="markdown-heading">
<h2 class="heading-element">👥 Contributors</h2>
</div>
<ul>
<li><strong>Zahra Bakhshi, MSc</strong> – Department of Computer Engineering, Faculty of Information Technology, Kermanshah University of Technology, Kermanshah, Iran.</li>
<li><strong>Dr. Vahid Ghasemi, PhD</strong> – Department of Computer Engineering, Faculty of Information Technology, Kermanshah University of Technology, Kermanshah, Iran.</li>
<li><strong>Dr. Mohammadhossein Zamanian, PhD</strong> – Clinical Research Development Center, Imam-Reza Hospital, Kermanshah University of Medical Sciences, Kermanshah, Iran.</li>
</ul>
<div class="markdown-heading">
<h2 class="heading-element">📧 Contact and Collaboration</h2>
</div>
<p>For questions, suggestions, or collaboration on research projects based on this data:</p>
<ul>
<li>✉️ Email (Corresponding Author): <a href="mailto:zahrabakhshi22@gmail.com">zahrabakhshi22@gmail.com</a></li>
<li>📧 Email (Supervisor): <a href="mailto:v.ghasemi921@gmail.com">v.ghasemi921@gmail.com</a></li>
<li>📧 Email (Advisor): <a href="mailto:mohammadhossein.zamanian@kums.ac.ir">mohammadhossein.zamanian@kums.ac.ir</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ScrollMarksContainer-module__scrollMarksContainer__Eu7uU"> </div>
</div>
</div>
</div>
</div>
</div>
</div>