cohort = (
eb.Cohort("t2dm", database=db)
.entry(index, index="first")
.include(db.demographic.age_at_index(18, 89))
.include(db.enrollment.covering_index(days_before=365, days_after=0))
.include(other_frame, window=(-365, 0))
.exclude(db.diagnosis.matching("C", match="starts_with"), window=(-365, 0))
)
print(cohort.attrition())
final = cohort.to_df()