Assign Adjustment Codes
Arguments
- code
<chr>
vector of adjustment codes; should be of the formGROUP-CARC
, whereGROUP
is two letters, followed by a dash (-
) andCARC
is a two-to-three character alphanumeric string.- include_keys
<lgl>
include keys in output; default isFALSE
- ...
These dots are for future extensions and must be empty.
Value
a tibble
Examples
x <- c("CO-253", "OA-23", "PI-185", "-45")
assign_adjustments(x)
#> # A tibble: 4 × 3
#> adj_code adj_group adj_desc
#> <chr> <chr> <chr>
#> 1 CO-253 Contractual Obligations Sequestration - reduction in federal paym…
#> 2 OA-23 Other Adjustments The impact of prior payer(s) adjudication…
#> 3 PI-185 Payer Initiated Reductions The rendering provider is not eligible to…
#> 4 -45 NA Charge exceeds fee schedule/maximum allow…
assign_adjustments(x, include_keys = TRUE)
#> # A tibble: 4 × 3
#> adj_code adj_group$match_key $match_value adj_desc$match_key
#> <chr> <chr> <chr> <chr>
#> 1 CO-253 CO Contractual Obligations 253
#> 2 OA-23 OA Other Adjustments 23
#> 3 PI-185 PI Payer Initiated Reductions 185
#> 4 -45 NA NA 45
#> # ℹ 1 more variable: adj_desc$match_value <chr>
dplyr::tibble(code = x, desc = assign_adjustments(code))
#> # A tibble: 4 × 2
#> code desc$adj_code $adj_group $adj_desc
#> <chr> <chr> <chr> <chr>
#> 1 CO-253 CO-253 Contractual Obligations Sequestration - reduction in …
#> 2 OA-23 OA-23 Other Adjustments The impact of prior payer(s) …
#> 3 PI-185 PI-185 Payer Initiated Reductions The rendering provider is not…
#> 4 -45 -45 NA Charge exceeds fee schedule/m…
dplyr::tibble(code = x) |>
dplyr::mutate(desc = purrr::map(code, assign_adjustments))
#> # A tibble: 4 × 2
#> code desc
#> <chr> <list>
#> 1 CO-253 <northstr [1 × 3]>
#> 2 OA-23 <northstr [1 × 3]>
#> 3 PI-185 <northstr [1 × 3]>
#> 4 -45 <northstr [1 × 3]>
purrr::map_df(x, assign_adjustments)
#> # A tibble: 4 × 3
#> adj_code adj_group adj_desc
#> <chr> <chr> <chr>
#> 1 CO-253 Contractual Obligations Sequestration - reduction in federal paym…
#> 2 OA-23 Other Adjustments The impact of prior payer(s) adjudication…
#> 3 PI-185 Payer Initiated Reductions The rendering provider is not eligible to…
#> 4 -45 NA Charge exceeds fee schedule/maximum allow…
purrr::map_df(x, assign_adjustments, include_keys = TRUE)
#> # A tibble: 4 × 3
#> adj_code adj_group$match_key $match_value adj_desc$match_key
#> <chr> <chr> <chr> <chr>
#> 1 CO-253 CO Contractual Obligations 253
#> 2 OA-23 OA Other Adjustments 23
#> 3 PI-185 PI Payer Initiated Reductions 185
#> 4 -45 NA NA 45
#> # ℹ 1 more variable: adj_desc$match_value <chr>
dplyr::tibble(code = x, purrr::map_dfr(code, assign_adjustments))
#> # A tibble: 4 × 4
#> code adj_code adj_group adj_desc
#> <chr> <chr> <chr> <chr>
#> 1 CO-253 CO-253 Contractual Obligations Sequestration - reduction in feder…
#> 2 OA-23 OA-23 Other Adjustments The impact of prior payer(s) adjud…
#> 3 PI-185 PI-185 Payer Initiated Reductions The rendering provider is not elig…
#> 4 -45 -45 NA Charge exceeds fee schedule/maximu…
assign_adjustments(x, include_keys = TRUE) |>
as.data.frame() |>
dplyr::tibble()
#> # A tibble: 4 × 3
#> adj_code adj_group$match_key $match_value adj_desc$match_key
#> <chr> <chr> <chr> <chr>
#> 1 CO-253 CO Contractual Obligations 253
#> 2 OA-23 OA Other Adjustments 23
#> 3 PI-185 PI Payer Initiated Reductions 185
#> 4 -45 NA NA 45
#> # ℹ 1 more variable: adj_desc$match_value <chr>