Skip to contents

Trial concept calculated: Calculates if record is a medicine-interventional trial, investigating one or more medicine, whether biological or not. For EUCTR and CTIS, this corresponds to all records as per the definition of the EU Clinical Trial Regulation. For CTGOV and CTGOV2, this is based on drug or biological as type of intervention, and interventional as type of study. For ISRCTN, this is based on drug or biological as type of intervention, and interventional as type of study.

Usage

f.isMedIntervTrial(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 colums `_id` and `.isMedIntervTrial`, a logical.

Examples

# fields needed
f.isMedIntervTrial()
#> $euctr
#> [1] "ctrname"
#> 
#> $ctgov
#> [1] "intervention.intervention_type" "study_type"                    
#> 
#> $ctgov2
#> [1] "protocolSection.armsInterventionsModule.interventions.type"
#> [2] "protocolSection.designModule.studyType"                    
#> 
#> $isrctn
#> [1] "interventions.intervention.interventionType"
#> [2] "trialDesign.primaryStudyDesign"             
#> 
#> $ctis
#> [1] "ctrname"
#> 

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