Skip to contents

Trial concept calculated: start of the trial, based on the documented or planned start of recruitment, or on the date of opinion of the competent authority.

Usage

f.startDate(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 `.startDate`, a date.

Examples

# fields needed
f.startDate()
#> $euctr
#> [1] "n_date_of_competent_authority_decision"
#> [2] "n_date_of_ethics_committee_opinion"    
#> [3] "trialInformation.recruitmentStartDate" 
#> 
#> $ctgov
#> [1] "start_date"
#> 
#> $ctgov2
#> [1] "protocolSection.statusModule.startDateStruct.date"
#> 
#> $isrctn
#> [1] "participants.recruitmentStart" "trialDesign.overallStartDate" 
#> 
#> $ctis
#> [1] "startDateEU"                                                                                                    
#> [2] "authorizationDate"                                                                                              
#> [3] "authorizedApplication.authorizedPartI.trialDetails.trialInformation.trialDuration.estimatedRecruitmentStartDate"
#> 

# 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(
  field = "ctrname",
  calculate = "f.startDate",
  con = dbc)
#> Querying database (11 fields)...
trialsDf
#>                  _id ctrname .startDate
#> 1           12949496  ISRCTN 2015-11-01
#> 2           13281214  ISRCTN 2016-09-01
#> 3           17473621  ISRCTN 2023-05-01
#> 4  2012-003632-23-CZ   EUCTR 2013-07-28
#> 5  2012-003632-23-SE   EUCTR 2015-07-01
#> 6  2014-002606-20-PT   EUCTR 2018-04-02
#> 7  2014-003556-31-GB   EUCTR 2015-03-26
#> 8  2014-003556-31-SE   EUCTR 2015-03-26
#> 9  2022-500244-37-00    CTIS 2022-08-03
#> 10 2022-501142-30-00    CTIS 2023-01-17
#> 11 2023-505613-24-00    CTIS 2021-04-28
#> 12 2023-508143-51-01    CTIS 2024-05-06
#> 13 2024-510663-34-00    CTIS 2023-01-16
#> 14          20343063  ISRCTN 2011-01-01
#> 15          61070850  ISRCTN 2007-01-10
#> 16          76463425  ISRCTN 2013-06-01
#> 17          80181452  ISRCTN 2010-04-01
#> 18          88261002  ISRCTN 2013-09-01
#> 19       NCT00617929  CTGOV2 2008-01-15
#> 20       NCT01125800  CTGOV2 2011-02-15
#> 21       NCT01483820  CTGOV2 2011-12-15
#> 22       NCT01505608  CTGOV2 2011-12-15
#> 23       NCT01592045  CTGOV2 2012-08-15
#> 24       NCT02620761   CTGOV 2019-02-06
#> 25       NCT03280147   CTGOV 2019-01-01
#> 26       NCT03325439   CTGOV 2019-05-07
#> 27       NCT03431558   CTGOV 2018-05-01
#> 28       NCT03876704   CTGOV 2019-01-29
#> 29       NCT04001712   CTGOV 2019-04-05
#> 30       NCT04041765   CTGOV 2019-09-15
#> 31       NCT05969327   CTGOV 2018-08-14