Skip to contents

[Experimental] 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] "e83single_site_trial"                                      
#> [2] "e841_number_of_sites_anticipated_in_member_state_concerned"
#> [3] "e85_the_trial_involves_multiple_member_states"             
#> [4] "e851_number_of_sites_anticipated_in_the_eea"               
#> [5] "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)
#> To review trial concepts details, call 'help("ctrdata-trial-concepts")'
#> Querying database (10 fields)...
#> Typing fields...
#> Calculating f.numSites...                            

trialsDf
#> # A tibble: 25 × 2
#>    `_id`             .numSites
#>    <chr>                 <int>
#>  1 12949496                  2
#>  2 13281214                  1
#>  3 17473621                  1
#>  4 2013-000615-24-BE         1
#>  5 2016-004489-24-DE        30
#>  6 2019-002663-10-ES        37
#>  7 2022-000099-20-DE       302
#>  8 2022-500244-37-00         2
#>  9 2023-505613-24-00         6
#> 10 2023-508143-51-01         2
#> # ℹ 15 more rows