Add HRI variables to an SLF Individual File
Usage
add_hri_variables(
data,
chi_variable = "anon_chi",
slf_pc_lookup = read_file(get_slf_postcode_path(), col_select = "postcode")
)
Arguments
- data
An SLF individual file.
- chi_variable
string, claiming chi or anon_chi.
- slf_pc_lookup
The Source postcode lookup, defaults to
get_slf_postcode_path()
read usingread_file()
.
Details
Filters the dataset to only include Scottish residents, then creates a lookup where HRIs are calculated at Scotland, Health Board, and LCA level. Then joins on this lookup by chi/anon_chi.
See also
Other individual_file:
add_acute_columns()
,
add_ae_columns()
,
add_all_columns()
,
add_at_columns()
,
add_ch_columns()
,
add_cij_columns()
,
add_cmh_columns()
,
add_dd_columns()
,
add_dn_columns()
,
add_gls_columns()
,
add_hc_columns()
,
add_hl1_columns()
,
add_ipdc_cols()
,
add_keep_population_flag()
,
add_mat_columns()
,
add_mh_columns()
,
add_nrs_columns()
,
add_nsu_columns()
,
add_ooh_columns()
,
add_op_columns()
,
add_pis_columns()
,
add_sds_columns()
,
add_standard_cols()
,
aggregate_ch_episodes()
,
clean_up_ch()
,
condition_cols()
,
create_individual_file()
,
flag_non_scottish_residents()
,
recode_gender()
,
remove_blank_chi()