File size: 25,532 Bytes
09f5020
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
---
license: cc-by-nc-4.0
task_categories:
- tabular-classification
- tabular-regression
- time-series-forecasting
tags:
- synthetic-data
- healthcare
- cardiology
- coronary-artery-disease
- cad
- stable-angina
- unstable-angina
- acute-coronary-syndrome
- acs
- nstemi
- stemi
- post-pci
- post-cabg
- ccs-class
- canadian-cardiovascular-society
- angina-classification
- syntax-score
- ffr
- fractional-flow-reserve
- ifr
- pci
- percutaneous-coronary-intervention
- cabg
- coronary-artery-bypass-graft
- stent
- des
- drug-eluting-stent
- bms
- bare-metal-stent
- everolimus
- ees
- door-to-balloon
- d2b
- timi-flow
- killip
- killip-kimball
- grace-score
- timi-risk-score
- saq
- seattle-angina-questionnaire
- ischemia-trial
- courage
- syntax-trial
- freedom
- ncdr-action
- ncdr-cathpci
- sts-database
- adult-cardiac-surgery
- ccta
- coronary-ct-angiography
- nuclear-stress-test
- spect-mpi
- mibi
- duke-treadmill
- echocardiography
- lvef
- ejection-fraction
- hfref
- hfpef
- rwma
- troponin
- ck-mb
- bnp
- nt-probnp
- crp
- ldl
- lp-a
- statin
- pcsk9
- evolocumab
- alirocumab
- sglt2-inhibitor
- ace-inhibitor
- arb
- beta-blocker
- dapt
- aspirin
- ticagrelor
- clopidogrel
- prasugrel
- mace
- in-stent-restenosis
- isr
- graft-patency
- lima
- left-internal-mammary-artery
- euroscore-ii
- sts-score
- agatston
- calcium-score
- plaque-burden
- tcfa
- napkin-ring-sign
- ehr-synthetic
- longitudinal-cohort
- clinical-trial-simulation
pretty_name: HCCAR005  Synthetic Coronary Artery Disease Dataset (Sample)
size_categories:
- 1K<n<10K
configs:
- config_name: default
  data_files: hccar005_dataset.parquet
---

# HCCAR005 — Synthetic Coronary Artery Disease Dataset (Sample Preview)

**XpertSystems.ai | Synthetic Data Factory | Healthcare / Cardiology Vertical**

A **longitudinal coronary artery disease (CAD) patient dataset** spanning
the full spectrum from subclinical disease through acute coronary
syndromes through post-revascularization follow-up. 150 patients across
**7 CAD stages** (Subclinical, Stable Angina, Unstable Angina, NSTEMI,
STEMI, Post-PCI, Post-CABG) followed annually for 10 years — yielding
1,500 visit-level records with 140 features per row covering:

- **CAD anatomy** (3-vessel stenosis %, **FFR per vessel + iFR**, SYNTAX
  score, plaque burden, lesion length, MLA, Agatston calcium score,
  plaque type including TCFA)
- **Angina assessment** (CCS class, angina frequency/duration/trigger,
  nitroglycerin response, NYHA functional class, **Seattle Angina
  Questionnaire 5 domains**, Duke treadmill score, stress test results
  + modality)
- **ACS events** (door-to-balloon, TIMI flow pre/post, thrombus burden,
  Killip class, GRACE score, TIMI risk score)
- **Biomarkers** (Troponin I/T, CK-MB, BNP/NT-proBNP, CRP, visit-level
  LDL/HDL/Trig with statin effect)
- **Interventions** (PCI with DES_EES/BMS, stent type/length/diameter,
  num_stents, post-PCI FFR/MLA, contrast volume, radiation dose; OR
  CABG with graft count, LIMA usage, pump time, cross-clamp time;
  procedural success flag)
- **Imaging** (echo LVEF/LVEDV/LVESV, RWMA + territory, E/e', LAVI;
  CCTA plaque volume + napkin-ring sign; nuclear stress SSS/SDS)
- **Medications** (DAPT with P2Y12 selection and duration, statin
  intensity, beta-blocker, ACEi/ARB, **SGLT2i, PCSK9i**, anticoagulant)
