Using KDIGO Clinical Practice Guideline for Acute Kidney Injury Volume 2 | Issue 1 | March 2012

aki_UO(...)

# S3 method for data.frame
aki_UO(.data, UO, dttm, pt_id, ...)

# S3 method for units
aki_UO(UO, dttm, pt_id, ...)

# S3 method for numeric
aki_UO(UO, dttm, pt_id, ...)

Arguments

...

Further optional arguments

.data

(data.frame) A data.frame, optional

UO

Urine output column name, or vector of units or numeric if .data is not provided

dttm

DateTime column name, or vector of POSIXct if .data is not provided

pt_id

Patient ID column name, or vector of characters or factors if .data is not provided

Value

(ordered factor) AKI stages

Details

  • AKI Stage 1: <0.5 ml/kg/h for 6–12 hours

  • AKI Stage 2: <0.5 ml/kg/h for \(\ge\)12 hours

  • AKI Stage 3: <0.3 ml/kg/h for \(\ge\)24 hours OR Anuria for \(\ge\)12 hours

See https://kdigo.org/guidelines/acute-kidney-injury/ for more details.

Examples

aki_UO(aki_pt_data, UO = "UO_", dttm = "dttm_", pt_id = "pt_id_")
#>  [1] No AKI      No AKI      No AKI      No AKI      No AKI      No AKI     
#>  [7] No AKI      No AKI      No AKI      No AKI      No AKI      No AKI     
#> [13] No AKI      No AKI      No AKI      AKI Stage 1 No AKI      AKI Stage 2
#> [19] AKI Stage 3 AKI Stage 1 AKI Stage 3 AKI Stage 2 No AKI      AKI Stage 1
#> [25] AKI Stage 3 AKI Stage 3 No AKI     
#> Levels: No AKI < AKI Stage 1 < AKI Stage 2 < AKI Stage 3

aki_pt_data %>%
  dplyr::mutate(aki = aki_UO(UO = UO_, dttm = dttm_, pt_id = pt_id_))
#> # A tibble: 27 × 8
#>       SCr_    bCr_ pt_id_ dttm_                 UO_ aki_staging_type aki_  aki  
#>    [mg/dl] [mg/dl] <chr>  <dttm>              [ml/<chr>            <ord> <ord>
#>  1     2       1.5 NA     NA                     NA aki_bCr          No A… No A…
#>  2     2.5     1.5 NA     NA                     NA aki_bCr          AKI … No A…
#>  3     3       1.5 NA     NA                     NA aki_bCr          AKI … No A…
#>  4     3.5     1.5 NA     NA                     NA aki_bCr          AKI … No A…
#>  5     4       1.5 NA     NA                     NA aki_bCr          AKI … No A…
#>  6     4.5     1.5 NA     NA                     NA aki_bCr          AKI … No A…
#>  7     3.4    NA   pt1    2020-10-23 09:00:00    NA aki_SCr          No A… No A…
#>  8     3.9    NA   pt1    2020-10-25 21:00:00    NA aki_SCr          No A… No A…
#>  9     3      NA   pt1    2020-10-20 09:00:00    NA aki_SCr          AKI … No A…
#> 10     3.4    NA   pt2    2020-10-18 22:00:00    NA aki_SCr          No A… No A…
#> # ℹ 17 more rows