Back to demos

Crestline Health · Live Demo

xAPI Sandbox — allergy verification

A three-step micro-lesson that emits real xAPI statements into an in-browser mock LRS. The feed on the right is the exact payload that would hit a production LRS; the dashboard below is aggregated off the same stream.

Estimated time
90 sec
Spec
xAPI 1.0.3
LRS
In-browser mock
Status
Prototype

How it works

The left panel is a trimmed-down version of the allergy-verification moment from the EHR simulator — launch, decide, complete. Every action produces an xAPI 1.0.3 statement with a real actor, verb, and activity, and posts it to an in-browser mock LRS. The right panel is the raw statement feed; the dashboard at the bottom recomputes from that same stream every time a statement lands.

What's happening under the hood

  • launched fires when the learner starts — scoped with a contextActivities.parent pointing at the parent training.
  • answered captures the raw response with a duration in ISO 8601.
  • passed or failed is emitted right after, carrying score.scaled — the shape Kirkpatrick Level 2 reporting actually needs.
  • completed closes the session with completion: true.

Pointing it at a real LRS

The mock is a five-line shim — same shape as a real POST to /xapi/statements. To run it against an actual conformant LRS, spin up Yet Analytics SQL LRS with one Docker command, then swap mockLRS.post() for a fetch with Basic auth. The statement payload doesn't change.

What's next

  • Wire the EHR simulator's five-step flow to emit the same statement shape.
  • Add a cohort view — roll up statements across multiple learners to show real Level 2 reporting.
  • Document the Docker + xapi-js setup as a standalone how-to in Resources.