add_recent_test() adds a column indicating whether a person (identified using first name, last name, and date of birth) has previously tested positive within days of the given test date. The resulting recent_test column is:

  • TRUE if any previous tests are found

  • FALSE if no previous tests are found with complete data

  • NA if no previous tests are found with incomplete test date data

add_recent_test(crf = add_in_nbs(), nbs = load_positive(), days = 90L)

Arguments

crf

Case Report Form data, usually output from add_in_nbs()

nbs

Positive NBS data from load_positive()

days

Range of days for matching test dates

Value

The input crf data with a logical column recent_test added