- **Outcomes** (MACE flag + component, time-to-MACE, target vessel
  revascularization, in-stent restenosis, graft patency, 30-day
  readmission, CV death, all-cause mortality, LVEF change)

Calibrated benchmark-first against **ACC/AHA Stable CAD Guidelines**
(Fihn et al.), **SYNTAX Trial** (Mohr et al., Serruys et al.), **COURAGE**
(Boden et al.), **ISCHEMIA Trial** (Maron et al. 2020), **FREEDOM Trial**
(Farkouh et al.), **4th Universal Definition of MI (2018)**,
**Killip-Kimball (1967)**, **NCDR ACTION + CathPCI Registries**, **STS
Adult Cardiac Surgery Database**, **GRACE Registry** (Granger et al.
2003), **TIMI Risk Score** (Antman et al. 2000), **Seattle Angina
Questionnaire** (Spertus et al. 1995), and **KDIGO 2012** CKD staging.

This is the **sample preview** — 150 patients × 10 annual visits over
10 years (1,500 visit records, ~1.1 MB). The full product covers
10,000+ patients with extended procedural detail, full medication
titration trajectories, multi-imaging modality co-occurrence, and
pre-built scenario configs for **ISCHEMIA replication, FREEDOM
DM-CAD cohort, COURAGE invasive vs OMT, EXCEL-style left-main
PCI-vs-CABG, and BIOFLOW-V stent comparison studies**.

---

## Dataset summary

| Table | Rows (sample) | What it contains |
|---|---:|---|
| `hccar005_dataset` | 1,500 | One row per patient × annual visit. 140 features across 8 clinical modules (baseline carried forward + angina + ACS + biomarkers + intervention + imaging + medications + outcomes). 150 unique patients × 10 annual visits each |

Provided in **CSV** and **Parquet**. Aggregate to patient level via
`groupby('patient_id')` for cross-sectional analysis. Use baseline
visit (`visit_number == 1`) for cohort entry analysis.

---

## Calibration sources

All ten validation metrics target named clinical / registry standards:

- **ACC/AHA Stable Ischemic Heart Disease Guidelines** (Fihn et al.
  2012; 2014 Focused Update) — CCS class definitions, GDMT framework
- **ACC/AHA STEMI / NSTE-ACS Guidelines** (Levine et al. 2015; Amsterdam
  et al. 2014) — D2B targets, primary PCI criteria
- **SYNTAX Trial / Score** (Sianos et al. 2005; Mohr et al. 2013) —
  SYNTAX scoring system, PCI vs CABG decision thresholds (≥33: CABG
  preferred; 23-32: Heart Team; <22: PCI acceptable)
- **COURAGE Trial** (Boden et al. 2007) — invasive vs OMT framework
- **ISCHEMIA Trial** (Maron et al. 2020) — stable CAD invasive vs OMT
- **FREEDOM Trial** (Farkouh et al. 2012) — DM-CAD revascularization
- **EXCEL Trial** (Stone et al. 2016) — left main PCI vs CABG
- **4th Universal Definition of MI** (Thygesen et al. 2018) — STEMI/
  NSTEMI classification, troponin kinetics
- **Killip-Kimball (1967)** — AMI hemodynamic classification
- **GRACE Registry** (Granger et al. 2003) — in-hospital mortality
  prediction, score range [0, 372]
- **TIMI Risk Score** (Antman et al. 2000) — 0-7 point UA/NSTEMI score
- **Seattle Angina Questionnaire** (Spertus et al. 1995) — 5-domain
  patient-reported angina assessment (0-100 scale)
- **CCS Functional Classification** — angina severity 0-4
- **NCDR ACTION + CathPCI** — door-to-balloon, stent attribute
  reporting standards
- **STS Adult Cardiac Surgery Database** — CABG quality measures,
  graft count, LIMA usage, pump/cross-clamp times
- **EuroSCORE II + STS Mortality Risk** — surgical risk stratification
- **KDIGO 2012** — CKD eGFR-based staging

---

## Validation scorecard (seed = 42)

10/10 PASS · **Grade A+ (100%)** across all six canonical seeds (42, 7, 123, 2024, 99, 1).

