Skip to main content
Default path: register → connect → EventFrame → (optional) Cohort → .to_df().

Prerequisites

  • Python 3.10+
  • EncodeBox installed (pixi install or pip install encodebox)
  • Sample database running: pixi run db-up (PostgreSQL on port 5433)

Get started

1

Register and connect

Load the Sentinel mapping YAML, then open a connection bound to that connector. db.diagnosis / db.medication / … are domain tables.
2

Build an index with EventFrame

Find people with repeated E11* diagnoses spaced far enough apart, and treat the first qualifying visit as their index.
Inspect without running: print(index.to_sql()). Run: index.to_df().
3

Apply study criteria with Cohort

Start from the index cohort, keep demographics/enrollment rules, optionally require another event definition, exclude washout events, then look at attrition.

Shortcuts

Which API?

Full verb and criterion guide: Which API?.