Onset Type Function A function used to determine if a patient has community sepsis or hospital onset sepsis

find_onset(.data, blood_day, first_qad, patientid, admission_day)

Arguments

.data

Your dataset

blood_day

This is a Date column that represents when your blood cultures were taken

first_qad

This is a Date column that represents your first qualifying antibiotic day (see CDC definition) time

patientid

A unique identifier for each patient

admission_day

A Date object for the day a patient was admitted to the hospital

Examples

if (FALSE) { final_data <- data %>% find_onset(blood_day = blood_service_day, first_qad = first_qad, patientid = encounter, admission_day = admisison_date) }