| # | Metric | Observed | Target | Tol | Type | Source |
|---|---|---:|---:|---:|---|---|
| 1 | `prior_cabg_flag_equals_post_cabg_stage_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | Structural |
| 2 | `prior_mi_requires_acs_or_post_stage_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | ACS history consistency |
| 3 | `door_to_balloon_in_stemi_only_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | NCDR ACTION |
| 4 | `d2b_met_flag_matches_d2b_under_90_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | ACC/AHA STEMI |
| 5 | `pci_stent_attributes_consistent_with_arm_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | NCDR CathPCI |
| 6 | `cabg_attributes_consistent_with_arm_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | STS Database |
| 7 | `hfref_flag_matches_lvef_under_40_rate` | 0.999 | 0.99 | ±0.01 | FLOOR | ACC/AHA HF |
| 8 | `cv_death_implies_mortality_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | Survival monotonicity |
| 9 | `mace_component_matches_mace_flag_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | MACE composite |
| 10 | `risk_scores_in_published_ranges_rate` | 1.000 | 0.99 | ±0.01 | FLOOR | Multiple guidelines |

---

## Schema highlights (140 cols total)

### Identity & visit (6 cols)
`patient_id` (HC-CAR-XXXXXXX), `site_id`, `visit_number` (1-10),
`visit_date`, `age_at_visit`, `years_from_baseline`.

### Patient baseline (49 cols)
`cad_stage` (Subclinical / StableAngina / UnstableAngina / NSTEMI /
STEMI / PostPCI / PostCABG), `sex`, `age_at_baseline`, `bmi`,
`systolic_bp_mmhg`, `heart_rate_bpm`, `smoking_history`,
**comorbidities** (`diabetes_flag`, `hypertension_flag`,
`hyperlipidemia_flag`, `ckd_flag`, `ckd_stage`, `heart_failure_flag`,
`afib_flag`, `pad_flag`, `prior_mi_flag`, `prior_pci_flag`,
`prior_cabg_flag`), `egfr_ml_min_1_73m2`, `creatinine_mg_dl`,
**baseline lipids** (`ldl_mg_dl`, `hdl_mg_dl`, `triglycerides_mg_dl`,
`lp_a_nmol_l`, `hba1c_pct`, `hemoglobin_g_dl`), **CAD anatomy**
(`num_vessels_diseased`, `lm_disease_flag`, `syntax_score`,
`culprit_vessel`, `stenosis_pct_lad`, `stenosis_pct_lcx`,
`stenosis_pct_rca`, `ffr_lad`, `ffr_lcx`, `ffr_rca`, `ifr_value`,
`plaque_burden_pct`, `lesion_length_mm`, `reference_vessel_diameter_mm`,
`mla_mm2`, `calcium_score_agatston`, `plaque_type`,
`annual_stenosis_progression_pct`), `intervention_arm` (OMT / PCI_BMS /
PCI_DES / CABG / Hybrid), `euroscore_ii`, `sts_score_mortality_pct`.

### Angina (16 cols)
`angina_class_ccs` (0-4), `angina_type` (Stable / Unstable / Silent /
Mixed), `angina_frequency_per_week`, `angina_duration_min`,
`angina_trigger`, `nitroglycerin_response`, `dyspnea_nyha_class` (1-4),
`ischemic_burden_pct_lv`, `stress_test_result`, `duke_treadmill_score`,
`stress_test_modality`, **SAQ 5 domains** (`saq_physical_limitation`,
`saq_angina_stability`, `saq_angina_frequency`,
`saq_treatment_satisfaction`, `saq_quality_of_life`).

### ACS (10 cols)
`acs_type` (None / UA / NSTEMI / STEMI), `symptom_onset_to_door_min`,
`door_to_balloon_min`, `door_to_balloon_met_flag`, `thrombus_burden`,
`timi_flow_pre` (0-3), `timi_flow_post` (0-3), `killip_class` (1-4),
`grace_score` (0-372), `timi_risk_score` (0-7).

### Biomarkers (9 cols)
`troponin_i_ng_ml`, `troponin_t_ng_ml`, `ck_mb_ng_ml`, `bnp_pg_ml`,
`nt_probnp_pg_ml`, `crp_mg_l`, `ldl_mg_dl_visit`, `hdl_mg_dl_visit`,
`triglycerides_mg_dl_visit`.

