build_rx_indicators: Build rx indicators corresponding to a list of medications

build_rx_indicatorsR Documentation

Build rx indicators corresponding to a list of medications

Description

This function makes indicators corresponding to a list of ndc codes, for visits identified by timemap keys. If keys are not found in the database, this function will not run 'add_time_map_keys()').

Usage

build_rx_indicators(rx_list, db_con, collect_tab = collect_table())

Arguments

rx_list

a named list of ndc codes. Each condition should be named and the ndc codes should be stored as a named sub-list for each condition

db_con

connection to the small database

collect_tab

(optional) a collection table. This argument is only used to make temporary, visit keys if no keys are found in the database

Value

a tibble containing keys and indicators for each condition


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