Return only those codes which are heading or leaf (billable), specifying whether codes are all short-form or all decimal-form
icd_get_defined(x, short_code = icd_guess_short(x), billable = FALSE)
input vector or factor, possibly with an ICD class
logical value, whether short-form ICD code
single logical value, whether to limit return codes also by whether they are billable, i.e. leaf nodes. This is really only designed for use with ICD-9-CM, ICD-10-CM etc, since the WHO versions are not designed for billing, but for public health and death reporting.