### Intervention (15 cols)
`intervention_type`, `pci_target_vessel`, `stent_type` (DES_EES / BMS),
`stent_length_mm`, `stent_diameter_mm`, `post_pci_ffr`,
`post_pci_mla_mm2`, `num_stents_deployed`, `total_stent_length_mm`,
`cabg_grafts`, `lima_used_flag`, `cabg_pump_time_min`,
`cabg_xclamp_time_min`, `contrast_volume_ml`,
`radiation_dose_kerma_mgy`, `procedural_success_flag`.

### Imaging (13 cols)
`echo_lvef_pct`, `echo_lv_edv_ml`, `echo_lv_esv_ml`, `echo_rwma_flag`,
`echo_rwma_territory`, `echo_e_e_prime_ratio`, `echo_lavi_ml_m2`,
`lvef_hfref_flag`, `ccta_plaque_volume_mm3`, `ccta_napkin_ring_flag`,
`nuclear_sss`, `nuclear_sds`, `nuclear_lvef_stress_pct`.

### Medications (12 cols)
`aspirin_flag`, `p2y12_inhibitor` (Ticagrelor / Clopidogrel / Prasugrel
/ None), `dapt_duration_months`, `statin_flag`, `statin_intensity`
(None / Low / Moderate / High), `beta_blocker_flag`, `ace_arb_flag`,
`sglt2_inhibitor_flag`, `pcsk9_inhibitor_flag`, `nitrate_use_flag`,
`anticoagulant_use`, `medication_adherence_pct`.

### Outcomes (11 cols)
`mace_event_flag`, `mace_component` (MI / Stroke / CV_Death /
HF_Hospitalization / None), `time_to_mace_days`,
`target_vessel_revascularization_flag`, `in_stent_restenosis_flag`,
`graft_patency_flag`, `hospitalization_cv_flag`,
`readmission_30d_flag`, `mortality_flag`, `cv_death_flag`,
`lvef_change_pct`.

---

## Suggested use cases

- **SYNTAX Score → revascularization strategy ML** — train a Heart-
  Team-style classifier (PCI vs CABG vs OMT) from SYNTAX score, LM
  involvement, comorbidities, EuroSCORE II, STS score
- **FFR / iFR-guided PCI candidate selection** — classifier for
  significant ischemia (FFR ≤ 0.80) from angiographic features
- **CCTA plaque characterization ML** — predict TCFA (TCFA flag in
  plaque_type) and napkin-ring sign from CCTA volume features
- **In-stent restenosis prediction** — classifier for `in_stent_restenosis_flag`
  from stent characteristics, lesion features, DM status (DES vs BMS
  comparison)
- **Door-to-balloon prediction & quality improvement** — predict D2B
  time from arrival pattern features; useful for NCDR ACTION quality
  benchmarking
- **GRACE / TIMI risk score validation** — train ML to reproduce or
  improve published risk models
- **DAPT duration optimization** — uplift modeling for prolonged vs
  short DAPT given DAPT score, bleeding risk, stent type
- **MACE survival ML** — Cox / random survival forest on
  `mace_event_flag` + `time_to_mace_days` with right-censoring
- **CABG graft patency prediction** — model `graft_patency_flag`
  from LIMA usage, pump time, baseline LVEF
- **HFrEF post-MI prediction** — classifier for `lvef_hfref_flag`
  from baseline + intervention features
- **Statin response prediction** — model `ldl_mg_dl_visit` from
  baseline LDL + statin intensity (50% reduction for non-OMT vs
  15% for OMT in this generator)
- **PCSK9i candidate identification** — predict `pcsk9_inhibitor_flag`
  prescribing patterns for population health intervention
- **SAQ-based outcome prediction** — train regressors for the 5 SAQ
  domains (physical limitation, frequency, stability, treatment
  satisfaction, QoL) from clinical features
- **Procedural success prediction** — classifier for
  `procedural_success_flag` in PCI (post-PCI FFR ≥ 0.80) vs CABG
- **Cardio-renal-metabolic phenotyping** — unsupervised clustering
  on comorbidity + biomarker patterns
- **ISCHEMIA / COURAGE cohort simulation** — filter to specific
  eligibility criteria (stable angina, no LM disease, etc.) and
  simulate trial cohorts

---

## Loading examples

