Given vector of short_code or decimal ICD-9 codes, return (in the same format) those codes which are valid or invalid. Useful for generating error messages with the faulty codes if validation fails.
get_valid(x, short_code = guess_short(x))# S3 method for character
get_valid(x, short_code = guess_short(x))
# S3 method for icd9
get_valid(x, short_code = guess_short(x))
# S3 method for icd10
get_valid(x, short_code = guess_short(x))
# S3 method for icd10cm
get_valid(x, short_code = guess_short(x))
input vector of ICD codes
single logical value which determines whether the ICD-9
code provided is in short (TRUE
) or decimal (FALSE
) form.
Where reasonable, this is guessed from the input data.
character
: get valid ICD codes from character vector, guessing ICD
version
icd9
: Get valid ICD-9 codes
icd10
: Get valid ICD-10 codes, currently based on ICD-10-CM
structure, which is a super-set of WHO ICD-10
icd10cm
: Get valid ICD-10-CM codes