Finds the current organ failure score using SIRS (Systematic Inflammatory Response Syndrome)

find_sirs(
  .data,
  patientid,
  time,
  period = 1,
  vitals = c(Temperature = NA, RR = NA, HR = NA, WBC = NA)
)

Arguments

.data

The dataset you are working with. Must include heart rate (hr), respiratory rate (rr), white blood cell count (wbc), and temperature.

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 needed to calculate SIRS, it is important to have temperature in Celsius and WBC in mmm^3

Examples

dataset <- find_sirs(sirs_data, Encounter, Service_Timestamp, vitals = c("RR" = "RR", "Temperature" = "Temperature", "HR" = "HR", "WBC" = "Wbc"))