Skip to contents

Validate CARC Codes

Usage

is_carc_full(x)

Arguments

x

<chr> vector of CARC adjustment codes; should be of the form GROUP-CARC, where GROUP is two letters, followed by a dash (-) and CARC is a two-to-three character alphanumeric string.

Value

a tibble

Examples

x <- c("- 253", "OA-23", "PI-", "-45 ", "OA23")

is_carc_full(x)
#> [1] FALSE  TRUE FALSE FALSE  TRUE

x[which(is_carc_full(x))]
#> [1] "OA-23" "OA23"