[e988c2]: / tests / fixtures / good_definition_files / debug_definition.py

Download this file

11 lines (8 with data), 294 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# noqa: INP001
from ehrql import create_dataset, show
from ehrql.tables.core import patients
dataset = create_dataset()
show(dataset)
dataset.sex = patients.sex
dataset.define_population(patients.date_of_birth.is_on_or_after("2000-01-01"))
dataset.year_of_birth = patients.date_of_birth.year