process_item: Process single item

View source: R/extract_timevarying.R

process_itemR Documentation

Process single item

Description

Takes a table in the EAV style for a single patient and a single data item and transforms it into a tidy format

Usage

process_item(df, var_name, metadata, start_time, cadence, 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

start_time

datetime of the episode start

cadence

numeric scalar indicating the table base resolution

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.


DocEd/wranglEHR documentation built on May 28, 2022, 1:50 p.m.