build_final_time_map_large_DB: Builds a time map containing visit specific information for a...

build_final_time_map_large_DBR Documentation

Builds a time map containing visit specific information for a specific condition and cohort for large databases.

Description

Builds a time map containing visit specific information for a specific condition and cohort for large databases.

Usage

build_final_time_map_large_DB(
  condition_short_name,
  duration_prior_to_index = 365L,
  time_map,
  cohort_path,
  ssd_list
)

Arguments

condition_short_name

The condition of interest. Specifically the short_name version of the condition

duration_prior_to_index

How far from the index should the time map extend back (e.g. 90, 180, 365)

time_map

The time_map to which the indicators will be added to

cohort_path

Path to the specific cohort for the condition of interest

ssd_list

A list of diagnosis codes of interest. The diagnosis codes need to be seperated into diagnosis categories (e.g. cough, fever, etc.). Additionally, 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

Value

A tibble with all the specified diagnosis codes and the corresponding visit key where the diagnosis codes appeared

Examples

ssds <- read_rds("/Shared/Statepi_Diagnosis/params/ssd_codes/ssd_hsv_enceph.RDS")

final_time_map <- build_final_time_map_large_DB(condition_short_name = "hsv_enceph",
                                                duration_prior_to_index = 365L,
                                                time_map = time_map,
                                                cohort_path = "/Shared/Statepi_Diagnosis/grant_projects/hsv_enceph/scripts/validation/enrolled_ge_365/updated_index_cohort.RDS",
                                                ssd_list = ssds)

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