CoolFace
Datasetpublic

mdsajjadullah/synthetic-medical-ehr-dataset

πŸ₯ Synthetic Privacy-Preserving Medical EHR Dataset Dataset Description A fully synthetic collection of 10,000 Electronic Health Records (EHRs) for binary classification research. The task is predicting adverse patient outcomes β€” deterioration or death β€” from clinical, demographic, and vital sign features. No real patient data was used at any stage. Privacy-safe under GDPR, CCPA, and HIPAA. Supported Tasks tabular-classification: Predict… See the full description on the dataset page: https://huggingface.co/datasets/mdsajjadullah/synthetic-medical-ehr-dataset.

sourceHugging Facecc-by-4.0updated 7mo agoView on Hugging Face
0likes27downloads
Dataset Card

πŸ₯ Synthetic Privacy-Preserving Medical EHR Dataset

Dataset Description

A fully synthetic collection of 10,000 Electronic Health Records (EHRs) for binary classification research. The task is predicting adverse patient outcomes β€” deterioration or death β€” from clinical, demographic, and vital sign features. No real patient data was used at any stage. Privacy-safe under GDPR, CCPA, and HIPAA.

Supported Tasks

  • β€”tabular-classification: Predict adverse_outcome (0/1) from 13 clinical features
  • β€”Benchmark models: Random Forest, Gradient Boosting, XGBoost
  • β€”Class imbalance handling: SMOTE oversampling applied on training set only
  • β€”Interpretability: SHAP feature importance included in generation pipeline

Dataset Structure

SplitFileRowsStrategy
traintrain.csv7,00070% stratified by target
validationval.csv1,50015% stratified by target
testtest.csv1,50015% stratified by target
fullfull_dataset.csv10,000Complete unsplit dataset

Data Fields

FieldTypeDescription
patient_idstringUUID-based anonymous ID (e.g. P-3FA2C1B8)
age_rangestringAge bucket: 0-17 / 18-29 / 30-44 / 45-59 / 60-74 / 75-99
age_midpointint32Midpoint of age bucket β€” used as numeric ML feature
genderstringMale / Female / Non-binary
ethnicitystringWhite / Black / Hispanic / Asian / Other
regionstringNorth / South / East / West / Central
icd10_codestringICD-10 primary diagnosis code
conditionstringHypertension, Diabetes, Cancer, etc.
severitystringMild / Moderate / Severe
onset_yearint32Year of diagnosis (2005–2025)
medicationstringPrimary prescribed medication
num_visitsint32Number of provider visits
adherence_pctint32Treatment adherence percentage 0–100
systolic_bpint32Systolic blood pressure in mmHg
diastolic_bpint32Diastolic blood pressure in mmHg
heart_rateint32Heart rate in beats per minute
cholesterolmgdlint32Total cholesterol in mg/dL
bmifloat32Body Mass Index
outcomestringRecovered / Stable / Deteriorated / Deceased
adverse_outcomeint32 TARGET1 = Deteriorated or Deceased, 0 = otherwise

Privacy Methods

This dataset was synthetically generated in Python. Privacy techniques applied:

  1. 1.Anonymization β€” UUID patient IDs, no real names or SSNs
  2. 2.Generalization β€” age buckets, region labels instead of cities
  3. 3.Differential Privacy β€” Laplace mechanism noise (epsilon=2.0) on all vital signs
  4. 4.Data Perturbation β€” Gaussian noise on continuous features

No real patient records were used or referenced at any stage.

Benchmark Results

ModelVal ROC-AUCAccuracyF1 AdverseCV 5-fold
Random Forest0.953589%0.820.9707 Β± 0.013
Gradient Boosting0.963090%0.840.9760 Β± 0.013
XGBoost (best)0.966591%0.850.9769 Β± 0.012
XGBoost (test)0.954290%0.85β€”

Use Cases

  • β€”Binary classification for healthcare outcome prediction
  • β€”Benchmarking tabular ML models without privacy risk
  • β€”Teaching SMOTE, scaling, hyperparameter tuning, SHAP
  • β€”Fairness analysis across demographic groups
  • β€”Differential privacy and privacy-preserving AI research

Citation

bibtex
@dataset{mdsajjadullah_2025_synthetic_ehr,
  author    = {Md.Sajjad Ullah},
  title     = {Synthetic Privacy-Preserving Medical EHR Dataset},
  year      = {2025},
  publisher = {Zenodo},
  version   = {5.0},
  doi       = {10.5281/zenodo.18968480},
  url       = {https://doi.org/10.5281/zenodo.18968480}
}