get_positivity: Compute Weekly Test Positivity Rate (TPR)

View source: R/get_positivity.R

get_positivityR Documentation

Compute Weekly Test Positivity Rate (TPR)

Description

Compute Weekly Test Positivity Rate (TPR)

Usage

get_positivity(
  sc_tbl,
  start_date = "2021-01-01",
  end_date = as.character(lubridate::date(lubridate::now())),
  n_days = 30,
  time_zone = "America/New_York"
)

Arguments

sc_tbl

Sample Collection table from deidentifiedDB database

start_date

Filter sample collection table for samples collected after this date. Provide date as in "2021-08-01" for August 1, 2021

end_date

Filter sample collection table for samples collected on or before this date. Provide date as in "2021-08-01" for August 1, 2021

n_days

Duration of time (in days) for which only the first collected COVID-19 positive sample for a patient is retained

time_zone

Time zone for collection time (Default: "America/New_York")

Value

Tibble containing Weekly Test Positivity Rate (TPR) data after excluding redundant COVID-19 positive samples


CUGBF/deidentifiedDB documentation built on Sept. 13, 2023, 6:28 a.m.