lastnews_table: Get a table with the latest date for each patient
Description
This function search for date columns in every tables and returns the latest date
for each patient with the variable it comes from. Useful in survival analysis to get
the right censoring time.
the datasets/columns that should not be searched. Example: a scheduled visit for which the patient may have died before attending should not be considered.
with_ties
in case of tie, whether to return the first origin (FALSE) or all the origins that share this tie (TRUE).
numeric_id
set to FALSE if the patient ID column is not numeric
prefer
preferred origins in the event of a tie. Usually the followup table.
warn_if_future
whether to show a warning about dates that are after the extraction date