A vectorised function to calculate the Liver Donor Risk Index as published by Feng and others.
liver_dri(age, cod, eth, dcd, split, share, cit, height)
numeric vector of patient ages in years
character string vector of donor causes of death, one of "trauma", "anoxia", "cva" or "other"
character string vector of ethnicity, one of "black", "white" or "other"
numeric vector of whether DCD (1 = yes, 0 = no)
numeric vector of whether liver split (1 = yes, 0 = no)
character string vector of type of sharing, one of "regional" or "national"
numeric vector of cold ischaemic times in hours
numeric vector of patient heights in cm
numeric vector of liver DRI values
Reference: Feng S, Goodrich NP, Bragg-Gresham JL et al. Characteristics Associated with Liver Graft Failre: The Concept of a Donor Risk Index. American Journal of Transplantation 2006; 6:783-790.
liver_dri(age = 25, cod = "trauma", eth = "white", dcd = 0, split = 0,
share = "local", cit = 8, height = 170) # 1.00
#> [1] 1
liver_dri(age = 64, cod = "cva", eth = "white", dcd = 0, split = 0,
share = "local", cit = 14, height = 170) # 1.88
#> [1] 1.875734