opensafely / vte-diagnoses-and-deaths

Study to describe the impact of COVID-19 on mortality related to venous thromboembolism in England
MIT License
1 stars 0 forks source link

Update `ons_deaths` table #12

Closed milanwiedemann closed 7 months ago

milanwiedemann commented 7 months ago

The ons_deaths table is now a PatientFrame (with one row per patient) so it is no longer needed to select one event per patient. The ons_deaths table now includes the earliest registered death for each patient. Only very few patients have multiple registered deaths so this change is very unlikely to impact the results of the study.

Also note that, although the variable in your code was named most_recent_death_date, you actually selected the latests registered death using .last_for_patient(). But as mentioned above, this is very unlikely to impact the results of the study.