Skip to contents

Generate a plot of healthcare utilization for a single patient using their visit data.

Usage

plot_visit_hcu(
  ds,
  patient,
  window_size = 365,
  min_utilization = NULL,
  event_markers = TRUE
)

Arguments

ds

A PicnicHealth data set list object.

patient

A single person_id of the individual to be plotted.

window_size

A numeric value for the length of the rolling window in days. Default is 365.

min_utilization

The y-intercept for a horizontal line on returned plot.

event_markers

A boolean which defaults to TRUE to include markers for each event are added to the returned plot or no markers if FALSE.

Value

A ggplot with time along the x-axis and healthcare utilization on the y-axis.

Details

See get_observation_periods() and vignette("observation_periods") for details on what healthcare utilization is and how it is calculated. plot_visit_hcu is a convenience function provided by PicnicHealth, and is not guaranteed to be maintained.

Examples

if (FALSE) { # \dontrun{
example_patient <- ds$person$person_id[1]
plot_visit_hcu(ds, example_patient, window_size = 365)
} # }