time_off_intervention: Time off a specific intervention, within the first 28 days.

Description Usage Arguments Details Value

View source: R/encounter_metrics.R

Description

time_off_intervention returns the time an encounter has been off the specified intervention within the first 28 days.

Usage

1
2
time_off_intervention(enc_info_df, interventions_df, intervention_name,
  time_units)

Arguments

enc_info_df

data frame: provides the encounters of interest

  • chr: patient_id_encounter

  • POSIXct: Episode.Start.Timestamp

interventions_df

data frame: provides intervention events

  • chr: patient_id_encounter

  • chr: Variable.Name

  • POSIXct: Start.Time

  • POSIXct: End.Time

intervention_name

chr: names the intervention of interest

time_units

chr: time units to compute time difference in

Details

Computes time time off since the last event of the specified intervention, in the first 28 days, per encounter. Missing values are imputed with NAs, as encounters with no events of the specified interventions are assumed to not have had that intervention. The function currently works only for interventions that have both a start time and end time.

Value

data_frame:


jcasse/icueval documentation built on May 18, 2019, 9:20 p.m.