```python
from datasets import load_dataset

ds = load_dataset("xpertsystems/hccar005-sample", split="train")
print(ds.shape)
```

```python
import pandas as pd
from huggingface_hub import hf_hub_download

df = pd.read_parquet(hf_hub_download(
    "xpertsystems/hccar005-sample", "hccar005_dataset.parquet",
    repo_type="dataset",
))

# Patient-level cohort distribution
print(df.drop_duplicates("patient_id")["cad_stage"]
      .value_counts(normalize=True).round(3))
```

```python
# SYNTAX score → revascularization strategy
import pandas as pd
from huggingface_hub import hf_hub_download

df = pd.read_parquet(hf_hub_download(
    "xpertsystems/hccar005-sample", "hccar005_dataset.parquet",
    repo_type="dataset",
))

patients = df.drop_duplicates("patient_id")

# Heart Team-style decision validation
syntax_tier = pd.cut(patients["syntax_score"],
                     bins=[0, 22, 32, 60],
                     labels=["Low (<23)", "Intermediate (23-32)", "High (≥33)"])
print(pd.crosstab(syntax_tier, patients["intervention_arm"], normalize="index").round(2))
```

```python
# DES vs BMS in-stent restenosis comparison
import pandas as pd
from huggingface_hub import hf_hub_download

df = pd.read_parquet(hf_hub_download(
    "xpertsystems/hccar005-sample", "hccar005_dataset.parquet",
    repo_type="dataset",
))

# First-year PCI cohort
pci_v1 = df[(df["intervention_arm"].isin(["PCI_DES", "PCI_BMS"])) & (df["visit_number"] == 1)]
print("ISR rate by stent type:")
print(pci_v1.groupby("intervention_arm").agg(
    n=("patient_id", "count"),
    isr_rate_pct=("in_stent_restenosis_flag", lambda x: x.mean() * 100),
    mean_stent_length=("stent_length_mm", "mean"),
    procedural_success_pct=("procedural_success_flag", lambda x: x.mean() * 100),
).round(2))
```

```python
# Seattle Angina Questionnaire (SAQ) by CCS class
import pandas as pd
from huggingface_hub import hf_hub_download

df = pd.read_parquet(hf_hub_download(
    "xpertsystems/hccar005-sample", "hccar005_dataset.parquet",
    repo_type="dataset",
))

saq_cols = ["saq_physical_limitation", "saq_angina_frequency",
            "saq_angina_stability", "saq_treatment_satisfaction",
            "saq_quality_of_life"]
print("SAQ domains by CCS class (mean):")
print(df.groupby("angina_class_ccs")[saq_cols].mean().round(1))
```

```python
# MACE event analysis (aggregate to patient-level)
import pandas as pd
from huggingface_hub import hf_hub_download

df = pd.read_parquet(hf_hub_download(
    "xpertsystems/hccar005-sample", "hccar005_dataset.parquet",
    repo_type="dataset",
))

# Per-patient any-MACE flag over follow-up
patient_outcomes = df.groupby("patient_id").agg(
    any_mace=("mace_event_flag", "max"),
    any_mortality=("mortality_flag", "max"),
    cv_death=("cv_death_flag", "max"),
    arm=("intervention_arm", "first"),
    syntax=("syntax_score", "first"),
)
print("MACE rates by intervention arm:")
print(patient_outcomes.groupby("arm").agg(
    n=("any_mace", "count"),
    any_mace_pct=("any_mace", lambda x: x.mean() * 100),
    mortality_pct=("any_mortality", lambda x: x.mean() * 100),
    mean_syntax=("syntax", "mean"),
).round(2))
```

---

## Limitations and honest disclosures

This sample is calibrated for **structural fidelity, not bit-exact reproduction
of any specific CAD registry archive.** Specifically:

- **Visit-level outcomes (MACE, mortality, ISR, graft patency, readmission)
  are FRESH RANDOM SAMPLES per visit**, NOT cumulative carry-forward. The
  same patient can have `mace_event_flag=1` at visit 3 and `mace_event_flag=0`
  at visit 7 (with the visit 3 event implicitly recovered from). For
  patient-level event analysis, use `groupby('patient_id').max()` on
  the binary outcome flags.
