get_valid: invalid subset of decimal or short_code ICD-9 codes

View source: R/valid.R

get_validR Documentation

invalid subset of decimal or short_code ICD-9 codes

Description

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.

Usage

get_valid(x, short_code = guess_short(x))

## S3 method for class 'character'
get_valid(x, short_code = guess_short(x))

## S3 method for class 'icd9'
get_valid(x, short_code = guess_short(x))

## S3 method for class 'icd10'
get_valid(x, short_code = guess_short(x))

## S3 method for class 'icd10cm'
get_valid(x, short_code = guess_short(x))

Arguments

x

input vector of ICD codes

short_code

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.

Methods (by class)

  • 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


jackwasey/icd documentation built on Dec. 22, 2024, 4:47 a.m.