From high-level search terms provided by the user, generate specific queries for each registers with which ctrdata works, see ctrdata-registers. Search terms that are expanded to concepts such as from MeSH and MedDRA by the search implementations in registers include the 'intervention' and 'condition'. Logical operators only work with 'searchPhrase'.
Usage
ctrGenerateQueries(
searchPhrase = NULL,
condition = NULL,
intervention = NULL,
phase = NULL,
population = NULL,
recruitment = NULL,
startBefore = NULL,
startAfter = NULL,
completedBefore = NULL,
completedAfter = NULL,
onlyWithResults = FALSE,
registers = c("EUCTR", "ISRCTN", "CTIS", "CTGOV2")
)
Arguments
- searchPhrase
String with optional logical operators ("AND", "OR") that will be searched in selected fields of registers that can handle logical operators (general or title fields), should not include quotation marks
- condition
String with condition / disease
- intervention
String with intervention
- phase
String, e.g. "phase 2" (note that "phase 2+3" is a specific category, not the union set of "phase 2" and "phase 3")
- population
String, e.g. "P" (paediatric), "A" (adult), "P+A" (adult and paediatric), "E" (elderly), "P+A+E" participants can be recruited
- recruitment
String, one of "ongoing", "completed", "other" ( which includes "ended early" but this cannot be searched; use trial concept f.statusRecruitment to identify this status)
- startBefore
String that can be interpreted as date, see example
- startAfter
String that can be interpreted as date
- completedBefore
String that can be interpreted as date (does not work with EUCTR)
- completedAfter
String that can be interpreted as date (does not work with EUCTR)
- onlyWithResults
Logical
- registers
Vector of register names, default all registers
Value
Named vector of URLs for finding trials in the registers and as input to functions ctrLoadQueryIntoDb and ctrOpenSearchPagesInBrowser
Examples
urls <- ctrGenerateQueries(
intervention = "antibody",
phase = "phase 3",
startAfter = "2000-01-01")
# open queries in register web interface
sapply(urls, ctrOpenSearchPagesInBrowser)
#> * Found search query from EUCTR: query=antibody&phase=phase-three&dateFrom=2000-01-01
#> * Appears specific for CTGOV REST API 2.0
#> * Found search query from CTGOV2: intr=antibody&start=2000-01-01_&aggFilters=phase:3
#> * Found search query from ISRCTN: &filters=intervention:antibody,phase:Phase III,GT+overallStartDate:2000-01-01&q=
#> * Found search query from CTIS: searchCriteria={"containAll":"antibody","trialPhaseCode":[5],"eeaStartDateFrom":"2000-01-01"}
#> EUCTR
#> "https://www.clinicaltrialsregister.eu/ctr-search/search?query=antibody&phase=phase-three&dateFrom=2000-01-01#tabs"
#> CTGOV2
#> "https://clinicaltrials.gov/search?intr=antibody&start=2000-01-01_&aggFilters=phase:3"
#> ISRCTN
#> "https://www.isrctn.com/search?&filters=intervention:antibody,phase:Phase III,GT+overallStartDate:2000-01-01&q="
#> CTIS
#> "https://euclinicaltrials.eu/ctis-public/search#searchCriteria={\"containAll\":\"antibody\",\"trialPhaseCode\":[5],\"eeaStartDateFrom\":\"2000-01-01\"}"
urls <- ctrGenerateQueries(
searchPhrase = "antibody AND covid",
recruitment = "completed")
# count trials found
sapply(urls, ctrLoadQueryIntoDb, only.count = TRUE)
#> * Found search query from EUCTR: query="antibody" AND "covid"&status=completed
#> * Checking trials in EUCTR...
#> Retrieved overview, multiple records of 35 trial(s) from 2 page(s) to be downloaded (estimate: 5 MB)
#> * Appears specific for CTGOV REST API 2.0
#> * Found search query from CTGOV2: titles="antibody" AND "covid"&aggFilters=status:com
#> * Checking trials using CTGOV REST API 2.0...
#> , found 89 trials
#> * Found search query from ISRCTN: q="antibody" AND "covid"&filters=trialStatus:completed
#> * Checking trials in ISRCTN...
#> Retrieved overview, records of 138 trial(s) are to be downloaded (estimate: 2 MB)
#> * Found search query from CTIS: searchCriteria={"containAll":"antibody, covid","status":[5,8]}
#> * Checking trials in CTIS...
#> (1/4) Downloading trial list(s)...
#> , found 6 trials
#>
#> EUCTR
#> n 35
#> success NULL
#> failed NULL
#> queryterm "query="antibody" AND "covid"&status=completed"
#> CTGOV2
#> n 89
#> success NULL
#> failed NULL
#> queryterm "titles="antibody" AND "covid"&aggFilters=status:com"
#> ISRCTN
#> n 138
#> success NULL
#> failed NULL
#> queryterm "q="antibody" AND "covid"&filters=trialStatus:completed"
#> CTIS
#> n 6
#> success NULL
#> failed NULL
#> queryterm "searchCriteria={"containAll":"antibody, covid","status":[5,8]}"
# load queries into database collection
# sapply(urls, ctrLoadQueryIntoDb, con = dbc)
# find research platform and platform trials
urls <- ctrGenerateQueries(
searchPhrase = paste0(
"basket OR platform OR umbrella OR master protocol OR ",
"multiarm OR multistage OR subprotocol OR substudy OR ",
"multi-arm OR multi-stage OR sub-protocol OR sub-study"),
startAfter = "2010-01-01")
# open queries in register web interface
sapply(urls, ctrOpenSearchPagesInBrowser)
#> * Found search query from EUCTR: query="basket" OR "platform" OR "umbrella" OR "master protocol" OR "multiarm" OR "multistage" OR "subprotocol" OR "substudy" OR "multi-arm" OR "multi-stage" OR "sub-protocol" OR "sub-study"&dateFrom=2010-01-01
#> * Appears specific for CTGOV REST API 2.0
#> * Found search query from CTGOV2: titles="basket" OR "platform" OR "umbrella" OR "master protocol" OR "multiarm" OR "multistage" OR "subprotocol" OR "substudy" OR "multi-arm" OR "multi-stage" OR "sub-protocol" OR "sub-study"&start=2010-01-01_
#> * Found search query from ISRCTN: q="basket" OR "platform" OR "umbrella" OR "master protocol" OR "multiarm" OR "multistage" OR "subprotocol" OR "substudy" OR "multi-arm" OR "multi-stage" OR "sub-protocol" OR "sub-study"&filters=GT+overallStartDate:2010-01-01
#> * Found search query from CTIS: searchCriteria={"containAny":"basket, platform, umbrella, master protocol, multiarm, multistage, subprotocol, substudy, multi-arm, multi-stage, sub-protocol, sub-study","eeaStartDateFrom":"2010-01-01"}
#> EUCTR
#> "https://www.clinicaltrialsregister.eu/ctr-search/search?query=\"basket\" OR \"platform\" OR \"umbrella\" OR \"master protocol\" OR \"multiarm\" OR \"multistage\" OR \"subprotocol\" OR \"substudy\" OR \"multi-arm\" OR \"multi-stage\" OR \"sub-protocol\" OR \"sub-study\"&dateFrom=2010-01-01#tabs"
#> CTGOV2
#> "https://clinicaltrials.gov/search?titles=\"basket\" OR \"platform\" OR \"umbrella\" OR \"master protocol\" OR \"multiarm\" OR \"multistage\" OR \"subprotocol\" OR \"substudy\" OR \"multi-arm\" OR \"multi-stage\" OR \"sub-protocol\" OR \"sub-study\"&start=2010-01-01_"
#> ISRCTN
#> "https://www.isrctn.com/search?q=\"basket\" OR \"platform\" OR \"umbrella\" OR \"master protocol\" OR \"multiarm\" OR \"multistage\" OR \"subprotocol\" OR \"substudy\" OR \"multi-arm\" OR \"multi-stage\" OR \"sub-protocol\" OR \"sub-study\"&filters=GT+overallStartDate:2010-01-01"
#> CTIS
#> "https://euclinicaltrials.eu/ctis-public/search#searchCriteria={\"containAny\":\"basket, platform, umbrella, master protocol, multiarm, multistage, subprotocol, substudy, multi-arm, multi-stage, sub-protocol, sub-study\",\"eeaStartDateFrom\":\"2010-01-01\"}"