R/adjustments.R
is_carc_code.Rd
Validate CARC Codes
is_carc_code(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.
<chr>
GROUP-CARC
GROUP
-
CARC
a tibble
x <- c("- 253", "OA-23", "PI-", "-45 ", "OA23") is_carc_code(x) #> [1] TRUE TRUE FALSE TRUE TRUE x[which(is_carc_code(x))] #> [1] "- 253" "OA-23" "-45 " "OA23"