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))
icd_get_valid(...)
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.
arguments passed on to other functions
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
Future versions of icd will drop
the icd_ prefix. For example, charlson should be used in
favor of icd_charlson. To distinguish icd function calls,
consider using the prefix icd:: instead, e.g., icd::charlson.
Functions which specifically operate on either ICD-9 or ICD-10 codes or
their sub-types will retain the prefix. E.g.
icd9_comorbid_ahrq. icd specific classes also retain
the prefix, e.g., icd_wide_data.