find_sofa | R Documentation |
Finds the current organ failure score using SOFA.
find_sofa( .data, patientid, time, period = 1, vitals = c(PaO2 = NA, FiO2 = NA, Platelets = NA, Bilirubin = NA, GCS = NA, Creatinine = NA, SBP = NA, DBP = NA, Vasopressor = NA, Vasopressor_dose = NA) )
.data |
The dataset you are working with. Must contain PaO2, FiO2, bilirubin, vasopressor, vasopressor dosage, creatinine, glasgow coma scale (gcs), systolic blood pressure (sbc), diastolic blood pressure (dbc), and platelet count columns. |
patientid |
A value indicating the unique patient id, usually an encounter number. |
time |
A POSIXct value indicating the timestamp for when vitals where taken. |
period |
A numeric value that indicates how long one vital is good for, default is one hour. Note: This will only fill in missing vitals. |
vitals |
A character vector denoting what columns represent the vitals. It is important to remember that right now only dopamine and dobutamine are considered in vasopressors used.Platelets should be in 10^3/microliter and FiO2 should be listed as a percent, not a decimal.Furthermore bilirubin should be in micrograms/decilitre. needed to calculate SOFA |
Returns a dataset with a new column denoting the SOFA total
result <- find_sofa(.data = sofa_data, patientid = Encounter, time = Service_Timestamp, vitals = c("PaO2" = "Pa02", "FiO2" = "Fi02", "Platelets" = "Platelet", "Bilirubin" = "Bili", "GCS" = "GCS", "Creatinine" = "Creatinine", "SBP" = "SBP", "DBP" = "DBP", "Vasopressor" = "Vasopressor", "Vasopressor_dose" = "Vasopressor Dosage"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.