find_onset: Onset Type Function A function used to determine if a patient...

View source: R/find_onset_type.R

find_onsetR Documentation

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

Description

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

Usage

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

Value

Returns a dataset with a new column that flags a patient has having 'Community' or 'Hosptial' onset

Examples

## Not run: 
final_data <- data %>% find_onset(blood_day = blood_service_day, 
                                  first_qad = first_qad, 
                                  patientid = encounter, 
                                 admission_day = admisison_date)

## End(Not run)

trentgillin/SepsisR documentation built on Nov. 26, 2022, 12:41 p.m.