createLIKE: Create lists of ICD10 codes to be used in generating SQL...

Description Usage Arguments Details Value Examples

Description

createLIKE and convertToLike create two lists of ICD10 codes. The first one contains a sets of common patterns of the first few digits of the ICD10 codes, which can then be used in "LIKE" SQL commands. The second list contains ICD10 codes that don't share common patterns, which can be put in "IN" SQL commands.

Usage

1
2
3
createLIKE(codes, dict, n = 2, minGroup = 2)

convertToLike(codes, dict, minGroup = 2, maxLength = 3)

Arguments

codes

A vector of ICD10 codes as strings. Exclusions.

dict

A vector of ICD10 codes as strings.

n

The length of starting strings used for grouping ICD10 codes.

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.

Details

convertToLike performs similar task to createLIKE, except that instead of using a fixed length, it considers all starting strings with length from 1 to maxLength.

Note that the ICD10 codes in the output are all from codes.

Value

Both functions return a list object.

LIKE

Sub-lists of starting string patterns.

IN

All other ICD10 codes in codes that don't match those patterns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Exclusions
bpExclICD9 <- c(1400:2089,2300:2399,8000:8399,8500:8549,8600:8699,
                9050:9099,92611,92612,929,9520:9529,9580:9599,3040:3042,
                3044,3054:3057,34460,7292,4210,4211,4219,0380:0389,01,
                7300:7309,7832,78079,7808,2859)
bpExclICD10 <- getICD10(bpExclICD9)

createLIKE(codes = bpExclICD10, dict = ICD9to10$ICD10)

convertToLike(codes = bpExclICD10, dict = ICD9to10$ICD10, maxLength = 4)

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