Skip to contents

Add standard columns (DoB, postcode, gpprac, episodes, cost) to episode file.

Usage

add_standard_cols(
  episode_file,
  prefix,
  condition,
  episode = FALSE,
  cost = FALSE
)

Arguments

episode_file

Tibble containing episodic data.

prefix

Prefix to add to related columns, e.g. "Acute"

condition

Condition to create new columns based on

episode

Whether to create prefix_episodes col, e.g. "Acute_episodes"

cost

Whether to create prefix_cost col, e.g. "Acute_cost"