- **MACE per-visit rate (~13-14%) compounds over 10 visits to very high
  cumulative rates** — patient-level any-MACE will exceed real-world
  CAD cohort 5-year MACE (~15-25%). Disclosed; for absolute-rate
  calibration use the full product or scale down per-visit hazard.
- **Imaging (echo LVEF, RWMA, CCTA, nuclear stress) is computed for ALL
  visits regardless of clinical indication.** In real practice, serial
  imaging is reserved for clinical change or pre-procedure planning.
  Treat as "what the result would be if imaging were performed."
- **Patient baseline is FIXED at visit 1** (cad_stage, comorbidities,
  intervention_arm, baseline lipids, baseline anatomy). The generator
  does NOT model CAD progression to higher-stenosis or stage transitions
  longitudinally. For genuine CAD progression ML, augment with a
  trajectory model.
- **ACS events fire ONLY at visit 1** (the index visit). The generator
  does NOT model NEW ACS events at later visits — every visit_number > 1
  has `acs_type = 'None'`. For longitudinal ACS incidence ML, use the
  full product or augment with a recurrent-event model.
- **Stent fields are populated ONLY at visit 1 for PCI patients.** They
  are NOT carried forward to follow-up visits — `stent_type`, `stent_length_mm`,
  `num_stents_deployed`, `post_pci_ffr` are all NaN at visits 2-10 even
  for PCI patients. For longitudinal PCI follow-up modeling, join the
  visit-1 stent data to all subsequent visits manually.
- **CABG fields similarly populated only at visit 1**, and the `Hybrid`
  intervention arm goes through the PCI path in the generator (so
  `cabg_grafts` is NaN for Hybrid patients despite the arm label
  including "CABG").
- **The generator has a `hasattr(p, 'angina_class_ccs')` check** in the
  imaging module (line 505) that ALWAYS returns False because `p` is a
  dict (not an object with attributes). So `nuclear_sss` calculation
  never incorporates CCS — it always falls through to the default
  N(10, 6) distribution. Disclosed; if SSS-vs-CCS correlation matters
  for your ML, augment.
- **eGFR uses a simplified formula** — the lambda
  `creatinine = clip(9.5 / egfr, 0.5, 5.0)` (line 112) is the INVERSE
  derivation (creatinine from eGFR, not eGFR from creatinine). It is
  approximately correct (consistent with simplified CKD-EPI without
  sex/age/race), but NOT the full published formula. For accurate eGFR
  research, recompute from creatinine + age + sex + race using the
  modern 2021 NKF-ASN refit.
- **HCCAR005 lacks racial/ethnic information** — the generator does
  not assign race/ethnicity (unlike HCCAR001 / HCCAR003 / HCCAR004).
  Disparities research will need augmentation.
- **GRACE score formula is simplified** — the generator uses
  `grace = 20 + age*1.4 + killip*10 + (30 if STEMI) + ck*8`
  (line 330) as an approximation, NOT the full Granger et al. 2003
  logistic regression with all 8 published variables. Values are in
  the published range [0, 372] but absolute calibration differs from
  GRACE 2.0. Use for relative risk stratification, not absolute
  in-hospital mortality probability.
- **Statin lipid effect is FIXED** at 50% LDL reduction for non-OMT
  patients and 15% for OMT patients (line 382). Real-world response
  varies widely (Rosuvastatin 40mg ~55%, Atorvastatin 80mg ~52%,
  Pravastatin 20mg ~24%). The `statin_intensity` field (None / Low /
  Moderate / High) is randomly assigned and NOT linked to the LDL
  reduction magnitude. For statin response ML, augment with intensity-
  specific effects.
- **PCSK9i prescribing is independent of LDL response** in the
  generator. Real-world PCSK9i is reserved for patients failing to
  reach LDL goals on maximally tolerated statin + ezetimibe. The
  generator fires `pcsk9_inhibitor_flag` at 15% baseline rate if
  LDL > 100, ignoring statin trial.
- **Time-to-MACE is a Weibull sample** with shape=1.8, scale=2000 days
  (line 598), NOT linked to actual visit when MACE was flagged. Use
  the visit-level `mace_event_flag` for incident analysis, not
  `time_to_mace_days` for survival models.
