# ECG Snap Dx: Data Sources and Selection

The 111 teaching strips are plotted directly from recorded ECG samples, not drawn from an artificial beat template. Each case is 10 seconds long, shown as two consecutive five-second rows of lead MLII. The paper proportions correspond to 25 mm/s and 10 mm/mV; on-screen millimetres depend on display and zoom.

## Dataset and Attribution

MIT-BIH Arrhythmia Database, version 1.0.0, PhysioNet.

- Dataset: https://physionet.org/content/mitdb/1.0.0/
- DOI: https://doi.org/10.13026/C2F305
- License: Open Data Commons Attribution License 1.0: https://physionet.org/content/mitdb/view-license/1.0.0/
- Annotation definitions: https://physionet.org/physiobank/database/html/mitdbdir/intro.htm
- Moody GB, Mark RG. The impact of the MIT-BIH Arrhythmia Database. IEEE Engineering in Medicine and Biology Magazine. 2001;20(3):45-50. https://doi.org/10.1109/51.932724
- Goldberger AL, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation. 2000;101(23):e215-e220. https://doi.org/10.1161/01.CIR.101.23.e215

Downloaded from PhysioNet's public file mirror. The digital signal checksum in each WFDB header was verified before selection. Source recordings and runtime dependencies are not required on the production server.

## What Is Preserved

Original 360 Hz samples, beat timing, QRS morphology and ADC amplitude calibration are retained. A constant median DC offset is removed solely to centre each ten-second recording on the paper. There is no beat synthesis, smoothing, temporal interpolation, or waveform replacement. SVG is only a scalable display format for those samples.

Every case in `assets/data/ecg_snapdx_cases.json` identifies the record, sample range, sample rate, lead, original rhythm annotation, complete beat annotations, waveform SHA-256 and rendered strip SHA-256. Evidence appears after an answer. The source record is deliberately not displayed as a diagnostic hint beforehand.

## Selection and Labels

37 windows per difficulty, 111 in total. The nine represented interpretations are normal sinus rhythm, sinus bradycardia, sinus tachycardia, atrial fibrillation, atrial flutter, sinus rhythm with PACs, sinus rhythm with PVCs, ventricular bigeminy, and ventricular trigeminy. Difficulty is a teaching choice, not a clinical severity classification.

- Windows stay inside a single source rhythm interval, with a margin around transitions.
- Explicit in-window noise, unclassified beats, blocked atrial beats, paced beats, and partial ectopic complexes at the edges are excluded.
- Sinus examples require an N rhythm label and only N beats; rate defines bradycardia/tachycardia. R-R variability alone never establishes sinus rhythm or AF.
- AF and flutter require the corresponding AFIB/AFL rhythm annotation.
- Isolated PAC/PVC examples require the relevant A/V beat annotation in an N rhythm interval.
- Bigeminy/trigeminy examples require both the B/T rhythm annotation and the matching repeating ventricular beat pattern.
- No overlapping windows are included. Recent runs are tracked locally to avoid repeated examples across three consecutive completed games when the selected pool permits.

The N beat symbol describes ventricular morphology; it does not itself prove sinus rhythm. A single lead is insufficient for many complete ECG diagnoses, including axis, ischemia, or precise tachycardia mechanism. Do not infer a diagnosis that is not present in the source annotation.

These selected teaching windows have not received an additional independent clinician review. Original annotations provide traceability, not a claim that every teaching interpretation is infallible. Before use in a formal curriculum, a qualified clinician should review the selected windows and their educational framing.

## Reproduction

Run `python tools/build_ecg_bank.py /path/to/mitdb` with `wfdb` and `numpy` installed. The script verifies source checksums and reproduces the case bank and strips deterministically. Keep raw `.dat`, `.hea`, and `.atr` files outside the public web directory.
