matching(codes, code_type=…, match=…) | Filter by code / type / match mode |
in_position("primary") | Primary / secondary diagnosis |
occurring(at_least=…, at_most=…, gap_days=…) | Patient-level occurrence + consecutive gaps |
with_index_date() | Add index_date |
first_per_patient() / last_per_patient() | One row per patient |
between(...) / in_years(...) | Calendar filters |
with_age(...) / with_followup(...) | Attach derived columns |
union(other) | Stack event streams |
label("name") | Name a step for repr / attrition |
to_sql() / to_df() / explain() | Inspect / run |