Package 'akiFlagger'

Title: Flags Acute Kidney Injury (AKI)
Description: Flagger to detect acute kidney injury (AKI) in a patient dataset.
Authors: Ishan Saran [aut, cre], Shivam Saran [aut]
Maintainer: Ishan Saran <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2025-02-06 06:12:20 UTC
Source: https://github.com/isaranwrap/akiflagger

Help Index


Flag patients for AKI

Description

Add in the AKI column in a patient dataframe according to the KDIGO criterion

Usage

returnAKIpatients(
  dataframe,
  HB_trumping = FALSE,
  eGFR_impute = FALSE,
  window1 = as.difftime(2, units = "days"),
  window2 = as.difftime(7, units = "days"),
  add_min_creat = FALSE,
  add_baseline_creat = FALSE
)

Arguments

dataframe

patient dataset

HB_trumping

boolean on whether to have historical baseline creatinine values trump the local minimum creatinine values

eGFR_impute

boolean on whether to impute missing baseline creatinine values with CKD-EPI equation

window1

rolling window length of the shorter time window; defaults to 48 hours

window2

rolling window length of the longer time window; defaults to 162 hours

add_min_creat

boolean on whether to add the intermediate columns generated during calculation

add_baseline_creat

boolean on whether to add the baseline creatinine values in

Value

patient dataset with AKI column added in

#Imports

Examples

returnAKIpatients(toy)

Toy dataset

Description

Since real patient data is probably protected health information (PHI), this toy dataset contains all the relevant columns the flagger takes in.

Usage

toy

Format

A data frame (1078 x 6) consisting of relevant AKI measurements for patients

patient_id

int, the patient identifier

enc

int, the encounter identifier

inpatient

boolean, whether or not the creatinine measurement taken was an inpatient measurement

admission

POSIXct, the time the patient was admitted

time

POSIXct, the time at which the creatinine measurement was taken

creatinine

float, the creatinine value of the measurement taken

@source http://akiflagger.readthedocs.io/