ecg.myneetpg.com · coming soon

ECG Mastery & Clinical Diagnosis

Interactive ECG teaching and a live diagnosis & MCQ arena. This page shows the build plan until the platform goes live.

STATUS · PLAN — BUILD IN PROGRESSHTTPS
Education onlyFor medical education and study purposes only; not for clinical decision-making.

1. Stack

Concern Choice
Build Vite 5 + TypeScript (strict). Same toolchain as BrainSurgery, and it works with Node 18 on the server
Traces Canvas 2D: paper grid, sweep (monitor) and scroll (paper) modes, 25/50 mm/s, gain 5/10/20 mm/mV, 1 mV calibration pulse
Teaching diagrams SVG: annotated beats, interval brackets, hexaxial axis wheel, territory maps
Audio Web Audio synthesis only: QRS beep, IEC-style alarms, S1/S2/S3/S4, rub, murmurs
State localStorage with a versioned schema (ecg.v1) and a migration chain
Language English only. All clinical text lives in the JSON data files, not in code
UI Plain DOM + CSS (no framework). Monitor dark mode and pink/red ECG-paper mode

2. Source layout

src/
  renderer/    grid, trace canvas (sweep/scroll), 12-lead layout, calipers, overlays, territory highlight
  waveforms/   beat synthesis, lead projection, rhythm engine (event timeline), noise/artifact, measurements
  teach/       waveform breakdown, systematic framework, deep-dives, mimics & traps, condition pages
  diagnosis/   live arena, timer/scoring, vitals + CLN scenarios, MCQ engine, spaced repetition
  ui/          shell, start/disclaimer, HUD readouts, hint drawer, analytics dashboard, settings
  audio/       monitor beep, alarms, auscultation synth, audio-rules gate
  data/        conditions/{arr,cnd,pcd,isc,met,str,axs,cln}.json (incl. names, explanations, pearls),
               mcq/*.json, schema.ts (validation)

3. Waveform engine — the core design

Morphology and rhythm are generated separately, so any rhythm can be combined with any morphology (e.g. AF + LBBB, or sinus + hyperkalaemia stage 3).

Beat morphology. A beat is a sum of shaped components: P, Q, R, S, R′, T, U, delta, J/Osborn and epsilon. Each component has an amplitude (mV), a centre (ms), a width, and a skew (asymmetric Gaussian or raised-cosine). ST is modelled as a segment with elevation at the J point, a slope and a shape (straight / concave / convex / coved / scooped / downsloping).

Twelve leads.

Rhythm engine. Produces an event timeline: atrial events, conduction (PR, blocked or conducted), and ventricular events (normal, aberrant, PVC, paced, escape, fusion). It supports:

Measurements. HR, PR, QRS, QT and QTc (Bazett and Fridericia) are computed from the generated timeline, not stored separately, so the readouts always match what is drawn.

4. Condition database (JSON, one file per category)

All IDs exactly as in the spec: ARR-01…24, CND-01…12, PCD-01…03, ISC-01…13, MET-01…10, STR-01…16, AXS-01…04, CLN-01…02. Each entry has:

{
  "id": "CND-07",
  "category": "CND",
  "rhythm": { "type": "sinus", "rate": [60, 90] },
  "morphology": { "qrs": { "width": 140 }, "leads": { "V1": { "pattern": "rsR'" }, "lateral": { "sSlur": true } } },
  "criteria": [{ "key": "qrs_ge_120", "threshold": "QRS ≥ 120 ms" }],
  "discriminators": ["..."],
  "mimics": ["CND-12", "ARR-23"],
  "audio": "none",           // or "split_S2", "S4", "rub", ...
  "vitals": { "pulse": true }
}

Each entry also carries its own name, clinical explanation, board pearls and rationale text. A schema validator runs at build time, so a malformed condition fails the build instead of breaking at runtime. Adding a condition means adding JSON only.

5. Part 1 — Teach

6. Part 2 — Live Diagnosis & MCQ Arena

7. Tools & HUD

8. Audio rules (enforced in one gate module)

9. Milestones (each runnable and deployed to ecg.myneetpg.com)

After each milestone: run the dev server, fix errors, deploy, and tell you what to test.

10. Honest limits