translate_acns() maps fields from ACNS data to REDcap data and excludes duplicates + cases older than days old.

translate_acns(
  .data = covidsms::prep_acns(assign = TRUE),
  date = lubridate::today(),
  days = 6L,
  archive = TRUE
)

Arguments

.data

ACNS data. Runs covidsms::prep_acns(assign = TRUE) by default.

date

The date to use for assignment; unlike in other functions, this defaults to today's date as part of the "translation" process.

days

Number of days back to consider valid. test_date older than this will not be assigned.

archive

Should data be archived (before deduplicating)?

Value

The data mapped to REDcap field names