resolve_date_time: Resolve DateTime

Description Usage Arguments Value

View source: R/characterise_episodes.R

Description

Many events in CC-HIC are stored in separate date and time columns/objects. This function attempts to reconcile and combine these times when possible. Of note, date and time information is not always stored with consistent rules. For example, death date and time, are often stored for every patient in every episode, even though the patient can only die once. The following are some date and time pairings that denote a singular event:

If a date or time component is missing, nothing is returned as the datetime cannot be accurately formed.

Usage

1
resolve_date_time(df = NULL, date_code = NULL, time_code = NULL)

Arguments

df

a table that contains columns for the date and time of interest

date_code

the column name for the date of interest

time_code

the column name for the time of interest

Value

a table with the correct datetime pairing for the codes given


CC-HIC/inspectEHR documentation built on Jan. 16, 2020, 11:24 p.m.