Skip to content

Add [.icd9cm_pc and [.icd10cm_pc methods #199

@dapritchard

Description

@dapritchard

Since extraction methods aren't defined for icd9cm_pc and icd10cm_pc classes, extraction resorts to the default method which drops all of the type encoding information. See the following for an example.

library(icd)
z = as.short_diag(as.icd9cm_pc(c("0053", "0053", "0211")))

z
#> [1] "0053" "0053" "0211"
#> attr(,"class")
#> [1] "icd9cm_pc" "character"
#> attr(,"icd_short_diag")
#> [1] TRUE

z[1L]
#> [1] "0053"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions