Process a single episode into a rectangular table with a timestamp column instead of the usual difftime since admission. The timestamp column corresponds to the exact timestamp of the event of interest. This is particularly useful for when you need to combine episodes into spells. Take care around times of clock change. This is similar to setting the `cadence` argument to 0, however the time column returned is an actualy datetime stamp.

process_item_timestamp(df, var_name, metadata, params)

Arguments

df

a data table with column names as for the EAV style database tables employed in CC-HIC. The table must contain data only for one dataitem (e.g. have only a single unique `code_name`) and for a single episode (e.g. have only a single unique `episode_id`)

var_name

character string of length 1 containing the code_name to be processed

metadata

a table containing metadata. Can be found within the package in the `.variables` object

params

a table containing exactly 3 columns called: code_name, short_name and coalesce_rows. The coalesce rows column should contain a summary function which is used when duplicate row level data is present.