add_death_date
add_death_date(
table,
cdm,
*,
index_date='cohort_start_date',
censor_date=None,
window=(0, float('inf')),
death_date_name='date_of_death',
)
Add date of death within window (only within same observation period as index_date).
Parameters
| table |
Any |
Ibis table with person_id or subject_id and index_date. |
required |
| cdm |
Cdm |
CDM reference (death, observation_period). |
required |
| index_date |
str |
Column name for index date (default “cohort_start_date”). |
'cohort_start_date' |
| censor_date |
str or None |
Optional censor date column name. |
None |
| window |
tuple |
(low, high) days from index_date (default (0, inf)). |
(0, float('inf')) |
| death_date_name |
str |
Output column name (default “date_of_death”). |
'date_of_death' |
Returns
|
ibis.expr.types.Table |
Table with date_of_death column (null if no death in window). |