Calculate time span in days
calculate_days_ecu(
start_form = NULL,
startdate,
end_form = NULL,
enddate,
primary_form = NA,
pid
)
form which includes start date. NULL if one is not working across forms
vector of start dates of time span or column name within start_form containing date variable
form which includes end date. NULL if one is not working across forms
vector of end dates of time span or column name within end_form containing date variable
"start" if the time span will be merged to start_form. "end" if the time span will be merged to end_form. NA if one is not working across forms
column name of patient ID in trial_data
vector of duration of time span in days
TODO: consider using start_form_mnppid and end_form_mnppid instead of entire forms, see hap/40-core-analysis