toml2code: Read in a TOML file and output a codelist for 'writeSQL'...

Description Usage Arguments Value

Description

Read in a TOML file and output a codelist for writeSQL function

Usage

1
2
toml2code(file, minGroup = 2, maxLength = 4, input = c("ICD9", "ICD10"),
  output = c("ICD9", "ICD10"), option = c("1", "2", "3"))

Arguments

file

A file path to the TOML file.

minGroup

The minimum number of occurrences for a starting string pattern to be put in the $LIKE list.

maxLength

The maximum length of starting strings considered in $LIKE.

input, output

Specify the version of ICD codes in the input or output. Choose between 'ICD9' and 'ICD10'.

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.

Value

A list object with three elements.

num

code list of the numerator

elig

code list of the inclusion

excl

code list of the exclusion

Each element is a code list that has two elements, LIKE and IN. And they can be fed into function writeSQL as the codeList parameter.


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