outputSQL: Output SQL files

Description Usage Arguments Details

Description

This function outputs several SQL files, based on information stored in a TOML file and two template SQL files.

Usage

1
2
3
outputSQL(tomlFile, numTemplate, eligTemplate, exclTemplate,
  years = 2013:2017, output.path = "", option = c("1", "2", "3"),
  num = TRUE, elig = TRUE, excl = TRUE)

Arguments

tomlFile

The file name of the TOML file to be used.

numTemplate

The file name of the template SQL file for numerator.

eligTemplate

The file name of the template SQL file for eligible.

exclTemplate

The file name of the template SQL file for exclusion.

years

A vector of desired years to be pulled from the database.

output.path

The path to the directory where the output SQL files will be stored.

option

Choose from 1 to 3 to specify what table to be used in conversion. Choose 1 for ICD9to10, 2 for ICD10to9, and 3 for using both and returning the union of two sets of results. Default is 1.

num

Logical value to determine if imaging files should be generated.

elig

Logical value to determine if eligible files should be generated.

excl

Logical value to determine if exclusion files should be generated.

Details

For each input year, the output files include one for the numerator, one for the eligible and one for the exclusions. For year before 2015, the eligible file and exclusion file will use ICD-9 codes. Whereas for year after 2015, they will use ICD-10 codes. And for year 2015, they will use both, so there will be two eligible files and two exclusion file. If the toml file does not contain exclusions, then no sql files will be generated for exclusions. This applies to eligible and numerator as well.


songxh0424/MPrOVE-package documentation built on May 19, 2019, 4:18 p.m.