Skip to contents

Add columns based on value in IPDC column, which can be further split by Elective/Non-Elective CIJ.

Usage

add_ipdc_cols(episode_file, prefix, condition, ipdc_d = TRUE, elective = TRUE)

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

ipdc_d

Whether to create columns based on IPDC = "D" (lgl)

elective

Whether to create columns based on Elective/Non-Elective cij_pattype (lgl)