get_investigators() joins the investigators scheduled to work on date with the list of investigators from the Case Assignment REDcap project. By default, it performs an inner join, since only investigators in both lists are available for case assignment.

get_investigators(
  date = Sys.Date(),
  type = c("all", "general", "school"),
  scheduled_only = TRUE,
  api_token = Sys.getenv("redcap_NCA_token"),
  quiet = TRUE
)

Arguments

date

The date to use when checking whether investigators are scheduled

type

The type or group of investigators to return

scheduled_only

Should only scheduled investigators be returned? If FALSE, all investigators will be returned. Useful for debugging.

api_token

The API token for the Case Assignment REDcap project. The default pulls this from the environment variable redcap_CA_token.

quiet

Should update messages be suppressed?

Value

A tibble with one row per investigator and an investigator column. If type = "inner", an id column is also included.

Details

While the default behavior is an inner join, get_investigators() can also perform anti-joins with either the scheduled or REDcap investigator list as the primary table. This is useful for debugging and checking that all scheduled investigators are able to have cases assigned.