build_dx_indicators_parallel: Gather all visit keys containing specific diagnosis codes...

build_dx_indicators_parallelR Documentation

Gather all visit keys containing specific diagnosis codes over multiple combinations of setting, source, and year (in parallel)

Description

Gather all visit keys containing specific diagnosis codes over multiple combinations of setting, source, and year (in parallel)

Usage

build_dx_indicators_parallel(
  condition_dx_list,
  db_con,
  db_path,
  collect_tab = collect_table(),
  num_cores = NULL,
  return_keys_only = FALSE
)

Arguments

condition_dx_list

A list of specific diagnosis codes that are of interest. The diagnosis codes need to be seperated into diagnosis categories (e.g. cough, fever, ect.) and within the categories diagnosis codes should be seperated into ICD 9 and ICD 10 specific codes, with list elements labled as icd9_codes and icd10_codes

db_con

The database connection

db_path

Path to the database

collect_tab

A tibble with the specific setting (i.e. inpatient or outpatient), source (i.e. ccae or mdcr), and year to access. Default is all possible combinations of setting, source, and year

num_cores

The number of worker cores to use. If not specified will determined the number of cores based on the which ever is the smallest value between number of rows in for collect_tab or detected number of cores - 1

return_keys_only

Logical to return only the visit keys containing specific diagnosis codes

Value

A tibble with visit keys and indicators for the diagnosis codes categories supplied to the condition_dx_list argument


aarmiller/smallDB documentation built on March 29, 2024, 9:37 a.m.