Trial concept calculated: number of the sites where the trial is conducted. EUCTR lacks information on number of sites outside of the EEA; for each non-EEA country mentioned, at least one site is assumed.
Arguments
- df
data frame such as from dbGetFieldsIntoDf. If `NULL`, prints fields needed in `df` for calculating this trial concept, which can be used with dbGetFieldsIntoDf.
Examples
# fields needed
f.numSites()
#> $euctr
#> [1] "e851_number_of_sites_anticipated_in_the_eea"
#> [2] "e863_trial_sites_planned_in"
#>
#> $ctgov
#> [1] "location.facility.address.city"
#>
#> $ctgov2
#> [1] "protocolSection.contactsLocationsModule.locations.city"
#>
#> $isrctn
#> [1] "participants.trialCentres.trialCentre.name"
#>
#> $ctis
#> [1] "authorizedPartsII.trialSites.id"
#> [2] "authorizedApplication.authorizedPartsII.trialSites.id"
#>
# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
collection = "my_trials", flags = RSQLite::SQLITE_RO)
trialsDf <- dbGetFieldsIntoDf(
calculate = "f.numSites",
con = dbc)
#> Querying database (7 fields)...
trialsDf
#> # A tibble: 30 × 2
#> `_id` .numSites
#> <chr> <int>
#> 1 12949496 2
#> 2 13281214 1
#> 3 17473621 1
#> 4 2012-003632-23-CZ 18
#> 5 2012-003632-23-SE 17
#> 6 2014-002606-20-PT 19
#> 7 2014-003556-31-GB 16
#> 8 2014-003556-31-SE 16
#> 9 2022-500244-37-00 2
#> 10 2022-501142-30-00 5
#> # ℹ 20 more rows