- **CSV serialization converts None to NaN** when reading via
  `pd.read_csv` default behavior. Use `keep_default_na=False` or work
  with the Parquet file (which preserves nullable types correctly).
- **ISCHEMIA / COURAGE eligibility is NOT enforced** — the generator
  produces a heterogeneous CAD cohort. Filter to your own inclusion
  criteria for trial-replication ML.

The full HCCAR005 product addresses these by genuine CAD progression
modeling (stenosis evolution, stage transitions), longitudinal stent
carry-forward, recurrent ACS event modeling, full CKD-EPI 2021 formula,
race/ethnicity assignment with disparities encoding, intensity-specific
statin response curves, PCSK9i trial-stepped prescribing, and pre-built
scenario configs (ISCHEMIA replication, COURAGE invasive-vs-OMT,
FREEDOM DM-CAD, EXCEL left-main PCI-vs-CABG, BIOFLOW-V stent
comparison). Contact us for the licensed commercial release.

---

## Companion datasets

This is the fifth SKU in our **Healthcare / Cardiology** vertical. The
five-SKU set now covers the full cardiology clinical continuum:

- [**HCCAR001**](https://huggingface.co/datasets/xpertsystems/hccar001-sample)
  Heart Failure Dataset — chronic HF with GDMT and devices
- [**HCCAR002**](https://huggingface.co/datasets/xpertsystems/hccar002-sample)
  Acute MI Dataset — STEMI/NSTEMI/UA with serial troponin kinetics
- [**HCCAR003**](https://huggingface.co/datasets/xpertsystems/hccar003-sample)
  Hypertension Dataset — longitudinal HTN cohort with ABPM, GDMT, MACE
- [**HCCAR004**](https://huggingface.co/datasets/xpertsystems/hccar004-sample)
  Atrial Fibrillation Dataset — CHA2DS2-VASc/HAS-BLED, DOACs, ablation
- [**HCCAR005**](https://huggingface.co/datasets/xpertsystems/hccar005-sample)
  Coronary Artery Disease Dataset (you are here) — full spectrum from
  subclinical CAD through acute events through revascularization

**Pair HCCAR005 + HCCAR002** for acute-on-chronic CAD (HCCAR002 has the
serial troponin detail; HCCAR005 has the longitudinal trajectory).
**Pair HCCAR005 + HCCAR001** for ischemic cardiomyopathy progression.
**Pair HCCAR005 + HCCAR003** for HTN-driven CAD progression studies.

- [**Healthcare / Neurology**](https://huggingface.co/xpertsystems) (10 SKUs)
- [**Insurance & Risk**](https://huggingface.co/xpertsystems) (10 SKUs)
- [**Energy & Climate**](https://huggingface.co/xpertsystems) (8 SKUs)
- [**Manufacturing**](https://huggingface.co/xpertsystems) (10 SKUs)
- [**Oil & Gas**](https://huggingface.co/xpertsystems) (17 SKUs)

For the broader catalog, see https://huggingface.co/xpertsystems

---

## Citation

```bibtex
@dataset{xpertsystems_hccar005_sample_2026,
  author       = {XpertSystems.ai},
  title        = {HCCAR005 Synthetic Coronary Artery Disease Dataset (Sample Preview)},
  year         = 2026,
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/datasets/xpertsystems/hccar005-sample}
}
```

---

## Contact

- **Web:** https://xpertsystems.ai
- **Email:** pradeep@xpertsystems.ai
- **Full product catalog:** Cardiology (5 SKUs), Neurology (10 SKUs),
  Insurance & Risk (10 SKUs), Energy & Climate (8 SKUs), Manufacturing
  (10 SKUs), Oil & Gas (17 SKUs), and more.

**Sample License:** CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0)
**Full product License:** Commercial — please contact for pricing.

**Important medical disclaimer:** This dataset contains SYNTHETIC patient
records only. No data was derived from any real patient, EHR archive,
or clinical registry. The dataset is intended for ML model development,
benchmarking, and education — NOT for clinical decision support, patient
counseling, or medical research conclusions. All clinical thresholds
(SYNTAX score tiers, D2B target, HFrEF definition, CCS classification,
revascularization criteria) are sourced from published guidelines;
users are responsible for verifying against current ACC/AHA/ESC/STS
guidelines for clinical applications.