Skip to contents

Produce a set of tests which can be used by most of the extracts. This will produce counts of various demographics using create_demog_test_flags() counts of episodes for every hbtreatcode using create_hb_test_flags(), a total cost for each hbtreatcode using create_hb_cost_test_flags(). It will also produce various summary statistics for bedday, cost and episode date variables.

Usage

produce_source_dn_tests(
  data,
  sum_mean_vars = c("cost", "yearstay"),
  max_min_vars = c("record_keydate1", "record_keydate2", "cost_total_net", "yearstay")
)

Arguments

data

new or old data for testing summary flags (data is from get_source_extract_path())

sum_mean_vars

variables used when selecting 'all' measures from calculate_measures()

max_min_vars

variables used when selecting 'min-max' from calculate_measures()

Value

a dataframe with a count of each flag from calculate_measures()