Skip to contents

Return a range of ICD-10-PCS codes

Usage

pcs_range(start, end)

Arguments

start, end

<chr> Full 7-character ICD-10-PCS code.

Value

a tibble::tibble containing the results

Examples

pcs_range(start = "0G9000Z", end = "0G9100Z")
#> # A tibble: 10 × 5
#>    order valid code    description_short                        description_long
#>    <int> <int> <chr>   <chr>                                    <chr>           
#>  1 35883     1 0G9000Z Drainage of Pituitary Gland with Drain … Drainage of Pit…
#>  2 35884     1 0G900ZX Drainage of Pituitary Gland, Open Appro… Drainage of Pit…
#>  3 35885     1 0G900ZZ Drainage of Pituitary Gland, Open Appro… Drainage of Pit…
#>  4 35886     1 0G9030Z Drainage of Pituitary Gland with Drain … Drainage of Pit…
#>  5 35887     1 0G903ZX Drainage of Pituitary Gland, Percutaneo… Drainage of Pit…
#>  6 35888     1 0G903ZZ Drainage of Pituitary Gland, Percutaneo… Drainage of Pit…
#>  7 35889     1 0G9040Z Drain of Pituitary Gland with Drain Dev… Drainage of Pit…
#>  8 35890     1 0G904ZX Drainage of Pituitary Gland, Perc Endo … Drainage of Pit…
#>  9 35891     1 0G904ZZ Drainage of Pituitary Gland, Perc Endo … Drainage of Pit…
#> 10 35892     1 0G9100Z Drainage of Pineal Body with Drainage D… Drainage of Pin…
pcs_range("0G9000Z", "10D20ZZ")
#> # A tibble: 33,276 × 5
#>    order valid code    description_short                        description_long
#>    <int> <int> <chr>   <chr>                                    <chr>           
#>  1 35883     1 0G9000Z Drainage of Pituitary Gland with Drain … Drainage of Pit…
#>  2 35884     1 0G900ZX Drainage of Pituitary Gland, Open Appro… Drainage of Pit…
#>  3 35885     1 0G900ZZ Drainage of Pituitary Gland, Open Appro… Drainage of Pit…
#>  4 35886     1 0G9030Z Drainage of Pituitary Gland with Drain … Drainage of Pit…
#>  5 35887     1 0G903ZX Drainage of Pituitary Gland, Percutaneo… Drainage of Pit…
#>  6 35888     1 0G903ZZ Drainage of Pituitary Gland, Percutaneo… Drainage of Pit…
#>  7 35889     1 0G9040Z Drain of Pituitary Gland with Drain Dev… Drainage of Pit…
#>  8 35890     1 0G904ZX Drainage of Pituitary Gland, Perc Endo … Drainage of Pit…
#>  9 35891     1 0G904ZZ Drainage of Pituitary Gland, Perc Endo … Drainage of Pit…
#> 10 35892     1 0G9100Z Drainage of Pineal Body with Drainage D… Drainage of Pin…
#> # ℹ 33,266 more rows
pcs_range(start = "0G9000Z", end = "0G9000Z")
#> # A tibble: 1 × 5
#>   order valid code    description_short                         description_long
#>   <int> <int> <chr>   <chr>                                     <chr>           
#> 1 35883     1 0G9000Z Drainage of Pituitary Gland with Drain D… Drainage of Pit…
try(pcs_range(start = "0G9100Z", end = "0G9000Z"))
#> Error in pcs_range(start = "0G9100Z", end = "0G9000Z") : 
#>   ✖ 0G9100Z (#35892) comes after 0G9000Z (#35883)
#> ℹ Did you mean `pcs_range(start = "0G9000Z", end = "0G9100Z")` ?