Skip to contents

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.

Usage

f.numSites(df = NULL)

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.

Value

data frame with columns `_id` and `.numSites`, an integer.

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
#>                  _id .numSites
#> 1           12949496         2
#> 2           13281214         1
#> 3           17473621         1
#> 4  2012-003632-23-CZ        23
#> 5  2012-003632-23-SE        21
#> 6  2014-002606-20-PT        22
#> 7  2014-003556-31-GB        20
#> 8  2014-003556-31-SE        20
#> 9  2022-500244-37-00         2
#> 10 2022-501142-30-00         5
#> 11 2023-505613-24-00         7
#> 12 2023-508143-51-01         2
#> 13 2024-510663-34-00         2
#> 14          20343063         1
#> 15          61070850         1
#> 16          76463425        60
#> 17          80181452         1
#> 18          88261002         1
#> 19       NCT00617929         1
#> 20       NCT01125800        14
#> 21       NCT01483820         8
#> 22       NCT01505608         8
#> 23       NCT01592045        13
#> 24       NCT02620761         1
#> 25       NCT03280147         7
#> 26       NCT03325439        12
#> 27       NCT03431558         1
#> 28       NCT03876704         1
#> 29       NCT04001712         1
#> 30       NCT05969327         1