Check whether ClinicalTrials.gov registrations were prospective
Source:R/rt_registration.R
rt_registration_timing.RdLooks up trials in the ClinicalTrials.gov registry (API version 2) and compares the date the registration was first submitted with the study start date. A registration is prospective when it was submitted no later than the start date (plus an optional grace period).
Value
A tibble with one row per unique identifier: `nct_id`, `first_submitted` and `first_posted` (the registration dates), `start_date`, `start_date_precision` (`"day"` or `"month"`), `start_date_type` (`"ACTUAL"` or `"ESTIMATED"`), `days_after_start` (submission date minus start date; negative when registered before the start) and `is_prospective`. Trials the registry does not know have `NA` dates.
Details
When the registry gives the start date to the month only, a registration submitted within that month cannot be classified and `is_prospective` is `NA`; one submitted before the month is prospective and one after it is retrospective. The start date the registry holds may be an estimate for trials not yet started (`start_date_type`).
Examples
# \donttest{
# Needs internet access and the jsonlite package.
if (requireNamespace("jsonlite", quietly = TRUE)) {
try(rt_registration_timing(c("NCT04368728", "NCT00000102")))
}
#> # A tibble: 2 × 8
#> nct_id first_submitted first_posted start_date start_date_precision
#> <chr> <date> <date> <date> <chr>
#> 1 NCT04368728 2020-04-27 2020-04-30 2020-04-29 day
#> 2 NCT00000102 1999-11-03 1999-11-04 NA NA
#> # ℹ 3 more variables: start_date_type <chr>, days_after_start <int>,
#> # is_prospective <lgl>
# }