An ICD code consists of, at a minimum, a three digit ICD-10 code (i.e. one upper-case letter followed by two digits). This may optionally be followed by a two digit subcode, selected punctuation symbols (cross "*", dagger "U2020" or exclamation mark "!"). Both the period separating the three-digit code from the subcode, and the hyphen indicating an "incomplete" subcode, are optional. Finally, in the ambulatory system, an additional letter G, V, Z or A may be appended to signify the status ("security") of the diagnosis.
Arguments
- str
Character vector to be tested
- year
Year for which to test whether the specification is a valid code. Default: NULL (test whether
str
matches a code from any year since 2003)- parse
logical. Whether to first parse the input
str
usingicd_parse
(Default: TRUE). If FALSE, assumes thatstr
is already formatted asicd_sub
(i.e. without separating period or other punctuation)