diff --git a/NEWS.md b/NEWS.md index 19b4bcc2..5813e027 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,6 +15,7 @@ ## Bug fixes - Correct partial date brackets for `CTGOV2` +- Disable HTTP/2 multiplexing for `CTIS` # ctrdata 1.18.0 (2024-05-13) diff --git a/docs/index.html b/docs/index.html index d7190265..f034b389 100644 --- a/docs/index.html +++ b/docs/index.html @@ -440,8 +440,7 @@

Example workflow# $n # [1] 100
 # Retrieve trials:
diff --git a/docs/news/index.html b/docs/news/index.html
index 5b4a9927..82e23ccf 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -73,6 +73,8 @@ 

ImprovementsBug fixes

  • Correct partial date brackets for CTGOV2
  • +
  • Disable HTTP/2 multiplexing for CTIS +
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 2119be31..e51d9f8a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,7 @@ articles: ctrdata_install: ctrdata_install.html ctrdata_retrieve: ctrdata_retrieve.html ctrdata_summarise: ctrdata_summarise.html -last_built: 2024-06-27T21:45Z +last_built: 2024-06-28T21:00Z urls: reference: https://rfhb.github.io/ctrdata/reference article: https://rfhb.github.io/ctrdata/articles diff --git a/docs/reference/ctrdata-registers.html b/docs/reference/ctrdata-registers.html index eab95eb5..4f7dfcec 100644 --- a/docs/reference/ctrdata-registers.html +++ b/docs/reference/ctrdata-registers.html @@ -94,7 +94,7 @@

2 - Notable changes

3 - References

-
MaterialEUCTRCTGOV2ISRCTNCTIS
Home pagelinklinklinklink
Aboutlinklinklinklink
Terms and conditions, disclaimerlinklinklinklink
How to searchlinklinklinklink
Search interfacelinklinklinklink
Glossarylinklinklink
FAQ, caveats, issueslinklinklinklink
Expert / advanced searchlinklinklinklink
Definitionslinklinklinklink
Example*linklinklinklink

+
MaterialEUCTRCTGOV2ISRCTNCTIS
Home pagelinklinklinklink
Aboutlinklinklinklink
Terms and conditions, disclaimerlinklinklinklink
How to searchlinklinklinklink
Search interfacelinklinklinklink
Glossarylinklinklink
FAQ, caveats, issueslinklinklinklink
Expert / advanced searchlinklinklinklink
Definitionslinklinklinklink
Example*linklinklinklink

4 - Example explanation and ctrdata motivation

diff --git a/docs/reference/dbFindFields.html b/docs/reference/dbFindFields.html index 4574d1a6..927ba5ca 100644 --- a/docs/reference/dbFindFields.html +++ b/docs/reference/dbFindFields.html @@ -140,18 +140,41 @@

Examples) dbFindFields(namepart = "date", con = dbc)[1:5] -#> Using cache of fields. -#> CTGOV CTGOV -#> "completion_date" "last_update_posted" -#> CTGOV CTGOV -#> "last_update_submitted" "last_update_submitted_qc" -#> CTGOV -#> "primary_completion_date" +#> Finding fields in database collection +#> (sampling 5 trial records per register) +#> . +#> . +#> . +#> . +#> . +#> . +#> . +#> . +#> +#> Field names cached for this session. +#> EUCTR +#> "n_date_of_competent_authority_decision" +#> EUCTR +#> "n_date_of_ethics_committee_opinion" +#> EUCTR +#> "p_date_of_the_global_end_of_the_trial" +#> EUCTR +#> "trialChanges.globalAmendments.globalAmendment.date" +#> EUCTR +#> "trialInformation.analysisStageDate" # view all 3350+ fields from all registers: allFields <- dbFindFields(con = dbc, sample = FALSE) -#> Using cache of fields. +#> Finding fields in database collection +#> (may take some time) +#> . +#> . +#> . +#> . +#> . +#> +#> Field names cached for this session. if (interactive()) View(data.frame( register = names(allFields), diff --git a/docs/reference/dbFindIdsUniqueTrials.html b/docs/reference/dbFindIdsUniqueTrials.html index 5449ea5a..4eada4ce 100644 --- a/docs/reference/dbFindIdsUniqueTrials.html +++ b/docs/reference/dbFindIdsUniqueTrials.html @@ -142,6 +142,7 @@

ExamplesdbFindIdsUniqueTrials(con = dbc) #> Searching for duplicate trials... #> - Getting all trial identifiers... +#> (may take some time)... #> , 29 found in collection #> - Finding duplicates among registers' and sponsor ids... #> - 2 EUCTR _id were not preferred EU Member State record for 8 trials diff --git a/docs/search.json b/docs/search.json index a2d0ff36..61df4867 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://rfhb.github.io/ctrdata/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2015 Ralf Herold Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"install-package-ctrdata-on-an-r-system","dir":"Articles","previous_headings":"","what":"Install package ctrdata on an R system","title":"Install R package ctrdata","text":"R Project website (https://www.r-project.org/) provides installers R system. can used software products graphical user interfaces R Studio, Microsoft R Open, Visual Studio Code. General information ctrdata package available : https://rfhb.github.io/ctrdata/. R, execute: using development version package ctrdata, install GitHub: Either install package ctrdata user’s library.","code":"install.packages(\"ctrdata\") # install package under development install.packages(c(\"remotes\")) remotes::install_github(\"rfhb/ctrdata\", dependencies = TRUE, build_vignettes = TRUE)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"internet-access-via-proxy","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Internet access via proxy","title":"Install R package ctrdata","text":"Functions package ctrdata start ctr... require access trial registers internet via https protocol. Many organisations use transparent proxies may require users configurations. However, necessary, package ctrdata can use proxy settings set users R session follows:","code":"Sys.setenv(https_proxy = \"your_proxy.server.domain:8080\") # if needed Sys.setenv(https_proxy_user = \"your_userid:your_password\") # if needed"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"databases-to-use","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Databases to use","title":"Install R package ctrdata","text":"time, PostgreSQL, DuckDB, SQLite MongoDB (local remote) database can used package ctrdata. full SQLite database provided R package RSQLite. Suggested installation instructions PostgreSQL local MongoDB server ; remote MongoDB database server accessible . See speed comparison databases; recommended: DuckDB, PostgreSQL MongoDB local server.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"attach-package-ctrdata","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Attach package ctrdata","title":"Install R package ctrdata","text":"completing installation, attach package user’s library. also check availability additional installation requirements mentioned : Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.17.2. https://cran.r-project.org/package=ctrdata","code":"library(ctrdata)"},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"attach-package-ctrdata","dir":"Articles","previous_headings":"Get started","what":"Attach package ctrdata","title":"Retrieve clinical trial information","text":"Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.18.0. https://cran.r-project.org/package=ctrdata","code":"library(ctrdata) citation(\"ctrdata\")"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"open-registers-advanced-search-page-in-browser","dir":"Articles","previous_headings":"Get started","what":"Open register’s advanced search page in browser","title":"Retrieve clinical trial information","text":"functions open browser, user can start searching trials interest.","code":"# Please review and respect register copyrights: ctrOpenSearchPagesInBrowser( copyright = TRUE ) # Open browser with example search: ctrOpenSearchPagesInBrowser( url = \"cancer&age=under-18\", register = \"EUCTR\" )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"adjust-search-parameters-and-execute-search-in-browser","dir":"Articles","previous_headings":"Get started","what":"Adjust search parameters and execute search in browser","title":"Retrieve clinical trial information","text":"Refine search trials interest listed browser. total number trials can retrieved package ctrdata intentionally limited queries 10,000 result records.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"copy-address-from-browser-address-bar-to-clipboard","dir":"Articles","previous_headings":"Get started","what":"Copy address from browser address bar to clipboard","title":"Retrieve clinical trial information","text":"Use functions keyboard shortcuts according operating system. See automation copy URLs user’s queries supported clinical trial registers.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"get-address-from-clipboard","dir":"Articles","previous_headings":"Get started","what":"Get address from clipboard","title":"Retrieve clinical trial information","text":"next steps executed R environment:","code":"q <- ctrGetQueryUrl() # * Using clipboard content as register query URL: https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer&age=under-18&status=completed&phase=phase-one # * Found search query from EUCTR: query=cancer&age=under-18&status=completed&phase=phase-one q # query-term query-register # 1 query=cancer&age=under-18&status=completed&phase=phase-one EUCTR # To check, this opens a browser with the query ctrOpenSearchPagesInBrowser(url = q)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"retrieve-protocol-related-information-transform-save-to-database-check","dir":"Articles","previous_headings":"Get started","what":"Retrieve protocol-related information, transform, save to database, check","title":"Retrieve clinical trial information","text":"file-base SQLite database, takes 20 seconds 300 records, time needed internet-retrieval slow register. Speed higher registers, using MongoDB memory-based SQLite.","code":"# Count number of trial records ctrLoadQueryIntoDb( queryterm = q, only.count = TRUE )$n # * Found search query from EUCTR: query=cancer&age=under-18&status=completed&phase=phase-one # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # [1] 103 # Connect to a database and chose a collection (table) db <- nodbi::src_sqlite( dbname = \"sqlite_file.sql\", collection = \"test\" ) # Retrieve records, download into database ctrLoadQueryIntoDb( queryterm = q, con = db ) # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # Download status: 6 done; 0 in progress. Total size: 8.73 Mb (100%)... done! # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 414 records on 103 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"test\") # $n # [1] 414 # Show which queries have been downloaded into database dbQueryHistory(con = db) # query-timestamp query-register query-records query-term # 1 2024-05-12 17:56:11 EUCTR 414 query=cancer&age=under-18&status=completed&phase=phase-one"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"repeat-and-update-a-previous-query","dir":"Articles","previous_headings":"","what":"Repeat and update a previous query","title":"Retrieve clinical trial information","text":"Instead “last”, integer number can specified querytoupdate corresponds number using dbQueryHistory(). Depending register, update (differential update) possible original query executed fully .","code":"ctrLoadQueryIntoDb( querytoupdate = \"last\", con = db )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"retrieve-results","dir":"Articles","previous_headings":"","what":"Retrieve results","title":"Retrieve clinical trial information","text":"EUCTR, result-related trial information requested retrieved, take longer download store. CTGOV, results always included retrieval. Note trial documents, including results reports, can downloaded specifying parameter documents.path, see help(ctrLoadQueryIntoDb). file-base SQLite database, takes 4 minutes 300 records, time needed merging result- protocol-related information SQLite; much faster MongoDB PostgreSQL. download presence results recorded dbQueryHistory() availability results increases time.","code":"ctrLoadQueryIntoDb( queryterm = q, euctrresults = TRUE, con = db ) # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 414 records on 103 trial(s) # * Checking results if available from EUCTR for 103 trials: # (1/4) Downloading results... # Download status: 103 done; 0 in progress. Total size: 59.71 Mb (100%)... done! # Download status: 27 done; 0 in progress. Total size: 108.69 Kb (100%)... done! # - extracting results (. = data, F = file[s] and data, x = none): # . . . . . . F . . . . F . . . . . . . F . . . . . . . . . . . . . . . . . . . . . . . . F . F F . F . . # F . . . F F . . . . . F . . . . . . F . . . F . # (2/4) Converting to NDJSON (estimate: 8 s)... # (3/4) Importing results into database (may take some time)... # (4/4) Results history: not retrieved (euctrresultshistory = FALSE) # = Imported or updated results for 76 trials # Updated history (\"meta-info\" in \"test\") # $n # [1] 414"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-information-from-another-register","dir":"Articles","previous_headings":"","what":"Add information from another register","title":"Retrieve clinical trial information","text":"collection can used store (analyse) trial information different registers. Example: file-base SQLite database, takes 10 seconds 200 records. Note example, warning message may issued importing NDJSON file trial records. warning arises high level complexity XML content trial records. issue can resolved increasing operating system stack size available R, see: https://github.com/rfhb/ctrdata/issues/22","code":"ctrLoadQueryIntoDb( queryterm = \"https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. # Note that the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&intr=Drug&aggFilters=ages:child,status:com # # * Found search query from CTGOV2: cond=neuroblastoma&intr=Drug&aggFilters=ages:child,status:com # * Checking trials using CTGOV REST API 2.0, found 222 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 22 MB total) # Download status: 1 done; 0 in progress. Total size: 9.79 Mb (615%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 222 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"test\") # $n # [1] 222"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-records-from-ctis-register-into-the-same-collection","dir":"Articles","previous_headings":"","what":"Add records from CTIS register into the same collection","title":"Retrieve clinical trial information","text":"23 June 2024, 4100 trials publicly accessible CTIS, used since January 2023 new clinical trials European Union (EU). Queries CTIS search interface can automatically copied clipboard user can paste queryterm, see .","code":"# Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = 'searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"}', register = \"CTIS\", con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trial list(s), found 7 trials # (2/4) Downloading and processing trial data... (estimate: 0.6 Mb) # Download status: 7 done; 0 in progress. Total size: 262.58 Kb (100%)... done! # (3/4) Importing records into database... # (4/4) Updating with additional data: . # = Imported 7, updated 7 record(s) on 7 trial(s) # Updated history (\"meta-info\" in \"test\") # $n # [1] 7"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-personal-annotations","dir":"Articles","previous_headings":"","what":"Add personal annotations","title":"Retrieve clinical trial information","text":"downloading trial information, user can specify annotation records downloaded. default, annotations accumulated trial records loaded updated; alternatively, annotations can replaced. Annotations useful analyses, example specially identify subsets records database.","code":"ctrLoadQueryIntoDb( queryterm = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=neuroblastoma&recrs=e&age=0&type=Intr&cntry=DE\"), annotation.text = \"site_DE \", annotation.mode = \"append\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. # Note that the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&type=Intr&cntry=DE # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&country=Germany&aggFilters=ages:child,studyType:int,status:com # # * Found search query from CTGOV2: # cond=neuroblastoma&country=Germany&aggFilters=ages:child,studyType:int,status:com # * Checking trials using CTGOV REST API 2.0, found 16 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 1.6 MB total) # Download status: 1 done; 0 in progress. Total size: 487.83 Kb (492%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 16 trial(s) # = Annotated retrieved records (16 records) # Updated history (\"meta-info\" in \"test\") # $n # [1] 16"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-information-using-trial-identifiers","dir":"Articles","previous_headings":"","what":"Add information using trial identifiers","title":"Retrieve clinical trial information","text":"identifiers clinical trials interest already known, example shows can processed import trial information database collection. involves constructing query combines identifiers iterating sets identifiers. Note combine identifiers using “++” queryterm, register specified. Note CTIS, trial information identified trial identifiers can retrieved one--one, repeating queries trial https://euclinicaltrials.eu/app/#/search?number=2023-503994-39-00.","code":"# ids of trials of interest ctIds <- c( \"NCT00001209\", \"NCT00001436\", \"NCT00187109\", \"NCT01516567\", \"NCT01471782\", \"NCT03042429\", \"NCT00357084\", \"NCT00357500\", \"NCT00365755\", \"NCT00407433\", \"NCT00410657\", \"NCT00436657\", \"NCT00436852\", \"NCT00445965\", \"NCT00450307\", \"NCT00450827\", \"NCT00471679\", \"NCT00486564\", \"NCT00492167\", \"NCT00499616\", \"NCT00503724\", \"NCT00509353\", \"NCT00520936\", \"NCT00536601\", \"NCT00567567\", \"NCT00578864\", \"NCT00601003\", \"NCT00644696\", \"NCT00646230\", \"NCT00659984\", \"NCT00716976\", \"NCT00743496\", \"NCT00793845\", \"NCT00806182\", \"NCT00831844\", \"NCT00867568\", \"NCT00877110\", \"NCT00885326\", \"NCT00918320\", \"NCT00923351\", \"NCT00939770\", \"NCT00960739\" ) # split into sets of each 25 trial ids # (larger sets e.g. 50 may still work) idSets <- split(ctIds, ceiling(seq_along(ctIds) / 25)) # variable to collect import results result <- NULL # iterate over sets of trial ids for (idSet in idSets) { # import setResult <- ctrLoadQueryIntoDb( # for CTGOV2 use: queryterm = paste0(\"term=\", paste0(idSet, collapse = \" \")), # specify register that holds the information register = \"CTGOV2\", con = db ) # append results result <- c(result, list(setResult)) } # inspect results as.data.frame(do.call(rbind, result))[, c(\"n\", \"failed\")] # n failed # 1 25 NULL # 2 17 NULL"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"find-synonyms-of-active-substance-names","dir":"Articles","previous_headings":"","what":"Find synonyms of active substance names","title":"Retrieve clinical trial information","text":"registers automatically expand search terms include alternative terms, codes names active substances. obtain character vector synonyms active substance name, use: names can used queries register.","code":"ctrFindActiveSubstanceSynonyms( activesubstance = \"imatinib\" ) # [1] \"imatinib\" \"Carcemia\" \"Cemivil\" # [4] \"CGP 57148\" \"CGP-57148B\" \"CGP57148B\" # [7] \"Gleevac\" \"Gleevec\" \"Gleevec (Imatinib Mesylate)\" # [10] \"Glevec\" \"Glivec\" \"Imatinib\" # [13] \"Imatinib Mesylate\" \"Imatinib-AFT\" \"NSC #716051\" # [16] \"NSC-716051\" \"QTI571\" \"ST1571\" # [19] \"STI 571\" \"STI-571\" \"STI571\" # [22] \"tyrosine kinase inhibitors\" \"Ziatir\" \"Zoleta\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"using-a-mongodb-database","dir":"Articles","previous_headings":"","what":"Using a MongoDB database","title":"Retrieve clinical trial information","text":"example works free service . Note user name password need encoded. format connection string documented https://docs.mongodb.com/manual/reference/connection-string/. recommended databases, see vignette Install R package ctrdata.","code":"# Specify base uri for remote MongoDB server, # as part of the encoded connection string db <- nodbi::src_mongo( # Note: this provides read-only access url = \"mongodb+srv://DWbJ7Wh:bdTHh5cS@cluster0-b9wpw.mongodb.net\", db = \"dbperm\", collection = \"dbperm\") # Since the above access is read-only, # just obtain fields of interest: dbGetFieldsIntoDf( fields = c(\"a2_eudract_number\", \"e71_human_pharmacology_phase_i\"), con = db) # _id a2_eudract_number e71_human_pharmacology_phase_i # 1 2010-024264-18-3RD 2010-024264-18 TRUE # 2 2010-024264-18-AT 2010-024264-18 TRUE # 3 2010-024264-18-DE 2010-024264-18 TRUE # 4 2010-024264-18-GB 2010-024264-18 TRUE # 5 2010-024264-18-IT 2010-024264-18 TRUE # 6 2010-024264-18-NL 2010-024264-18 TRUE"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"preparations","dir":"Articles","previous_headings":"","what":"Preparations","title":"Summarise and analyse clinical trial information","text":"using MongoDB, faster SQLite, can handle credentials, provides access remote servers can directly retrieve nested elements paths. See README.md Retrieve clinical trial information examples using SQLite. Also PostgreSQL can used database, see Install R package ctrdata. See Retrieve clinical trial information details.","code":"db <- nodbi::src_mongo( url = \"mongodb://localhost\", db = \"my_database_name\", collection = \"my_collection_name\" ) db # MongoDB 7.0.8 (uptime: 265661s) # URL: mongodb://localhost # Database: my_database_name # Collection: my_collection_name # empty collection nodbi::docdb_delete(db, db$collection) # library(ctrdata) # These two queries are similar, for completed interventional (drug) # trials with children with a neuroblastoma from either register ctrLoadQueryIntoDb( # using queryterm and register... queryterm = \"query=neuroblastoma&age=under-18&status=completed\", register = \"EUCTR\", euctrresults = TRUE, con = db ) ctrLoadQueryIntoDb( # or using full URL of search results queryterm = \"https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug\", con = db ) dbQueryHistory(con = db) # query-timestamp query-register query-records query-term # 1 2024-05-12 18:39:52 EUCTR 210 query=neuroblastoma&age=under-18&status=completed # 2 2024-05-12 18:40:10 CTGOV 226 cond=neuroblastoma&recrs=e&age=0&intr=Drug"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"find-fields-variables-of-interest","dir":"Articles","previous_headings":"","what":"Find fields / variables of interest","title":"Summarise and analyse clinical trial information","text":"Specify part name variable interest; variables including deeply nested variable names searched. search fields cached thus accelerated R session, long new ctrLoadQueryIntoDb() executed.","code":"# dbFindFields(namepart = \"date\", sample = FALSE, con = db) # Finding fields in database collection (may take some time) . . . . . # Field names cached for this session. # CTGOV # \"completion_date\" # CTGOV # \"last_update_posted\" # CTGOV # \"last_update_submitted\" # CTGOV # \"last_update_submitted_qc\" # CTGOV # \"primary_completion_date\" # CTGOV # \"provided_document_section.provided_document.document_date\" # CTGOV # \"required_header.download_date\" # CTGOV # \"start_date\" # CTGOV # \"verification_date\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives_es\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives_it\" # EUCTR # \"n_date_of_competent_authority_decision\" # EUCTR # \"n_date_of_ethics_committee_opinion\" # EUCTR # \"p_date_of_the_global_end_of_the_trial\" # EUCTR # \"trialChanges.globalAmendments.globalAmendment.date\" # EUCTR # \"trialChanges.globalInterruptions.globalInterruption.date\" # EUCTR # \"trialChanges.globalInterruptions.globalInterruption.restartDate\" # EUCTR # \"trialInformation.analysisStageDate\" # EUCTR # \"trialInformation.globalEndOfTrialDate\" # EUCTR # \"trialInformation.primaryCompletionDate\" # EUCTR # \"trialInformation.recruitmentStartDate\" # EUCTR # \"x6_date_on_which_this_record_was_first_entered_in_the_eudract_database\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"data-frame-from-database","dir":"Articles","previous_headings":"","what":"Data frame from database","title":"Summarise and analyse clinical trial information","text":"fields interest can obtained database represented R data.frame:","code":"result <- dbGetFieldsIntoDf( c( \"f41_in_the_member_state\", \"f422_in_the_whole_clinical_trial\", \"a1_member_state_concerned\", \"p_end_of_trial_status\", \"n_date_of_competent_authority_decision\", \"a2_eudract_number\", \"overall_status\", \"start_date\", \"primary_completion_date\" ), con = db )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"metadata-from-data-frame","dir":"Articles","previous_headings":"","what":"Metadata from data frame","title":"Summarise and analyse clinical trial information","text":"objects returned functions package include attributes metadata indicate database, table / collection query details. Metadata can reused R. database, variable “_id” unique index record. “_id” NCT number CTGOV records (e.g., “NCT00002560”), EudraCT number EUCTR records including postfix identifying EU Member State (e.g., “2008-001436-12-NL”). relevant de-duplicate records trial can registered CTGOV EUCTR, can records involved country EUCTR. De-duplication done analysis stage enables select trial record taken one register, one EU Member State. basis de-duplication recording additional trial identifiers supplementary fields (variables), checked reported using function dbFindIdsUniqueTrials(): unique ids can used like de-duplicate data.frame created :","code":"attributes(result) # [...] # # $class # [1] \"data.frame\" # # $`ctrdata-dbname` # [1] \"my_database_name\" # # $`ctrdata-table` # [1] \"my_collection_name\" # # $`ctrdata-dbqueryhistory` # query-timestamp query-register query-records query-term # 1 2024-05-12 18:39:52 EUCTR 210 query=neuroblastoma&age=under-18&status=completed # 2 2024-05-12 18:40:10 CTGOV 226 cond=neuroblastoma&recrs=e&age=0&intr=Drug # Obtain de-duplicated trial record ids ids <- dbFindIdsUniqueTrials( preferregister = \"EUCTR\", con = db ) # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 436 found in collection # - Finding duplicates among registers' and sponsor ids... # - 159 EUCTR _id were not preferred EU Member State record for 54 trials # - Keeping 51 / 210 / 0 / 0 / 0 records from EUCTR / CTGOV / ISRCTN / CTIS / CTGOV2 # = Returning keys (_id) of 261 records in collection \"my_collection_name\" # Eliminate duplicate trials records: result <- result[result[[\"_id\"]] %in% ids, ] # nrow(result) # [1] 261"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"simple-analysis---dates","dir":"Articles","previous_headings":"","what":"Simple analysis - dates","title":"Summarise and analyse clinical trial information","text":"data.frame generated dbGetFieldsIntoDf(), fields typed dates, logical, character numbers. typing facilitates using respective type data analysis, example dates base R graphics:","code":"# str(result) # 'data.frame': 261 obs. of 10 variables: # $ _id : chr \"2004-004386-15-DE\" \"2005-000915-80-IT\" ... # $ a1_member_state_concerned : chr \"Germany - BfArM\" \"Italy - Italian Medicines Agency\" ... # $ a2_eudract_number : chr \"2004-004386-15\" \"2005-000915-80\" \"2005-001267-63\" ... # $ f41_in_the_member_state : int NA NA 5 37 70 24 100 35 10 24 ... # $ f422_in_the_whole_clinical_trial : int 230 NA 12 67 70 NA 100 156 2230 NA ... # $ n_date_of_competent_authority_decision: Date, format: \"2005-07-08\" \"2005-04-21\" \"2005-07-08\" ... # $ p_end_of_trial_status : chr \"Completed\" \"Completed\" \"Completed\" \"Completed\" ... # $ overall_status : chr NA NA NA NA ... # $ start_date : Date, format: NA NA NA ... # $ primary_completion_date : Date, format: NA NA NA ... # - attr(*, \"ctrdata-dbname\")= chr \"my_database_name\" # - attr(*, \"ctrdata-table\")= chr \"my_collection_name\" # - attr(*, \"ctrdata-dbqueryhistory\")='data.frame': 2 obs. of 4 variables: # ..$ query-timestamp: chr [1:2] \"2024-05-12 18:39:52\" \"2024-05-12 18:40:10\" # ..$ query-register : chr [1:2] \"EUCTR\" \"CTGOV\" # ..$ query-records : int [1:2] 210 226 # ..$ query-term : chr [1:2] \"query=neuroblastoma&age=under-18&status=completed\" # \"cond=neuroblastoma&recrs=e&age=0&intr=Drug\" # Open file for saving png(\"vignettes/nb1.png\") # Visualise trial start date hist( result[[\"n_date_of_competent_authority_decision\"]], breaks = \"years\" ) box() dev.off()"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"merge-corresponding-fields-from-registers","dir":"Articles","previous_headings":"","what":"Merge corresponding fields from registers","title":"Summarise and analyse clinical trial information","text":"field “n_date_of_competent_authority_decision” used exists EUCTR, yet corresponds field “start_date” CTGOV. Thus, give start trial, two fields can merged analysis, using convenience function dfMergeVariablesRelevel() ctrdata package: sophisticated use dfMergeVariablesRelevel(), values original variables can mapped new values merged variable, follows:","code":"# Merge two variables into a new variable: result$trialstart <- dfMergeVariablesRelevel( result, colnames = c( \"n_date_of_competent_authority_decision\", \"start_date\" ) ) # Plot from both registers png(\"vignettes/nb2.png\") hist( result[[\"trialstart\"]], breaks = \"years\" ) box() dev.off() # First, define how values of the new, merged variable # (e.g., \"ongoing\") will result from values of the # original variable (e.g, \"Recruiting): mapped_values <- list( \"ongoing\" = c( # EUCTR \"Recruiting\", \"Active\", \"Ongoing\", \"Temporarily Halted\", \"Restarted\", # CTGOV \"Active, not recruiting\", \"Enrolling by invitation\", \"Not yet recruiting\", \"ACTIVE_NOT_RECRUITING\", # CTIS \"Ongoing, recruiting\", \"Ongoing, recruitment ended\", \"Ongoing, not yet recruiting\", \"Authorised, not started\" ), \"completed\" = c( \"Completed\", \"COMPLETED\", \"Ended\"), \"other\" = c( \"GB - no longer in EU/EEA\", \"Trial now transitioned\", \"Withdrawn\", \"Suspended\", \"No longer available\", \"Terminated\", \"TERMINATED\", \"Prematurely Ended\", \"Under evaluation\") ) # Secondly, use the list of mapped # values when merging two variable: tmp <- dfMergeVariablesRelevel( result, colnames = c( \"overall_status\", \"p_end_of_trial_status\" ), levelslist = mapped_values ) table(tmp) # ongoing completed other # 4 252 4"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"user-annotations","dir":"Articles","previous_headings":"","what":"User annotations","title":"Summarise and analyse clinical trial information","text":"using ctrLoadQueryIntoDb(), ctrdata adds record fields annotation record_last_import. annotation field single string user specifies retrieving trials (Retrieve clinical trial information). user can specify append, prefix replace existing annotations trial record loaded , see example . last date time trial record imported updated automatically using ctrLoadQueryIntoDb(). fields can also used analysis. example, string functions can used annotations, e.g. split components. Since annotations specified retrieving trials steps , far annotation fields stopifnodata set FALSE avoid function raises error alert users:","code":"# ctrLoadQueryIntoDb( queryterm = \"query=neuroblastoma&resultsstatus=trials-with-results\", register = \"EUCTR\", euctrresults = TRUE, annotation.text = \"test annotation\", annotation.mode = \"append\", con = db ) result <- dbGetFieldsIntoDf( fields = c( \"annotation\", \"record_last_import\" ), con = db ) str(result) # 'data.frame': 482 obs. of 3 variables: # $ _id : chr \"2004-004386-15-DE\" \"2004-004386-15-ES\" \"2004-004386-15-IT\" ... # $ record_last_import: Date, format: \"2024-05-12\" \"2024-05-12\" \"2024-05-12\" ... # $ annotation : chr \"test annotation\" \"test annotation\" \"test annotation\" ..."},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-sample-size-using-historic-versions-of-trial-records","dir":"Articles","previous_headings":"","what":"Analysing sample size using historic versions of trial records","title":"Summarise and analyse clinical trial information","text":"Historic versions can set retrieved CTGOV2 specifying ctgov2history = <...> using ctrLoadQueryIntoDb(); functionality added ctrdata version 1.18.0. Historic versions automatically retrieved CTIS. versions include trial data available date respective version. CTGOV2 records, historic versions added follows ctrdata data model trial record, ellipsis ... represents trial data fields: {\"_id\":\"NCT01234567\", \"title\": \"Current title\", ..., \"history\": [{\"history_version\": {\"version_number\": 1, \"version_date\": \"2020-21-22 10:11:12\"}, \"title\": \"Original title\", ...}, {\"history_version\": {\"number\": 2, \"date\": \"2021-22-23 11:13:13\"}, \"title\": \"Later title\", ...}]} example shows planned realised number participants (sample size) changed time individual trials, using data registers.","code":"# # load some trials from CTGOV2 specifying that # for each trial, 5 versions should be retrieved ctrLoadQueryIntoDb( queryterm = \"https://clinicaltrials.gov/search?cond=neuroblastoma&aggFilters=phase:3,status:com\", con = db, ctgov2history = 5L ) ctrLoadQueryIntoDb( queryterm = \"https://euclinicaltrials.eu/app/#/search?basicSearchInputAND=cancer&ageGroupCode=2\", con = db ) result <- dbGetFieldsIntoDf( fields = c( # CTGOV2 \"history.protocolSection.designModule.enrollmentInfo.count\", \"history.history_version\", # CTIS \"applications.submissionDate\", \"applications.partI.rowSubjectCount\" ), con = db ) # helpers library(dplyr) library(tidyr) library(ggplot2) # mangle and plot result %>% unnest(cols = starts_with(\"history.\")) %>% unnest(cols = starts_with(\"applications.\")) %>% mutate(version_date = as.Date(version_date)) %>% mutate(count = dfMergeVariablesRelevel(., colnames = c( \"history.protocolSection.designModule.enrollmentInfo.count\", \"applications.partI.rowSubjectCount\"))) %>% mutate(date = dfMergeVariablesRelevel(., colnames = c( \"applications.submissionDate\", \"version_date\"))) %>% select(`_id`, count, date) %>% arrange(`_id`, date) %>% group_by(`_id`) %>% ggplot( mapping = aes( x = date, y = count, colour = `_id`) ) + geom_step() + geom_point() + theme_light() + guides(colour = \"none\") ggsave(\"vignettes/samplesizechanges.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-nested-fields-such-as-trial-results","dir":"Articles","previous_headings":"","what":"Analysing nested fields such as trial results","title":"Summarise and analyse clinical trial information","text":"registers represent clinical trial information nesting fields (e.g., several reporting groups within several measures within one several endpoints). visualisation hierarchical representation CTGOV : analysis nested information highlighted duration response facilitated ctrdata follows. main steps : transform nested information long, name-value data frame identify measures interest (e.g. duration response, blue circles ) located information hierarchy specifying name value fields (wherename, wherevalue) finally obtain value specifying name(s) value field(s) (valuename, red circles figure ).","code":"# dbFindFields(\"outcome\", db) # remotes::install_github(\"https://github.com/hrbrmstr/jsonview\") result <- dbGetFieldsIntoDf(\"clinical_results.outcome_list.outcome\", db) jsonview::json_tree_view(result[[\"clinical_results.outcome_list.outcome\"]][ result[[\"_id\"]] == \"NCT00520936\" ]) # 1. Create data frame from results fields. # These are the key results fields from # CTGOV and from EUCTR: result <- dbGetFieldsIntoDf( fields = c( # CTGOV \"clinical_results.baseline.analyzed_list.analyzed.count_list.count\", \"clinical_results.baseline.group_list.group\", \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.outcome_list.outcome\", \"study_design_info.allocation\", # EUCTR \"@attributes.eudractNumber\", \"trialInformation.populationAgeGroup\", \"subjectDisposition.recruitmentDetails\", \"baselineCharacteristics.baselineReportingGroups.baselineReportingGroup\", \"endPoints.endPoint\", \"trialChanges.hasGlobalInterruptions\", \"subjectAnalysisSets\", \"adverseEvents.seriousAdverseEvents.seriousAdverseEvent\" ), con = db ) # Keep only unique trial records result <- result[result[[\"_id\"]] %in% dbFindIdsUniqueTrials(con = db), ] # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 497 found in collection # - Finding duplicates among registers' and sponsor ids... # - 187 EUCTR _id were not preferred EU Member State record for 79 trials # - Keeping 69 / 184 / 20 / 0 / 13 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS # = Returning keys (_id) of 286 records in collection \"my_collection_name\" # 2. The columns of the results data frame # contain nested lists of fields, example: str(result[[\"endPoints.endPoint\"]][1]) # List of 1 # $ :List of 12 # ..$ title : chr \"Primary\" # ..$ readyForValues : chr \"false\" # ..$ countable : chr \"false\" # ..$ unit : chr \"TBC\" # ..$ timeFrame : chr \"TBC\" # ..$ type :List of 1 # .. ..$ value: chr \"ENDPOINT_TYPE.primary\" # ..$ centralTendencyType :List of 1 # .. ..$ value: chr \"MEASURE_TYPE.arithmetic\" # ..$ dispersionType :List of 1 # .. ..$ value: chr \"ENDPOINT_DISPERSION.standardDeviation\" # ..$ categories : chr \"\" # ..$ armReportingGroups : chr \"\" # ..$ subjectAnalysisSetReportingGroups: chr \"\" # ..$ statisticalAnalyses : chr \"\" # All nested data are transformed to a long, # name-value data.frame (resulting in several # hundred rows per trial record): long_result <- dfTrials2Long(df = result) # Total 162238 rows, 152 unique names of variables # 3. Obtain values for fields of interest where # they related to measures of interest. The # parameters can be regular expressions. dor <- dfName2Value( df = long_result, wherename = paste0( \"clinical_results.outcome_list.outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"duration of response\", valuename = paste0( \"clinical_results.*category_list.category.measurement_list.measurement.value|\", \"endPoints.*armReportingGroup.tendencyValues.tendencyValue.value\" ) ) # Returning values for 7 out of 113 trials # Duration of response has been reported variably in # months and days. Here, just select trials reporting # duration of response in months: dor <- dor[ grepl(\"months\", dfName2Value( df = long_result, wherename = paste0( \"clinical_results.*outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"duration of response\", valuename = paste0( \"clinical_results.*measure.units|\", \"endPoints.endPoint.unit\" ) )[[\"value\"]], ignore.case = TRUE ), ] # Returning values for 12 out of 113 trials # the identifier is generated to identify repeated and # nested elements in a trial, so that it permits to # find the valuename that corresponds to the item # for which wherename has wherevalue) dor[, c(\"_id\", \"identifier\", \"value\")] # _id identifier value # 1 2010-019348-37-IT 8.2 7.0 # 2 2010-019348-37-IT 8.3 8.1 # 5 2013-003595-12-SK 6.2 999.0 # 6 2013-003595-12-SK 6.3 999.0 # 7 2013-003595-12-SK 6.4 999.0 # 8 2013-003595-12-SK 6.5 999.0 # 9 2013-003595-12-SK 6.6 999.0 # 10 2013-003595-12-SK 6.7 999.0 # 11 2014-000445-79-DE 3 40.5 # 14 2014-005674-11-3RD 3.4 99999.0 # 15 2015-000230-29-DE 5.1.1 99999.0 # [...]"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-primary-endpoints","dir":"Articles","previous_headings":"","what":"Analysing primary endpoints","title":"Summarise and analyse clinical trial information","text":"Text analysis used many fields trial information registers. example simply categorise type primary endpoint. addition, number subjects extracted compared type primary endpoint.","code":"# Several \"measure\" entries are in \"primary_outcome\". # They are concatenated into a list when specifying # the JSON path \"primary_outcome.measure\" result <- dbGetFieldsIntoDf( c( # CTGOV \"primary_outcome.measure\", \"enrollment\", # EUCTR \"e51_primary_end_points\", # \"f11_trial_has_subjects_under_18\" \"f11_number_of_subjects_for_this_age_range\" ), con = db ) # De-duplicate result <- result[ result[[\"_id\"]] %in% dbFindIdsUniqueTrials(con = db), ] # Merge primary endpoint (pep) result$pep <- dfMergeVariablesRelevel( df = result, colnames = c( \"primary_outcome.measure\", \"e51_primary_end_points\" ) ) # Merge number of subjects result$nsubj <- dfMergeVariablesRelevel( df = result, colnames = c( \"enrollment\", \"f11_number_of_subjects_for_this_age_range\" ) ) # For primary endpoint of interest, # use regular expression on text: result$pep_is_efs <- grepl( pattern = \"((progression|event|relapse|recurrence|disease)[- ]free)|pfs|dfs|efs)\", x = result$pep, ignore.case = TRUE ) # Tabulate table(result$pep_is_efs) # FALSE TRUE # 207 21 # Plot library(ggplot2) ggplot( data = result, aes( x = nsubj, y = pep_is_efs ) ) + geom_boxplot() + scale_x_log10() # Warning message: # Removed 25 rows containing non-finite values (`stat_boxplot()`). ggsave(\"vignettes/boxpep.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysis-methods-and-p-values","dir":"Articles","previous_headings":"","what":"Analysis methods and p values","title":"Summarise and analyse clinical trial information","text":"","code":"# helper normalise_string <- function(x) { x <- gsub(\",\", \"\", x) x <- gsub(\"-\", \" \", x) x <- tolower(x) x <- tools::toTitleCase(x) x <- gsub(\"[ ]+\", \" \", x) x <- trimws(x) x } # get trials into database ctrLoadQueryIntoDb( queryterm = paste0( \"https://clinicaltrials.gov/ct2/results?rslt=With&age=0&intr=Drug&\", \"phase=1&phase=2&strd_s=01%2F01%2F2010&strd_e=12%2F31%2F2012\"), con = db) # get result set result <- dbGetFieldsIntoDf(c( \"start_date\", \"detailed_description.textblock\", \"official_title\", \"eligibility.maximum_age\", \"study_design_info.allocation\", \"primary_outcome.measure\", \"arm_group.arm_group_type\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.method\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.p_value\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.param_type\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.non_inferiority_type\", \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.baseline.analyzed_list.analyzed.count_list.count.value\" ), con = db) # number of participants (last number is typically all groups summed up) # also see README.Rmd for alternative way, summing up non-total groups result$totalparticipants <- vapply( result[[\"clinical_results.baseline.analyzed_list.analyzed.count_list.count.value\"]], FUN = function(x) rev(x)[1], numeric(1L)) # first reported p value for primary endpoint analysis result$pvalueprimaryanalysis <- vapply( result[[\"clinical_results.outcome_list.outcome.analysis_list.analysis.p_value\"]], FUN = function(x) as.numeric(trimws(gsub(\"[<>=]\", \"\", strsplit(x, \" / \")[[1]][1]))), numeric(1)) # statistical method used for primary endpoint analysis result$methodprimaryanalysis <- vapply( result[[\"clinical_results.outcome_list.outcome.analysis_list.analysis.method\"]], FUN = function(x) normalise_string(strsplit(x, \" / \")[[1]][1]), character(1)) # based on allocation arms, keep trials that are likely to investigate safety and efficacy result$controlled <- grepl( \"Placebo|No Intervention\", result$arm_group.arm_group_type, ignore.case = TRUE) table(result$controlled) # FALSE TRUE # 871 326 result <- subset(result, controlled == TRUE) # http://varianceexplained.org/statistics/interpreting-pvalue-histogram/ # http://www.pnas.org/content/100/16/9440.full # plot p values library(ggplot2) ggplot(result, aes(pvalueprimaryanalysis)) + stat_ecdf(geom = \"step\") + labs( title = \"Paediatric phase 2 or 3 interventional trials\\nwith randomisation to placebo or to no intervention\", x = \"Range of p values\", y = \"Empirical cumulative density of p values\\nof primary endpoint results\") + geom_vline(xintercept = 0.05, linetype = 3) ggsave(\"vignettes/phase23_paed_p_values.png\", width = 6, height = 4) # plot sample size v p value ggplot(result, aes(x = totalparticipants, y = pvalueprimaryanalysis)) + geom_point() + ylim(0, 1) + xlim(0, 1000) + scale_x_log10() + geom_hline(yintercept = 0.05, linetype = 3) ggsave(\"vignettes/phase23_paed_p_values_participants.png\", width = 6, height = 4) # statistical method used for primary endpoint analysis tmp <- table(result$methodprimaryanalysis) tmp <- tmp[rev(order(tmp))] tmp <- data.frame(tmp) knitr::kable(tmp[1:10,])"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"investigational-or-authorised-medicinal-product","dir":"Articles","previous_headings":"","what":"Investigational or authorised medicinal product?","title":"Summarise and analyse clinical trial information","text":"information status authorisation (licensing) medicine used trial recorded EUCTR field dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation. corresponding field CTGOV known. status tree starting dimp element.","code":"# library(dplyr) # Get results result <- dbGetFieldsIntoDf( fields = c( \"a1_member_state_concerned\", \"n_date_of_competent_authority_decision\", \"dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation\", \"x6_date_on_which_this_record_was_first_entered_in_the_eudract_database\", \"f422_in_the_whole_clinical_trial\", \"a2_eudract_number\" ), con = db ) # Find first date of authorisation in EU member state tmp <- aggregate( result[[\"n_date_of_competent_authority_decision\"]], by = list(result[[\"a2_eudract_number\"]]), FUN = function(x) min(x) ) result <- merge( x = result, y = tmp, by.x = \"a2_eudract_number\", by.y = \"Group.1\", all.x = TRUE ) result %<>% rowwise() %>% mutate(startdatefirst = min( x, x6_date_on_which_this_record_was_first_entered_in_the_eudract_database, na.rm = TRUE)) # Now de-duplicate result <- result[ result[[\"_id\"]] %in% dbFindIdsUniqueTrials( include3rdcountrytrials = FALSE, con = db), ] # How many of the investigational medicinal product(s) # used in the trial are authorised? number_authorised <- sapply( result[[\"dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation\"]], function(i) length(i[i]) ) table(number_authorised, exclude = \"\") # number_authorised # 0 1 2 3 4 6 8 15 # 26 18 7 5 3 2 1 1 result[[\"any_authorised\"]] <- number_authorised > 0L # Plot library(ggplot2) library(scales) ggplot( data = result, aes( x = startdatefirst, fill = any_authorised ) ) + scale_x_date( breaks = breaks_width(width = \"2 years\"), labels = date_format(\"%Y\") ) + geom_histogram(binwidth = 2 * 365.25) + labs( title = \"Neuroblastoma trials in EU\", x = \"Year of trial authorisation (or entered in EUCTR)\", y = \"Number of trials\", fill = \"Medicine\\nauthorised?\" ) ggsave(\"vignettes/nbtrials.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analyses-using-aggregation-pipeline-and-mapreduce","dir":"Articles","previous_headings":"","what":"Analyses using aggregation pipeline and mapreduce","title":"Summarise and analyse clinical trial information","text":"example analysis functions can run directly MongoDB server, fast consume R resources.","code":"# Load library for database access library(mongolite) # Create R object m to access the # collection db created above: m <- mongo( url = paste0(db[[\"url\"]], \"/\", db[[\"db\"]]), collection = db[[\"collection\"]] ) # Number of records in collection: m$count() # [1] 1490 # Number of EUCTR records, using JSON for query: m$count(query = '{\"_id\": {\"$regex\": \"[0-9]{4}-[0-9]{6}-[0-9]{2}\", \"$options\": \"i\"}}') # [1] 269 # Alternative: m$count(query = '{\"ctrname\": \"EUCTR\"}') # [1] 256 # Number of CTGOV records: m$count(query = '{\"_id\": {\"$regex\": \"NCT[0-9]{8}\", \"$options\": \"i\"}}') # [1] 1220 # Alternative: m$count(query = '{\"ctrname\": \"CTGOV\"}') # [1] 1197 # To best define regular expressions for analyses, # inspect the field (here, primary_outcome.measure): # Regular expressions (\"$regex\") are case insensitive (\"i\") head( m$distinct( key = \"primary_outcome.measure\", query = '{\"ctrname\": \"CTGOV\"}' ) ) # [1] \"% Calories Taken Orally\" \"1-year Progression-free Survival\" # [3] \"10-year Hematologic Cancer Rate\" \"10-year Mortality Rate in Marrow Donors\" # [5] \"10-year Overall Cancer Incidence\" \"17-hydroxyprogesterone Response to ACTH\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"aggregation","dir":"Articles","previous_headings":"Analyses using aggregation pipeline and mapreduce","what":"Aggregation","title":"Summarise and analyse clinical trial information","text":"following example uses aggregation pipeline MongoDB. See details mongo’s aggregation pipleline: https://docs.mongodb.org/manual/core/aggregation-pipeline/","code":"# # Total count of PFS, EFS, RFS or DFS out <- m$aggregate( # Count number of documents in collection that # matches in primary_outcome.measure the # regular expression, pipeline = '[{\"$match\": {\"primary_outcome.measure\": {\"$regex\": \"(progression|event|relapse|recurrence|disease)[- ]free\", \"$options\": \"i\"}}}, {\"$group\": {\"_id\": \"null\", \"count\": {\"$sum\": 1}}}]' ) out # _id count # 1 null 51 # List records of trials with overall survival # as primary endpoint, and list start date out <- m$aggregate( pipeline = '[{\"$match\": {\"primary_outcome.measure\": {\"$regex\": \"overall survival\", \"$options\": \"i\"}}}, {\"$project\": {\"_id\": 1, \"start_date\": 1}}]' ) head(out) # _id start_date # 1 NCT00445965 January 2006 # 2 NCT00793845 August 2008 # 3 NCT00923351 June 2, 2007 # 4 NCT00796510 July 2010 # 5 NCT01182350 September 2011 # 6 NCT01190930 August 9, 2010"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"mapreduce","dir":"Articles","previous_headings":"Analyses using aggregation pipeline and mapreduce","what":"Mapreduce","title":"Summarise and analyse clinical trial information","text":"following examples uses map-reduce operation MongoDB. Note deprecated starting MongoDB 5. information: https://docs.mongodb.com/manual/core/map-reduce/ Thus, query expressed aggregation pipeline.","code":"# Count number of trials by number of study # participants in bins of hundreds of participants: hist <- m$mapreduce( map = \"function() {emit(Math.floor(this.enrollment/100)*100, 1)}\", reduce = \"function(id, counts) {return Array.sum(counts)}\" ) # read as: 141 trials had 0 to less than 100 participants hist[order(hist[[\"_id\"]]), ] # _id value # 33 0 707 # 19 100 162 # 30 200 76 # 10 300 59 # 6 400 30 # 37 500 29 # 26 600 17 # 36 700 21 # 27 800 13 # 8 900 9 # 35 1000 5 # 23 1100 3 # [...] # same as aggregation pipeline, # which is more future proof m$aggregate(pipeline = ' [ { \"$project\": { \"flooredNumber\": { \"$multiply\": [ { \"$floor\": { \"$divide\": [ { \"$toInt\": \"$enrollment\" }, 100 ] } }, 100 ] } } }, { \"$group\": { \"_id\": \"$flooredNumber\", \"count\": { \"$count\": {} } } }, { \"$sort\": { \"_id\": 1 } } ] ') # _id count # 1 NA 317 # 2 0 707 # 3 100 162 # 4 200 76 # 5 300 59 # 6 400 30 # 7 500 29 # 8 600 17 # 9 700 21 # 10 800 13 # [...]"},{"path":"https://rfhb.github.io/ctrdata/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ralf Herold. Author, maintainer.","code":""},{"path":"https://rfhb.github.io/ctrdata/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Herold R (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.18.0.9000, https://rfhb.github.io/ctrdata/, https://cran.r-project.org/package=ctrdata.","code":"@Manual{, title = {ctrdata: Retrieve and Analyze Clinical Trials in Public Registers}, author = {Ralf Herold}, year = {2024}, note = {R package version 1.18.0.9000, https://rfhb.github.io/ctrdata/}, url = {https://cran.r-project.org/package=ctrdata}, }"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"ctrdata-for-aggregating-and-analysing-clinical-trials","dir":"","previous_headings":"","what":"Retrieve and Analyze Clinical Trials in Public Registers","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"package ctrdata provides functions retrieving (downloading) information clinical trials public registers, aggregating analysing information; can used EU Clinical Trials Register (“EUCTR”, https://www.clinicaltrialsregister.eu/) EU Clinical Trials Information System (“CTIS”, https://euclinicaltrials.eu/, see example) ClinicalTrials.gov (“CTGOV” classic 2023 “CTGOV2”, see example) ISRCTN Registry (https://www.isrctn.com/) motivation investigate understand trends design conduct trials, availability patients facilitate using detailed results research meta-analyses. ctrdata package R system, systems tools can used databases created package. README reviewed 2024-06-23 version 1.19.0 (major improvements: removed external dependencies; refactored dbGetFieldsIntoDf(); 🔔 retrieve historic CTGOV2 versions).","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"main-features","dir":"","previous_headings":"","what":"Main features","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Protocol- results-related trial information easily downloaded: Users define query register’s web interface, copy URL enter ctrdata retrieves one go trials found. script can automate copying query URL registers. Personal annotations can made downloading trials. Also, trial documents historic versions available registers trials can downloaded. Downloaded trial information transformed stored collection document-centric database, fast offline access. Information different registers can accumulated single collection. Uses DuckDB, PostgreSQL, RSQLite MongoDB, via R package nodbi: see section Databases . Easily re-run previous query collection retrieve update trial records. analyses, convenience functions ctrdata allow find synonyms active substance, identify unique (de-duplicated) trial records across registers, merge recode fields well easily access deeply-nested fields. Analysis can done R (see vignette) systems, using JSON-structured information database. Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: “Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.17.2, https://cran.r-project.org/package=ctrdata”.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata used unpublished work : Lasch et al. (2022) Impact COVID‐19 Initiation Clinical Trials Europe United States. Clinical Pharmacology & Therapeutics https://doi.org/10.1002/cpt.2534 Sood et al. Managing Evidence Infodemic: Automation Approaches Used Developing NICE COVID-19 Living Guidelines. medRxiv https://doi.org/10.1101/2022.06.13.22276242 🔔 Blogging Innovation coming paediatric research Cancer Research UK (2017) impact collaboration: value UK medical research EU science health","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"id_1-install-package-ctrdata-in-r","dir":"","previous_headings":"Installation","what":"1. Install package ctrdata in R","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata CRAN GitHub. Within R, use following commands install package ctrdata: commands also install package’s dependencies (jsonlite, httr, curl, clipr, xml2, nodbi, stringi, tibble, lubridate, jqr, dplyr, zip V8).","code":"# Install CRAN version: install.packages(\"ctrdata\") # Alternatively, install development version: install.packages(\"devtools\") devtools::install_github(\"rfhb/ctrdata\", build_vignettes = TRUE)"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"id_2-script-to-automatically-copy-users-query-from-web-browser","dir":"","previous_headings":"Installation","what":"2. Script to automatically copy user’s query from web browser","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"optional; works registers supported ctrdata recommended CTIS URL web browser reflect parameters user specified querying register. web browser, install Tampermonkey browser extension, click “New user script” “Tools”, enter “Import URL” URL: https://raw.githubusercontent.com/rfhb/ctrdata/master/tools/ctrdataURLcopier.js last click “Install”. browser extension can disabled enabled user. enabled, URLs user’s queries registers automatically copied clipboard can pasted queryterm = ... parameter function ctrLoadQueryIntoDb()","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"overview-of-functions-in-ctrdata","dir":"","previous_headings":"","what":"Overview of functions in ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"functions listed approximate order use user’s workflow (bold, main functions). See also package documentation overview.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"databases-for-use-with-ctrdata","dir":"","previous_headings":"","what":"Databases for use with ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata retrieves trial information stores database collection, given connection object parameter con several ctrdata functions; connection object created slightly different ways four supported database backends can used ctrdata shown table. speed comparison, see nodbi documentation. Besides ctrdata functions , connection object can equally used functions packages, nodbi (last row table) , case MongoDB database backend, mongolite (see vignettes).","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"data-model-of-ctrdata","dir":"","previous_headings":"","what":"Data model of ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata uses data models implicit data retrieved different registers. mapping provided register’s data model putative target data model. reasons include registers’ data models notably evolving time data fields similar values meaning registers. Thus, handling data different models registers done time analysis. approach allows high level flexibility, transparency reproducibility. See examples help text function dfMergeVariablesRelevel() section Analysis across trials align related fields different registers joint analysis. NoSQL databases, one clinical trial one document, corresponding one row SQLite, PostgreSQL DuckDB table, one document MongoDB collection. NoSQL backends allow documents different structures, used accommodate different data models registers. Package ctrdata stores every document: field _id trial identification provided register retrieved field ctrname name register (EUCTR, CTGOV, CTGOV2, ISRCTN, CTIS) trial retrieved field record_last_import date time document last updated using ctrLoadQueryIntoDb() CTGOV2: object history historic version trial history_version, contains fields version_number (starting 1) version_date original fields provided register trial (see examples ) visualising data structure trial, see vignette section.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Install R package ctrdata Retrieve clinical trial information Summarise analyse clinical trial information","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"example-workflow","dir":"","previous_headings":"","what":"Example workflow","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"aim download protocol-related trial information tabulate trials’ status conduct. Attach package ctrdata: See help get started ctrdata: Information trial registers can used ctrdata (last updated 2024-06-23): Open registers’ advanced search pages browser: Adjust search parameters execute search browser trials interest listed browser, copy address browser’s address bar clipboard (can automate , see ) Search used example: https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer&age=-18&phase=phase-one&status=completed Get address clipboard: 🔔 Queries trial registers can automatically copied clipboard (including “CTIS”, URL show query) using solution . Retrieve protocol-related information, transform save database: database collection specified first, using nodbi (see specify PostgreSQL, RSQlite, DuckDB MongoDB backend, see section Databases). , trial information retrieved loaded collection: hood, EUCTR plain text XML files EUCTR, CTGOV, ISRCTN converted using Javascript via V8 R NDJSON, imported database collection. Analyse Tabulate status trials part agreed paediatric development program (paediatric investigation plan, PIP). ctrdata functions return data.frame (tibble, package tibble loaded). Add records another register (CTGOV) collection new website API introduced July 2023 (https://www.clinicaltrials.gov/) supported ctrdata since mid-2023 identified ctrdata CTGOV2. 2024-06-25, CTGOV retired classic website API used ctrdata since 2015. support users, ctrdata however automatically translates redirects queries current website. helps automatically updating previously loaded queries (ctrLoadQueryIntoDb(querytoupdate = )), manually migrating queries reproducible work clinical trials information. new functionality ctrdata translates user’s search query URL classic website query current CTGOV website, search parameters. Going forward, users recommended change use CTGOV2 queries. regards study data, important differences exist field names contents information retrieved using CTGOV CTGOV2; see XML schema study records CTGOV REST API CTGOV2. details, call help(\"ctrdata-registers\"). one reasons ctrdata handles situation two different registers continue identify current API register = \"CTGOV2\", support analysis stage. Note loading trials ctrdata overwrites previous record CTGOV2 data, whether previous record retrieved using CTGOV CTGOV queries. Search used example: https://www.clinicaltrials.gov/search?cond=Neuroblastoma&aggFilters=ages:child,results:,studyType:int Using example classic CTGOV: https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&rslt=&recrs=e&age=0&intr=Drug Add records third register (ISRCTN) collection Search used example: https://www.isrctn.com/search?q=neuroblastoma Add records fourth register (CTIS 🔔) collection Queries CTIS search interface can automatically copied clipboard user can paste queryterm, see . Subsequent relaunch CTIS 2024-06-17, 4200 trials publicly accessible CTIS. See download documents CTIS. Analysis across trials Show cumulative start trials time. Analysis across registers Result-related trial information Analyse simple result details, CTGOV2 (see vignette examples): Neuroblastoma trials Download documents: retrieve protocols, statistical analysis plans documents local folder ./files-.../","code":"library(ctrdata) help(\"ctrdata\") help(\"ctrdata-registers\") ctrOpenSearchPagesInBrowser() # Please review and respect register copyrights: ctrOpenSearchPagesInBrowser(copyright = TRUE) q <- ctrGetQueryUrl() # * Using clipboard content as register query URL: # https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer& # age=under-18&phase=phase-one&status=completed # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one&status=completed q # query-term query-register # 1 query=cancer&age=under-18&phase=phase-one&status=completed EUCTR # Connect to (or create) an SQLite database # stored in a file on the local system: db <- nodbi::src_sqlite( dbname = \"some_database_name.sqlite_file\", collection = \"some_collection_name\" ) # Retrieve trials from public register: ctrLoadQueryIntoDb( queryterm = q, euctrresults = TRUE, con = db ) # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one&status=completed # * Checking trials in EUCTR... # Retrieved overview, multiple records of 104 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # Download status: 6 done; 0 in progress. Total size: 8.91 Mb (100%)... done! # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 418 records on 104 trial(s) # * Checking results if available from EUCTR for 104 trials: # (1/4) Downloading results... # Download status: 104 done; 0 in progress. Total size: 59.72 Mb (100%)... done! # Download status: 28 done; 0 in progress. Total size: 112.71 Kb (100%)... done! # - extracting results (. = data, F = file[s] and data, x = none): # F . F F . F . . F . . . F F . . . . . . . . . . . . . . . . . . F . . . . . . F . . # . F . . . . . . . . . F . . . . F . . . . . F . . . . . . . . . . . # (2/4) Converting to NDJSON (estimate: 8 s)... # (3/4) Importing results into database (may take some time)... # (4/4) Results history: not retrieved (euctrresultshistory = FALSE) # = Imported or updated results for 76 trials # No history found in expected format. # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 418 # Get all records that have values in the fields of interest: result <- dbGetFieldsIntoDf( fields = c( \"a7_trial_is_part_of_a_paediatric_investigation_plan\", \"p_end_of_trial_status\", \"a2_eudract_number\" ), con = db ) # Find unique (deduplicated) trial identifiers for trials that have more than # one record, for example for several EU Member States or in several registers: uniqueids <- dbFindIdsUniqueTrials(con = db) # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 418 found in collection # - Finding duplicates among registers' and sponsor ids... # - 314 EUCTR _id were not preferred EU Member State record for 104 trials # - Keeping 104 / 0 / 0 / 0 / 0 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS # = Returning keys (_id) of 104 records in collection \"some_collection_name\" # Keep only unique / de-duplicated records: result <- subset( result, subset = `_id` %in% uniqueids ) # Tabulate the selected clinical trial information: with( result, table( p_end_of_trial_status, a7_trial_is_part_of_a_paediatric_investigation_plan ) ) # a7_trial_is_part_of_a_paediatric_investigation_plan # p_end_of_trial_status FALSE TRUE # Completed 50 23 # GB - no longer in EU/EEA 1 1 # Ongoing 4 3 # Prematurely Ended 2 3 # Restarted 0 1 # Temporarily Halted 1 1 # Trial now transitioned 1 0 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = \"cond=Neuroblastoma&aggFilters=ages:child,results:with,studyType:int\", register = \"CTGOV2\", con = db ) # * Appears specific for CTGOV REST API 2.0 # * Found search query from CTGOV2: cond=Neuroblastoma&aggFilters=ages:child,results:with,studyType:int # * Checking trials using CTGOV REST API 2.0, found 100 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 10 MB total) # Download status: 1 done; 0 in progress. Total size: 9.19 Mb (805%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 100 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 100 # Retrieve trials: ctrLoadQueryIntoDb( queryterm = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=neuroblastoma&rslt=With&recrs=e&age=0&intr=Drug\"), con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that # the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&rslt=With&recrs=e&age=0&intr=Drug # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&intr=Drug&aggFilters=ages:child,results:with,status:com # # * Found search query from CTGOV2: cond=neuroblastoma&intr=Drug&aggFilters=ages:child,results:with,status:com # * Checking trials using CTGOV REST API 2.0, found 62 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 6.2 MB total) # Download status: 1 done; 0 in progress. Total size: 7.12 Mb (937%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 62 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 62 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = \"https://www.isrctn.com/search?q=neuroblastoma\", con = db ) # * Found search query from ISRCTN: q=neuroblastoma # * Checking trials in ISRCTN... # Retrieved overview, records of 9 trial(s) are to be downloaded (estimate: 0.2 MB) # (1/3) Downloading trial file... # Download status: 1 done; 0 in progress. Total size: 93.28 Kb (100%)... done! # (2/3) Converting to NDJSON (estimate: 0.05 s)... # (3/3) Importing records into database... # = Imported or updated 9 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 9 # See how many trials are in CTIS publicly accessible: ctrLoadQueryIntoDb( queryterm = \"\", register = \"CTIS\", only.count = TRUE, con = db ) # $n # [1] 4194 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = paste0( 'https://euclinicaltrials.eu/ctis-public/search#', 'searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"}'), con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trials list, found 7 trials # (2/4) Downloading and processing trial data... (estimate: 0.6 Mb) # Download status: 7 done; 0 in progress. Total size: 262.58 Kb (100%)... done! # (3/4) Importing records into database... # (4/4) Updating with additional data: . # = Imported 7, updated 7 record(s) on 7 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 7 allFields <- dbFindFields(\".*\", db, sample = TRUE) # Finding fields in database collection (sampling 5 trial records per register) . . . . . . . . # Field names cached for this session. length(allFields[grepl(\"CTIS\", names(allFields))]) # [1] 618 # root field names in CTIS ctisFields <- allFields[grepl(\"CTIS\", names(allFields))] ctisFields[!grepl(\"[.]\", ctisFields)] # CTIS CTIS CTIS CTIS # \"ageGroup\" \"authorizedApplication\" \"correctiveMeasures\" \"ctNumber\" # CTIS CTIS CTIS CTIS # \"ctPublicStatus\" \"ctPublicStatusCode\" \"ctrname\" \"ctStatus\" # CTIS CTIS CTIS CTIS # \"decisionDate\" \"decisionDateOverall\" \"documents\" \"events\" # CTIS CTIS CTIS CTIS # \"gender\" \"lastUpdated\" \"publishDate\" \"record_last_import\" # CTIS CTIS CTIS CTIS # \"recruitmentStatus\" \"results\" \"resultsFirstReceived\" \"sponsorType\" # CTIS CTIS CTIS CTIS # \"startDateEU\" \"therapeuticAreas\" \"totalNumberEnrolled\" \"trialCountries\" # CTIS CTIS # \"trialPhase\" \"trialRegion\" # use an alternative to dbGetFieldsIntoDf() allData <- nodbi::docdb_query(src = db, key = db$collection, query = '{\"ctrname\":\"CTIS\"}') # names of top-level data items sort(names(allData)) # [1] \"_id\" \"ageGroup\" \"authorizedApplication\" \"correctiveMeasures\" # [5] \"ctNumber\" \"ctPublicStatus\" \"ctPublicStatusCode\" \"ctrname\" # [9] \"ctStatus\" \"decisionDate\" \"decisionDateOverall\" \"documents\" # [13] \"events\" \"gender\" \"lastUpdated\" \"publishDate\" # [17] \"record_last_import\" \"recruitmentStatus\" \"results\" \"resultsFirstReceived\" # [21] \"sponsorType\" \"startDateEU\" \"therapeuticAreas\" \"totalNumberEnrolled\" # [25] \"trialCountries\" \"trialPhase\" \"trialRegion\" # use yet another alternative oneTrial <- DBI::dbGetQuery( db$con, paste0( \"SELECT json(json) FROM \", db$collection, \" WHERE jsonb_extract(json, '$.ctrname') == 'CTIS'\", \" LIMIT 1;\")) # display full json tree # remotes::install_github(\"hrbrmstr/jsonview\") if (require(jsonview)) json_tree_view(oneTrial[[1]]) # total size of object format(object.size(allData), \"MB\") # [1] \"1.4 Mb\" # use helper library library(dplyr) library(magrittr) library(tibble) library(purrr) library(tidyr) # get names of all fields / variables in the collaction length(dbFindFields(\".*\", con = db)) # [1] 1667 dbFindFields(\"start.*date|date.*decision\", con = db) # Using cache of fields. # - Get trial data result <- dbGetFieldsIntoDf( fields = c( \"ctrname\", \"record_last_import\", # CTGOV2 \"protocolSection.statusModule.startDateStruct.date\", \"protocolSection.statusModule.overallStatus\", # EUCTR \"n_date_of_competent_authority_decision\", \"trialInformation.recruitmentStartDate\", # needs above: 'euctrresults = TRUE' \"p_end_of_trial_status\", # ISRCTN \"trialDesign.overallStartDate\", \"trialDesign.overallEndDate\", # CTIS \"authorizedPartI.trialDetails.trialInformation.trialDuration.estimatedRecruitmentStartDate\", \"ctStatus\" ), con = db ) # - Deduplicate trials and obtain unique identifiers # for trials that have records in several registers # - Calculate trial start date # - Calculate simple status for ISRCTN # - Update end of trial status for EUCTR result %<>% filter(`_id` %in% dbFindIdsUniqueTrials(con = db)) %>% rowwise() %>% mutate(start = max(c_across(matches(\"(date.*decision)|(start.*date)\")), na.rm = TRUE)) %>% mutate(isrctnStatus = if_else(trialDesign.overallEndDate < record_last_import, \"Ongoing\", \"Completed\")) %>% mutate(p_end_of_trial_status = if_else( is.na(p_end_of_trial_status) & !is.na(n_date_of_competent_authority_decision), \"Ongoing\", p_end_of_trial_status)) %>% ungroup() # - Merge fields from different registers with re-leveling statusValues <- list( \"ongoing\" = c( # EUCTR \"Recruiting\", \"Active\", \"Ongoing\", \"Temporarily Halted\", \"Restarted\", # CTGOV \"Active, not recruiting\", \"Enrolling by invitation\", \"Not yet recruiting\", \"ACTIVE_NOT_RECRUITING\", # CTIS \"Ongoing, recruiting\", \"Ongoing, recruitment ended\", \"Ongoing, not yet recruiting\", \"Authorised, not started\" ), \"completed\" = c( \"Completed\", \"COMPLETED\", \"Ended\"), \"other\" = c( \"GB - no longer in EU/EEA\", \"Trial now transitioned\", \"Withdrawn\", \"Suspended\", \"No longer available\", \"Terminated\", \"TERMINATED\", \"Prematurely Ended\", \"Under evaluation\") ) result[[\"state\"]] <- dfMergeVariablesRelevel( df = result, colnames = c( \"p_end_of_trial_status\", \"protocolSection.statusModule.overallStatus\", \"ctStatus\", \"isrctnStatus\" ), levelslist = statusValues ) # - Plot example library(ggplot2) ggplot(result) + stat_ecdf(aes(x = start, colour = state)) + labs( title = \"Evolution over time of a set of trials\", subtitle = \"Data from EUCTR, CTIS, ISRCTN, CTGOV2\", x = \"Date of start (proposed or realised)\", y = \"Cumulative proportion of trials\", colour = \"Current status\", caption = Sys.Date() ) ggsave( filename = \"man/figures/README-ctrdata_across_registers.png\", width = 5, height = 3, units = \"in\" ) # Get all records that have values in any of the specified fields: result <- dbGetFieldsIntoDf( fields = c( # fields from CTGOV2 only \"resultsSection.baselineCharacteristicsModule.denoms.counts.value\", \"resultsSection.baselineCharacteristicsModule.denoms.units\", \"resultsSection.baselineCharacteristicsModule.groups.title\", \"protocolSection.armsInterventionsModule.armGroups.type\", \"protocolSection.designModule.designInfo.allocation\", \"protocolSection.contactsLocationsModule.locations.city\", \"protocolSection.conditionsModule.conditions\" ), con = db ) # Mangle to calculate: # - which columns with values for group counts are not labelled Total # - what are the numbers in each of the groups etc. result %<>% rowwise() %>% mutate( number_of_arms = stringi::stri_count_fixed( resultsSection.baselineCharacteristicsModule.groups.title, \" / \"), is_randomised = case_when( protocolSection.designModule.designInfo.allocation == \"RANDOMIZED\" ~ TRUE, protocolSection.designModule.designInfo.allocation == \"NON_RANDOMIZED\" ~ FALSE, number_of_arms == 1L ~ FALSE, .default = FALSE ), which_not_total = list(which(strsplit( resultsSection.baselineCharacteristicsModule.groups.title, \" / \")[[1]] != \"Total\")), num_sites = length(strsplit(protocolSection.contactsLocationsModule.locations.city, \" / \")[[1]]), num_participants = sum(as.integer( resultsSection.baselineCharacteristicsModule.denoms.counts.value[which_not_total])), num_arms_or_groups = max(number_of_arms, length(which_not_total)) ) # Inspect: View(result) # Example plot: library(ggplot2) ggplot(data = result) + labs( title = \"Trials including patients with a neuroblastoma\", subtitle = \"ClinicalTrials.Gov, trials with results\" ) + geom_point( mapping = aes( x = num_sites, y = num_participants, size = num_arms_or_groups, colour = is_randomised ) ) + scale_x_log10() + scale_y_log10() + labs( x = \"Number of sites\", y = \"Total number of participants\", colour = \"Randomised?\", size = \"# Arms / groups\", caption = Sys.Date() ) ggsave( filename = \"man/figures/README-ctrdata_results_neuroblastoma.png\", width = 5, height = 3, units = \"in\" ) ### EUCTR document files can be downloaded when results are requested # All files are downloaded and saved (documents.regexp is not used with EUCTR) ctrLoadQueryIntoDb( queryterm = \"query=cancer&age=under-18&phase=phase-one\", register = \"EUCTR\", euctrresults = TRUE, documents.path = \"./files-euctr/\", con = db ) # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one # [...] # Created directory ./files-euctr/ # Downloading trials... # [...] # = Imported or updated results for 121 trials # = documents saved in './files-euctr' ### CTGOV files are downloaded, here corresponding to the default of # documents.regexp = \"prot|sample|statist|sap_|p1ar|p2ars|ctalett|lay|^[0-9]+ \" ctrLoadQueryIntoDb( queryterm = \"cond=Neuroblastoma&type=Intr&recrs=e&phase=1&u_prot=Y&u_sap=Y&u_icf=Y\", register = \"CTGOV\", documents.path = \"./files-ctgov/\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that # the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=Neuroblastoma&type=Intr&recrs= # &phase=1&u_prot=Y&u_sap=Y&u_icf=Y # # with this URL: # # https://clinicaltrials.gov/search?cond=Neuroblastoma&aggFilters=phase:2, # docs:prot sap icf,studyType:int,status:com # # * Found search query from CTGOV2: cond=Neuroblastoma&aggFilters=phase:2, # docs:prot sap icf,studyType:int,status:com # * Checking trials using CTGOV REST API 2.0, found 26 trials # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-ctgov/ # - Created directory ./files-ctgov # - Creating subfolder for each trial # - Applying 'documents.regexp' to 34 documents # - Downloading 34 missing documents # Download status: 34 done; 0 in progress. Total size: 69.68 Mb (100%)... done! # = Newly saved 34 document(s) for 26 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-ctgov ### CTGOV2 files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = \"https://clinicaltrials.gov/search?cond=neuroblastoma&aggFilters=phase:1,results:with\", documents.path = \"./files-ctgov2/\", con = db ) # * Found search query from CTGOV2: cond=neuroblastoma&aggFilters=phase:1,results:with # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-ctgov2/ # - Created directory ./files-ctgov2 # - Creating subfolder for each trial # - Applying 'documents.regexp' to 35 documents # - Downloading 35 missing documents # Download status: 35 done; 0 in progress. Total size: 76.64 Mb (100%)... done! # = Newly saved 35 document(s) for 22 trial(s); 0 document(s) for 0 trial(s) already # existed in ./files-ctgov2 ### ISRCTN files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = \"https://www.isrctn.com/search?q=alzheimer\", documents.path = \"./files-isrctn/\", con = db ) # * Found search query from ISRCTN: q=alzheimer # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-isrctn/ # - Created directory ./files-isrctn # - Creating subfolder for each trial # - Applying 'documents.regexp' to 41 documents # - Downloading 26 missing documents # Download status: 26 done; 0 in progress. Total size: 12.83 Mb (100%)... done! # Download status: 2 done; 0 in progress. Total size: 6.56 Kb (100%)... done! # = Newly saved 24 document(s) for 12 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-isrctn ### CTIS files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = paste0( 'https://euclinicaltrials.eu/ctis-public/search#', 'searchCriteria={\"containAll\":\"\",\"containAny\":\"cancer\",\"containNot\":\"\"}'), documents.path = \"./files-ctis/\", con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"cancer\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trial list(s), found 1109 trials # (2/4) Downloading and processing trial data... (estimate: 100 Mb) # (3/4) Importing records into database... # (4/4) Updating with additional data: . # * Checking for documents... # - Downloading documents into 'documents.path' = ./files-ctis/ # - Created directory ./files-ctis # - Creating subfolder for each trial # - Applying 'documents.regexp' to 20 documents # - Downloading 13 missing documents # Download status: 13 done; 0 in progress. Total size: 8.07 Mb (100%)... done! # = Newly saved 13 document(s) for 4 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-ctis # = Imported 1109, updated 1109 record(s) on 1109 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 1109"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"tests","dir":"","previous_headings":"","what":"Tests","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"See also https://app.codecov.io/gh/rfhb/ctrdata/tree/master/R","code":"tinytest::test_all() # test_ctrdata_ctrfindactivesubstance.R 4 tests OK 1.6s # test_ctrdata_duckdb_ctgov2.R.. 50 tests OK 2.4s # test_ctrdata_duckdb_ctis.R.... 172 tests OK 15.2s # test_ctrdata_mongo_local_ctgov.R 51 tests OK 57.7s # test_ctrdata_other_functions.R 64 tests OK 3.8s # test_ctrdata_postgres_ctgov2.R 50 tests OK 2.6s # test_ctrdata_sqlite_ctgov.R... 52 tests OK 56.0s # test_ctrdata_sqlite_ctgov2.R.. 50 tests OK 2.3s # test_ctrdata_sqlite_ctis.R.... 194 tests OK 12.5s # test_ctrdata_sqlite_euctr.R... 105 tests OK 1.3s # test_ctrdata_sqlite_isrctn.R.. 38 tests OK 21.4s # test_euctr_error_sample.R..... 8 tests OK 0.9s # All ok, 838 results (38m 48.8s) covr::package_coverage(path = \".\", type = \"tests\") # ctrdata Coverage: 93.68% # R/zzz.R: 80.95% # R/ctrRerunQuery.R: 89.16% # R/ctrLoadQueryIntoDbEuctr.R: 90.03% # R/utils.R: 90.89% # R/ctrLoadQueryIntoDbIsrctn.R: 92.11% # R/dbGetFieldsIntoDf.R: 93.06% # R/ctrLoadQueryIntoDbCtgov2.R: 94.05% # R/ctrLoadQueryIntoDb.R: 94.12% # R/ctrLoadQueryIntoDbCtis.R: 94.13% # R/ctrLoadQueryIntoDbCtgov.R: 95.04% # R/dbFindFields.R: 95.24% # R/ctrGetQueryUrl.R: 96.00% # R/ctrOpenSearchPagesInBrowser.R: 97.22% # R/dfMergeVariablesRelevel.R: 97.30% # R/dfTrials2Long.R: 97.35% # R/dbFindIdsUniqueTrials.R: 97.77% # R/dfName2Value.R: 98.61% # R/ctrFindActiveSubstanceSynonyms.R: 100.00% # R/dbQueryHistory.R: 100.00%"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"future-features","dir":"","previous_headings":"","what":"Future features","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"See project outline https://github.com/users/rfhb/projects/1 Canonical definitions, filters, calculations works (since August 2023) data mangling analyses across registers, e.g. define study population, identify interventional trials, calculate study duration; public collaboration canonical scripts speed harmonising analyses. Merge results-related fields retrieved different registers, corresponding endpoints (work yet started). challenge incomplete congruency different structure data fields. Authentication, expected required CTGOV2; specifications yet known (work yet started). Explore registers ICTRP (authentication needed), JPRN, jRCT, UMIN-CTR, ChiCTR (exploration continually ongoing; added value, terms conditions programmatic access vary; clear roadmap established yet). Retrieve previous versions protocol- results-related information. challenges include, historic versions can retrieved one--one, include results, structured format. (functionality available version 1.17.2.9000 extent seems reasonably possible time, namely protocol-related information CTIS protocol- results-related information CTGOV2)","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Data providers curators clinical trial registers. Please review respect copyrights terms conditions, see ctrOpenSearchPagesInBrowser(copyright = TRUE). Package ctrdata made possible building work done R, clipr. curl, dplyr, duckdb, httr, jqr, jsonlite, lubridate, mongolite, nodbi, RPostgres, RSQLite, rvest, stringi xml2.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"issues-and-notes","dir":"","previous_headings":"Acknowledgements","what":"Issues and notes","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Please file issues bugs . Also check handle closed issues, e.g. C stack usage close limit SSL certificate problem: unable get local issuer certificate Information trial registers may fully correct; see example publication CTGOV. attempts made harmonise field names registers (nevertheless, dfMergeVariablesRelevel() can used merge map several variables / fields one).","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"postgresql","dir":"","previous_headings":"Trial records’ JSON in databases","what":"PostgreSQL","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation PostgreSQL","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"mongodb","dir":"","previous_headings":"Trial records’ JSON in databases","what":"MongoDB","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation MongoDB","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"sqlite","dir":"","previous_headings":"Trial records’ JSON in databases","what":"SQLite","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation SQLite","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and prepare nodbi connection object for ctrdata — ctrDb","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"Check prepare nodbi connection object ctrdata","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"","code":"ctrDb(con)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"con connection object, see section `Databases` ctrdata.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"Connection object list, collection element root","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":null,"dir":"Reference","previous_headings":"","what":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"active substance can identified recommended international nonproprietary name (INN), trade product name, company code(s). find likely synonyms, function retrieves CTGOV2 field protocolSection.armsInterventionsModule.interventions.otherNames. Note free error checked manually.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"","code":"ctrFindActiveSubstanceSynonyms(activesubstance = \"\", verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"activesubstance active substance, atomic character vector verbose Print number studies found CTGOV2 `activesubstance`","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"character vector active substance (input parameter) synonyms, NULL active substance found may invalid","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"","code":"if (FALSE) { ctrFindActiveSubstanceSynonyms(activesubstance = \"imatinib\") # [1] \"imatinib\" \"Carcemia\" \"Cemivil\" # [4] \"CGP 57148\" \"CGP-57148B\" \"CGP57148B\" # [7] \"Gleevac\" \"gleevec\" \"Gleevec (Imatinib Mesylate)\" # [10] \"Glevec\" \"glivec\" \"Imatinib\" # [13] \"imatinib mesylate\" \"Imatinib-AFT\" \"IND # 55666\" # [16] \"NSC #716051\" \"NSC-716051\" \"QTI571\" # [19] \"ST1571\" \"STI 571\" \"STI-571\" # [22] \"STI571\" \"tyrosine kinase inhibitors\" }"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query details — ctrGetQueryUrl","title":"Get query details — ctrGetQueryUrl","text":"Extracts query parameters register name parameter `url` clipboard, URL register search copied.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query details — ctrGetQueryUrl","text":"","code":"ctrGetQueryUrl(url = \"\", register = \"\")"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query details — ctrGetQueryUrl","text":"url URL browser address bar. specified, clipboard contents checked suitable URL. automatically copying user's query register web browser clipboard, see . Can also contain query term dbQueryHistory()[\"query-term\"]. register Optional name register (one \"EUCTR\", \"CTGOV2\" \"ISRCTN\" \"CTIS\") case `url` query term full URL","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query details — ctrGetQueryUrl","text":"data frame (tibble, tibble loaded) column names `query-term` `query-register`. data frame (tibble) can passed parameter `query-term` ctrLoadQueryIntoDb parameter `url` ctrOpenSearchPagesInBrowser.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get query details — ctrGetQueryUrl","text":"","code":"# user copied into the clipboard the URL from # the address bar of the browser that shows results # from a query in one of the trial registers if (interactive()) try(ctrGetQueryUrl(), silent = TRUE) # extract query parameters from search result URL # (URL was cut for the purpose of formatting only) ctrGetQueryUrl( url = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=&term=AREA%5BMaximumAge%5D+RANGE%5B0+days%2C+28+days%5D\", \"&type=Intr&rslt=&age_v=&gndr=&intr=Drugs%2C+Investigational\", \"&titles=&outc=&spons=&lead=&id=&cntry=&state=&city=&dist=\", \"&locn=&phase=2&rsub=&strd_s=01%2F01%2F2015&strd_e=01%2F01%2F2016\", \"&prcd_s=&prcd_e=&sfpd_s=&sfpd_e=&rfpd_s=&rfpd_e=&lupd_s=&lupd_e=&sort=\" ) ) #> * Appears specific for CTGOV Classic website #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=AREA%5BMaximumAge%5D+RANGE%5B0+days%2C+28+days%5D&type=Intr&intr=Drugs%2C+Investigational&phase=2&strd_s=01%2F01%2F2015&strd_e=01%2F01%2F2016 #> #> with this URL: #> #> https://clinicaltrials.gov/search?start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> * Found search query from CTGOV2: start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> query-term #> 1 start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> query-register #> 1 CTGOV2 ctrGetQueryUrl(\"https://www.clinicaltrialsregister.eu/ctr-search/trial/2007-000371-42/results\") #> * Found search query from EUCTR: query=2007-000371-42 #> query-term query-register #> 1 query=2007-000371-42 EUCTR ctrGetQueryUrl(\"https://euclinicaltrials.eu/ctis-public/view/2022-500041-24-00\") #> * Found search query from CTIS: searchCriteria={\"containAll\":\"2022-500041-24-00\",\"containAny\":\"\",\"containNot\":\"\"} #> query-term #> 1 searchCriteria={\"containAll\":\"2022-500041-24-00\",\"containAny\":\"\",\"containNot\":\"\"} #> query-register #> 1 CTIS ctrGetQueryUrl(\"https://classic.clinicaltrials.gov/ct2/show/NCT01492673?cond=neuroblastoma\") #> * Appears specific for CTGOV Classic website #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click 'Return to List' in browser and use this as 'url'. #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=NCT01492673 #> #> with this URL: #> #> https://clinicaltrials.gov/search?term=NCT01492673 #> * Found search query from CTGOV2: term=NCT01492673 #> query-term query-register #> 1 term=NCT01492673 CTGOV2 ctrGetQueryUrl(\"https://clinicaltrials.gov/ct2/show/NCT01492673?cond=neuroblastoma\") #> * Appears specific for CTGOV Classic website #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click 'Return to List' in browser and use this as 'url'. #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=NCT01492673 #> #> with this URL: #> #> https://clinicaltrials.gov/search?term=NCT01492673 #> * Found search query from CTGOV2: term=NCT01492673 #> query-term query-register #> 1 term=NCT01492673 CTGOV2 ctrGetQueryUrl(\"https://clinicaltrials.gov/study/NCT01467986?aggFilters=ages:child\") #> * Appears specific for CTGOV REST API 2.0 #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click on 'Search Results' in browser and use this as 'url'. #> * Found search query from CTGOV2: id=NCT01467986 #> query-term query-register #> 1 id=NCT01467986 CTGOV2 ctrGetQueryUrl(\"https://www.isrctn.com/ISRCTN70039829\") #> * Found search query from ISRCTN: q=ISRCTN70039829 #> query-term query-register #> 1 q=ISRCTN70039829 ISRCTN"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load and store register trial information — ctrLoadQueryIntoDb","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"Retrieves information clinical trials registers stores collection database. Main function ctrdata accessing registers. collection can store trial information different queries different registers. Query details stored collection can accessed using dbQueryHistory. previous query can re-run, replaces adds trial records keeping user annotations trial records.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"","code":"ctrLoadQueryIntoDb( queryterm = NULL, register = \"\", querytoupdate = NULL, forcetoupdate = FALSE, euctrresults = FALSE, euctrresultshistory = FALSE, ctgov2history = FALSE, documents.path = NULL, documents.regexp = \"prot|sample|statist|sap_|p1ar|p2ars|icf|ctalett|lay|^[0-9]+ \", annotation.text = \"\", annotation.mode = \"append\", only.count = FALSE, con = NULL, verbose = FALSE, ... )"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"queryterm Either string full URL search query register, data frame returned ctrGetQueryUrl dbQueryHistory functions, , together parameter register, string query elements search URL. query details recorded collection later use update records. \"CTIS\", queryterm can empty string obtain trial records. automatically copying user's query register web browser clipboard, see register String abbreviation register query, either \"EUCTR\", \"CTGOV2\", \"ISRCTN\" \"CTIS\". needed queryterm provides full URL query results. querytoupdate Either word \"last\", row number query data frame returned dbQueryHistory run retrieve new update trial records since query run last time. parameter takes precedence queryterm. \"EUCTR\", updates available last seven days; query run time passed since run last. work \"CTIS\" time. forcetoupdate TRUE, run query given querytoupdate, irrespective run last. Default FALSE. euctrresults TRUE, also download available results retrieving loading trials EUCTR. slows function. (\"CTGOV2\" \"CTIS\", available results always retrieved loaded collection.) euctrresultshistory TRUE, also download available history results publication \"EUCTR.\" quite time-consuming. Default FALSE. ctgov2history trials CTGOV2, retrieve historic versions record. Default FALSE, time-consuming operation. Use n n versions (recommended), 1 first (original) version, -1 last--one version, \"n:m\" nth mth versions, TRUE versions trial record retrieved. Note register CTIS, historic versions available `applications` field retrieved automatically. documents.path relative absolute path directory exists can created, save documents directly available register (\"EUCTR\", \"CTGOV2\", \"ISRCTN\", \"CTIS\") PDFs results, analysis plans, spreadsheets, patient information sheets, assessments product information. Default NULL, disables saving documents. documents.regexp Regular expression, case insensitive, select documents, saving documents requested (see documents.path). set NULL, empty placeholder files saved every document saved. Default \"prot|sample|statist|sap_|p1ar|p2ars|icf|ctalett|lay|^[0-9]+ \". Used \"CTGOV2\", \"ISRCTN\" \"CTIS\" (\"EUCTR\", available documents saved case). annotation.text Text including field \"annotation\" records retrieved query loaded collection. contents field \"annotation\" trial record preserved e.g. running function loading record annotation, see parameter annotation.mode. annotation.mode One \"append\" (default), \"prepend\" \"replace\" new annotation.text respect existing annotation records retrieved query loaded collection. .count Set TRUE return number trial records found register query. load trial information database. Default FALSE. con connection object, see section `Databases` ctrdata. verbose Printing additional information set TRUE; default FALSE. ... use (capture deprecated parameters).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"list elements `n` (number trial records newly imported updated), `success` (vector _id's successfully loaded records), `failed` (vector identifiers records failed load) `queryterm` (query term used). returned list several attributes (including database collection name, well query history database collection) facilitate documentation.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"","code":"if (FALSE) { dbc <- nodbi::src_sqlite(collection = \"my_collection\") # Retrieve protocol- and results-related information # on two specific trials identified by their EU number ctrLoadQueryIntoDb( queryterm = \"2005-001267-63+OR+2008-003606-33\", register = \"EUCTR\", euctrresults = TRUE, con = dbc ) # Count ongoing interventional cancer trials involving children # Note this query is a classical CTGOV query and is translated # to a corresponding query for the current CTGOV2 webinterface ctrLoadQueryIntoDb( queryterm = \"cond=cancer&recr=Open&type=Intr&age=0\", register = \"CTGOV\", only.count = TRUE, con = dbc ) # Retrieve all information on more than 40 trials # that are labelled as phase 3 and that mention # either neuroblastoma or lymphoma from ISRCTN, # into the same collection as used before ctrLoadQueryIntoDb( queryterm = paste0( \"https://www.isrctn.com/search?\", \"q=neuroblastoma+OR+lymphoma&filters=phase%3APhase+III\"), con = dbc ) # Retrieve information trials in CTIS mentioning neonates ctrLoadQueryIntoDb( queryterm = paste0(\"https://euclinicaltrials.eu/ctis-public/\", \"search#searchCriteria={%22containAll%22:%22%22,\", \"%22containAny%22:%22neonates%22,%22containNot%22:%22%22}\"), con = dbc ) }"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":null,"dir":"Reference","previous_headings":"","what":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"Open advanced search pages register(s), execute search browser","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"","code":"ctrOpenSearchPagesInBrowser(url = \"\", register = \"\", copyright = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"url search results page show browser. open browser previous search, output ctrGetQueryUrl dbQueryHistory can used. Can left empty string (default) open advanced search page register. register Register(s) open, \"EUCTR\", \"CTGOV2\", \"ISRCTN\" \"CTIS\". Default empty string, opens advanced search page register(s). copyright (Optional) set TRUE, opens copyright pages registers.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"(String) Full URL corresponding shortened url conjunction register , invisibly TRUE url specified.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"","code":"# Open all and check copyrights before using registers ctrOpenSearchPagesInBrowser(copyright = TRUE) # Open specific register advanced search page ctrOpenSearchPagesInBrowser(register = \"CTGOV2\") ctrOpenSearchPagesInBrowser(register = \"CTIS\") ctrOpenSearchPagesInBrowser(register = \"EUCTR\") ctrOpenSearchPagesInBrowser(register = \"ISRCTN\") # Open all queries that were loaded into demo collection dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbh <- dbQueryHistory( con = dbc ) for (r in seq_len(nrow(dbh))) { ctrOpenSearchPagesInBrowser(dbh[r, ]) } #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> #> with this URL: #> #> https://clinicaltrials.gov/search?start=2018-01-01_2020-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":null,"dir":"Reference","previous_headings":"","what":"ctrdata: information on clinical trial registers — ctrdata-registers","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"Registers clinical trials protocol- result-related information can retrieved analysed package ctrdata, last updated 2024-06-23.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-overview","dir":"Reference","previous_headings":"","what":"1 - Overview","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"EUCTR: EU Clinical Trials Register contains close 44,000 clinical trials (least one investigational medicinal product, IMP; European Union beyond; new trials, results contained trials continue added) CTIS: EU Clinical Trials Information System started January 2023 new clinical trials. includes 4,100 publicly accessible trials. automatically get CTIS search query URL: CTGOV2: ClinicalTrials.gov includes close 500,000 interventional observational studies ISRCTN: ISRCTN Registry includes 25,000 interventional observational health studies","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-notable-changes","dir":"Reference","previous_headings":"","what":"2 - Notable changes","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"CTGOV retired 2024-06-25; ctrdata subsequently translates CTGOV queries CTGOV2 queries. new website (CTGOV2) can used ctrdata since 2023-08-27. CTIS relaunched 2024-06-17, changing data structure search syntax, ctrdata updated. CTIS can used ctrdata since 2023-03-25. information changes: ","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-example-explanation-and-ctrdata-motivation","dir":"Reference","previous_headings":"","what":"4 - Example explanation and ctrdata motivation","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"*example expert search interventional trials primarily neonates, investigating infectious conditions. shows searches registers may sufficient identify sought trials: CTGOV2 search retrieves trials conducted exclusively neonates. EUCTR retrieves trials neonates, exclusively neonates. ISRCTN retrieves studies interventions medicines. CTIS retrieves trials mention words neonates infection. address , trials can retrieved ctrLoadQueryIntoDb database collection second step can selected, based values relevant fields retrieved trial information, example: EUCTR field f115_children_211years age criteria ISRCTN field interventions.intervention.interventionType type study CTIS fields ageGroup authorizedApplication.authorizedPartI.medicalConditions.medicalCondition ctrdata helps identifying fields function dbGetFieldsIntoDf.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"Ralf Herold ralf.herold@mailbox.org","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":null,"dir":"Reference","previous_headings":"","what":"ctrdata: get started, database connection, function overview — ctrdata","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"package aggregating analysing information clinical studies, obtaining documents, public registers","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-database-connection","dir":"Reference","previous_headings":"","what":"1 - Database connection","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"Package ctrdata retrieves trial information stores database collection, given connection object parameter con several ctrdata functions; connection object created almost identical ways supported backends: Use connection object ctrdata function, example dbQueryHistory, packages, example mongolite::mongo nodbi::docdb_query. Use demo database: dbc <- nodbi::src_sqlite(dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\")","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-operate-on-a-clinical-trial-register","dir":"Reference","previous_headings":"","what":"2 - Operate on a clinical trial register","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"ctrOpenSearchPagesInBrowser, ctrLoadQueryIntoDb (load trial records database collection); see ctrdata-registers details registers search.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-get-a-data-frame-from-the-database-collection","dir":"Reference","previous_headings":"","what":"3 - Get a data frame from the database collection","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"dbFindFields (find names fields interest trial records collection), dbGetFieldsIntoDf (create data frame fields interest collection), dbFindIdsUniqueTrials (get de-duplicated identifiers clinical trials' records can used subset data frame).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-operate-on-a-data-frame-with-trial-information","dir":"Reference","previous_headings":"","what":"4 - Operate on a data frame with trial information","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"dfTrials2Long (convert fields nested elements long format), dfName2Value (get values variable(s) interest).","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"Ralf Herold ralf.herold@mailbox.org","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of fields in the database collection — dbFindFields","title":"Find names of fields in the database collection — dbFindFields","text":"Given part name field interest user, function returns full field names used records previously loaded collection (using ctrLoadQueryIntoDb). names fields value collection can returned. Set sample = FALSE force screening records collection field names, see .","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of fields in the database collection — dbFindFields","text":"","code":"dbFindFields(namepart = \".*\", con, sample = TRUE, verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of fields in the database collection — dbFindFields","text":"namepart character string (can regular expression, including Perl-style) searched among field names (keys) collection, case-insensitive. default `\".*\"` lists fields. con connection object, see section `Databases` ctrdata. sample TRUE (default), uses sample 5 trial records per register identify fields, rapidly return possibly incomplete set field names. FALSE, uses trial records collection, take time trials ensures returns names fields collection. verbose TRUE, prints additional information (default FALSE).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of fields in the database collection — dbFindFields","text":"Vector strings full names field(s) found, ordered register alphabet, see examples. Names vector names register holding respective fields. field names can fed dbGetFieldsIntoDf extract data field(s) collection data frame.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find names of fields in the database collection — dbFindFields","text":"full names child fields returned dot notation (e.g., clinical_results.outcome_list.outcome.measure.class_list.class.title) addition, names parent fields (e.g., clinical_results) returned. Data parent fields typically complex (nested), see dfTrials2Long easily handling . field definitions registers, see \"Definition\" ctrdata-registers. Note: dbFindFields first called ctrLoadQueryIntoDb, take moment.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of fields in the database collection — dbFindFields","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbFindFields(namepart = \"date\", con = dbc)[1:5] #> Using cache of fields. #> CTGOV CTGOV #> \"completion_date\" \"last_update_posted\" #> CTGOV CTGOV #> \"last_update_submitted\" \"last_update_submitted_qc\" #> CTGOV #> \"primary_completion_date\" # view all 3350+ fields from all registers: allFields <- dbFindFields(con = dbc, sample = FALSE) #> Using cache of fields. if (interactive()) View(data.frame( register = names(allFields), field = allFields))"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":null,"dir":"Reference","previous_headings":"","what":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"Records clinical trial can loaded one register collection. function returns deduplicated identifiers trials collection, respecting register(s) preferred user. registers recording identifiers also registers, used function provide vector identifiers deduplicated trials.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"","code":"dbFindIdsUniqueTrials( preferregister = c(\"EUCTR\", \"CTGOV\", \"CTGOV2\", \"ISRCTN\", \"CTIS\"), prefermemberstate = \"DE\", include3rdcountrytrials = TRUE, con, verbose = FALSE )"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"preferregister vector order preference registers generate unique _id's, default c(\"EUCTR\", \"CTGOV\", \"CTGOV2\", \"ISRCTN\", \"CTIS\") prefermemberstate Code single EU Member State records returned. available, record DE lacking , random Member State's record trial returned. list codes EU Member States, please see vector countriesEUCTR. Specifying \"3RD\" return Third Country record trials, available. include3rdcountrytrials logical value trials retained conducted exclusively third countries, , outside European Union. Ignored prefermemberstate set \"3RD\". con connection object, see section `Databases` ctrdata. verbose TRUE, prints fields registers used find corresponding trial records","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"named vector strings keys (field \"_id\") records collection represent unique trials, names correspond register record.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"Note content records may differ registers (, \"EUCTR\", records different Member States). differences considered function.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbFindIdsUniqueTrials(con = dbc) #> Searching for duplicate trials... #> - Getting all trial identifiers... #> , 29 found in collection #> - Finding duplicates among registers' and sponsor ids... #> - 2 EUCTR _id were not preferred EU Member State record for 8 trials #> - Keeping 3 / 8 / 5 / 8 / 3 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS #> = Returning keys (_id) of 27 records in collection \"my_trials\" #> ISRCTN ISRCTN ISRCTN EUCTR #> \"12949496\" \"13281214\" \"17473621\" \"2012-003632-23-SE\" #> EUCTR EUCTR CTIS CTIS #> \"2014-002606-20-PT\" \"2014-003556-31-SE\" \"2022-501142-30-00\" \"2023-505613-24-00\" #> CTIS ISRCTN ISRCTN ISRCTN #> \"2024-510663-34-00\" \"20343063\" \"61070850\" \"76463425\" #> ISRCTN ISRCTN CTGOV2 CTGOV2 #> \"80181452\" \"88261002\" \"NCT00617929\" \"NCT01125800\" #> CTGOV2 CTGOV2 CTGOV2 CTGOV #> \"NCT01483820\" \"NCT01505608\" \"NCT01592045\" \"NCT02620761\" #> CTGOV CTGOV CTGOV CTGOV #> \"NCT03280147\" \"NCT03325439\" \"NCT03431558\" \"NCT03876704\" #> CTGOV CTGOV CTGOV #> \"NCT04001712\" \"NCT04041765\" \"NCT05969327\" #> attr(,\"ctrdata-dbname\") #> [1] \"/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/ctrdata/extdata/demo.sqlite\" #> attr(,\"ctrdata-table\") #> [1] \"my_trials\" #> attr(,\"ctrdata-dbqueryhistory\") #> query-timestamp query-register query-records #> 1 2024-05-16 14:05:23 EUCTR 5 #> 2 2024-05-16 14:06:43 CTGOV 8 #> 3 2024-05-16 14:07:32 ISRCTN 8 #> 4 2024-05-16 14:07:57 CTGOV2 5 #> 5 2024-06-23 16:14:56 CTIS 3 #> query-term #> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-28&dateTo=2015-03-31&status=completed #> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> 3 q=&filters=ageRange:Neonate,phase:Phase+III #> 4 distance=50&cond=neuroblastoma&aggFilters=phase:2,results:with&primComp=2014-01-01_2014-12-31 #> 5 searchCriteria={\"containAll\":\"infection\",\"containAny\":\"neonates\",\"containNot\":\"\"}"},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"Fields collection retrieved records data frame (tibble). Within given trial record, fields can hierarchical structured, , nested. Th function uses field names appropriately type values returns, harmonising original values (e.g. \"Information present EudraCT\" `NA`, \"Yes\" `TRUE`, \"false\" `FALSE`, date strings dates time differences, number strings numbers). function simplifies structure nested data may concatenate multiple strings field using \" / \" (see example) may widened returned data frame additional columns recursively expanded simply nested data (e.g., \"externalRefs\" columns \"externalRefs.doi\", \"externalRefs.eudraCTNumber\" etc.). alternative way handling complex nested data, see dfTrials2Long followed dfName2Value extracting sought variable(s).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"","code":"dbGetFieldsIntoDf(fields = \"\", con, verbose = FALSE, ...)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"fields Vector one strings, names sought fields. See function dbFindFields find names fields. Dot path notation (\"field.subfield\") without indices supported. compatibility `nodbi::src_postgres()` needed, specify fewer 50 fields, consider also using parent fields e.g., `\".b\"` instead `c(\".b.c.d\", \".b.c.e\")`, accessing sought fields dfTrials2Long followed dfName2Value R functions. con connection object, see section `Databases` ctrdata. verbose Printing additional information set TRUE; (default FALSE). ... use (captures deprecated parameter stopifnodata)","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"data frame (tibble, tibble loaded) columns corresponding sought fields. column records' `_id` always included. maximum number rows returned data frame equal , less number trial records database collection.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\") # get fields that are nested within another field # and can have multiple values with the nested field dbGetFieldsIntoDf( fields = \"b1_sponsor.b31_and_b32_status_of_the_sponsor\", con = dbc) #> _id b1_sponsor.b31_and_b32_status_of_the_sponsor #> 1 2012-003632-23-CZ Commercial #> 2 2012-003632-23-SE Commercial #> 5 2014-002606-20-PT Commercial #> 4 2014-003556-31-GB Commercial #> 3 2014-003556-31-SE Commercial # fields that are lists of string values are # returned by concatenating values with a slash dbGetFieldsIntoDf( fields = \"keyword\", con = dbc) #> _id #> 2 NCT03280147 #> 3 NCT03325439 #> 4 NCT03431558 #> 6 NCT04001712 #> 7 NCT04041765 #> keyword #> 2 Neonate / Sepsis / Antibiotics / Duration #> 3 Electroencephalographic neonatal seizures / Brivaracetam / Epilepsy / ENS / Newborns / Pharmacokinetic #> 4 Bovine Lactoferrin, Neonatal infection, Low Birth Weight #> 6 early caffeine preterm #> 7 IgM-enriched Intravenous Immunoglobulin"},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":null,"dir":"Reference","previous_headings":"","what":"Show history of queries loaded into a database collection — dbQueryHistory","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"Show history queries loaded database collection","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"","code":"dbQueryHistory(con, verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"con connection object, see section `Databases` ctrdata. verbose TRUE, prints additional information (default FALSE).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"data frame (tibble, tibble loaded) columns: `query-timestamp`, `query-register`, `query-records` (note: number records loaded last executing ctrLoadQueryIntoDb, total record number) `query-term`, one row time ctrLoadQueryIntoDb loaded trial records collection.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbQueryHistory(con = dbc) #> query-timestamp query-register query-records #> 1 2024-05-16 14:05:23 EUCTR 5 #> 2 2024-05-16 14:06:43 CTGOV 8 #> 3 2024-05-16 14:07:32 ISRCTN 8 #> 4 2024-05-16 14:07:57 CTGOV2 5 #> 5 2024-06-23 16:14:56 CTIS 3 #> query-term #> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-28&dateTo=2015-03-31&status=completed #> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> 3 q=&filters=ageRange:Neonate,phase:Phase+III #> 4 distance=50&cond=neuroblastoma&aggFilters=phase:2,results:with&primComp=2014-01-01_2014-12-31 #> 5 searchCriteria={\"containAll\":\"infection\",\"containAny\":\"neonates\",\"containNot\":\"\"}"},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"Merge variables data frame returned dbGetFieldsIntoDf new variable, optionally also map values new levels.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"","code":"dfMergeVariablesRelevel(df = NULL, colnames = \"\", levelslist = NULL)"},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"df data.frame variables (columns) merged one vector. colnames vector names columns `df` hold variables merged, selection columns per select. levelslist names list one slice new value used vector old values (optional).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"vector, type columns merged","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) df <- dbGetFieldsIntoDf( fields = c(\"overall_status\", \"x5_trial_status\"), con = dbc ) statusvalues <- list( \"ongoing\" = c(\"Recruiting\", \"Active\", \"Ongoing\"), \"completed\" = c(\"Completed\", \"Prematurely Ended\", \"Terminated\"), \"other\" = c(\"Withdrawn\", \"Suspended\", \"No longer available\") ) dfMergeVariablesRelevel( df = df, colnames = 'contains(\"status\")', levelslist = statusvalues ) #> Columns identified to be merged: overall_status, x5_trial_status #> [1] completed completed ongoing completed completed completed completed #> [8] completed completed #> Levels: ongoing completed other"},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":null,"dir":"Reference","previous_headings":"","what":"Get value for variable of interest — dfName2Value","title":"Get value for variable of interest — dfName2Value","text":"Get information variable interest (e.g., clinical endpoints) long data frame protocol- result-related trial information returned dfTrials2Long. Parameters `valuename`, `wherename` `wherevalue` matched using Perl regular expressions ignoring case.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get value for variable of interest — dfName2Value","text":"","code":"dfName2Value(df, valuename = \"\", wherename = \"\", wherevalue = \"\")"},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get value for variable of interest — dfName2Value","text":"df data frame (tibble) four columns (`_id`, `identifier`, `name`, `value`) returned dfTrials2Long valuename character string name field holds value variable interest (e.g., summary measure \"endPoints.*tendencyValue.value\") wherename (optional) character string identify variable interest among repeatedly occur trial record (e.g., \"endPoints.endPoint.title\") wherevalue (optional) character string value variable identified `wherename` (e.g., \"response\")","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get value for variable of interest — dfName2Value","text":"data frame (tibble, tibble loaded) includes values interest, columns `_id`, `identifier`, `name`, `value` `` (contents `wherevalue` found `wherename`). Contents `value` strings unless elements numbers. `identifier` generated function dfTrials2Long identify matching elements, e.g endpoint descriptions measurements.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get value for variable of interest — dfName2Value","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dfwide <- dbGetFieldsIntoDf( fields = c( ## ctgov - typical results fields # \"clinical_results.baseline.analyzed_list.analyzed.count_list.count\", # \"clinical_results.baseline.group_list.group\", # \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.outcome_list.outcome\", \"study_design_info.allocation\", ## euctr - typical results fields # \"trialInformation.fullTitle\", # \"baselineCharacteristics.baselineReportingGroups.baselineReportingGroup\", # \"trialChanges.hasGlobalInterruptions\", # \"subjectAnalysisSets\", # \"adverseEvents.seriousAdverseEvents.seriousAdverseEvent\", \"endPoints.endPoint\", \"subjectDisposition.recruitmentDetails\" ), con = dbc ) dflong <- dfTrials2Long(df = dfwide) #> clinical_results.outcome_list.outcome #> study_design_info.allocation #> endPoints.endPoint #> subjectDisposition.recruitmentDetails #> #> . #> . #> . #> . #> . #> . #> . #> . #> #> Total 7096 rows, 79 unique names of variables ## get values for the endpoint 'response' dfName2Value( df = dflong, valuename = paste0( \"clinical_results.*measurement.value|\", \"clinical_results.*outcome.measure.units|\", \"endPoints.endPoint.*tendencyValue.value|\", \"endPoints.endPoint.unit\" ), wherename = paste0( \"clinical_results.*outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"response\" ) #> Returning values for 2 out of 12 trials #> _id identifier #> 1 2012-003632-23-CZ 1 #> 2 2012-003632-23-CZ 1 #> 3 2012-003632-23-CZ 2 #> 4 2012-003632-23-CZ 6 #> 5 2012-003632-23-CZ 6.1 #> 6 2012-003632-23-CZ 6.2 #> 7 2012-003632-23-CZ 6.3 #> 8 2012-003632-23-CZ 6.4 #> 9 2012-003632-23-CZ 6.5 #> 10 2012-003632-23-CZ 8 #> 11 2012-003632-23-CZ 8 #> 12 2012-003632-23-SE 1 #> 13 2012-003632-23-SE 1 #> 14 2012-003632-23-SE 2 #> 15 2012-003632-23-SE 6 #> 16 2012-003632-23-SE 6.1 #> 17 2012-003632-23-SE 6.2 #> 18 2012-003632-23-SE 6.3 #> 19 2012-003632-23-SE 6.4 #> 20 2012-003632-23-SE 6.5 #> 21 2012-003632-23-SE 8 #> 22 2012-003632-23-SE 8 #> name #> 1 endPoints.endPoint.unit #> 2 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 3 endPoints.endPoint.unit #> 4 endPoints.endPoint.unit #> 5 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 6 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 7 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 8 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 9 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 10 endPoints.endPoint.unit #> 11 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 12 endPoints.endPoint.unit #> 13 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 14 endPoints.endPoint.unit #> 15 endPoints.endPoint.unit #> 16 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 17 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 18 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 19 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 20 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 21 endPoints.endPoint.unit #> 22 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> value where #> 1 Days Time to Overall Response #> 2 7.0 Time to Overall Response #> 3 At least 1 response (number) Durability of First Response #> 4 Overall Response Rate Overall Response #> 5 0.63 Overall Response #> 6 0 Overall Response #> 7 0.65 Overall Response #> 8 0.59 Overall Response #> 9 0.60 Overall Response #> 10 Percentage of treatment time Cumulative Duration of Response #> 11 78.6 Cumulative Duration of Response #> 12 Days Time to Overall Response #> 13 7.0 Time to Overall Response #> 14 At least 1 response (number) Durability of First Response #> 15 Overall Response Rate Overall Response #> 16 0.63 Overall Response #> 17 0 Overall Response #> 18 0.65 Overall Response #> 19 0.59 Overall Response #> 20 0.60 Overall Response #> 21 Percentage of treatment time Cumulative Duration of Response #> 22 78.6 Cumulative Duration of Response"},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert data frame with trial records into long format — dfTrials2Long","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"function works procotol- results- related information. converts lists values data frame returned dbGetFieldsIntoDf individual rows long data frame. resulting long data frame, values interest can selected using dfName2Value. function particularly useful fields complex content, node field \"clinical_results\" EUCTR, dbGetFieldsIntoDf returns multiply nested list function converts every observation every (leaf) field row .","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"","code":"dfTrials2Long(df)"},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"df Data frame (tibble) columns including trial identifier (_id) one variables obtained dbGetFieldsIntoDf","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"data frame (tibble, tibble loaded) four columns: `_id`, `identifier`, `name`, `value`","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\") dfwide <- dbGetFieldsIntoDf( fields = \"clinical_results.participant_flow\", con = dbc) dfTrials2Long(df = dfwide) #> clinical_results.participant_flow.recruitment_details #> clinical_results.participant_flow.pre_assignment_details #> clinical_results.participant_flow.group_list.group #> clinical_results.participant_flow.period_list.period.title #> clinical_results.participant_flow.period_list.period.milestone_list.milestone #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.title #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.group_id #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.count #> #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> #> Total 43 rows, 12 unique names of variables #> _id identifier #> 1 NCT03325439 0 #> 2 NCT03325439 0 #> 3 NCT02620761 1 #> 4 NCT02620761 2 #> 5 NCT02620761 1 #> 6 NCT02620761 2 #> 7 NCT02620761 1 #> 8 NCT02620761 2 #> 9 NCT03325439 1 #> 10 NCT03325439 2 #> 11 NCT03325439 3 #> 12 NCT02620761 0 #> 13 NCT03325439 0 #> 14 NCT02620761 1 #> 15 NCT02620761 2 #> 16 NCT02620761 3 #> 17 NCT02620761 1.1 #> 18 NCT02620761 1.2 #> 19 NCT02620761 1.1 #> 20 NCT02620761 1.2 #> 21 NCT02620761 2.1 #> 22 NCT02620761 2.2 #> 23 NCT02620761 2.1 #> 24 NCT02620761 2.2 #> 25 NCT02620761 3.1 #> 26 NCT02620761 3.2 #> 27 NCT02620761 3.1 #> 28 NCT02620761 3.2 #> 29 NCT03325439 1 #> 30 NCT03325439 2 #> 31 NCT03325439 3 #> 32 NCT03325439 4 #> 33 NCT03325439 1 #> 34 NCT03325439 2 #> 35 NCT03325439 3 #> 36 NCT03325439 4 #> 37 NCT03325439 1 #> 38 NCT03325439 2 #> 39 NCT03325439 3 #> 40 NCT03325439 4 #> 41 NCT03325439 0 #> 42 NCT03325439 0 #> 43 NCT03325439 0 #> name #> 1 clinical_results.participant_flow.recruitment_details #> 2 clinical_results.participant_flow.pre_assignment_details #> 3 clinical_results.participant_flow.group_list.group.group_id #> 4 clinical_results.participant_flow.group_list.group.group_id #> 5 clinical_results.participant_flow.group_list.group.title #> 6 clinical_results.participant_flow.group_list.group.title #> 7 clinical_results.participant_flow.group_list.group.description #> 8 clinical_results.participant_flow.group_list.group.description #> 9 clinical_results.participant_flow.group_list.group.group_id #> 10 clinical_results.participant_flow.group_list.group.title #> 11 clinical_results.participant_flow.group_list.group.description #> 12 clinical_results.participant_flow.period_list.period.title #> 13 clinical_results.participant_flow.period_list.period.title #> 14 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 15 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 16 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 17 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 18 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 19 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 20 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 21 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 22 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 23 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 24 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 25 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 26 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 27 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 28 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 29 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 30 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 31 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 32 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 33 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 34 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 35 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 36 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 37 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 38 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 39 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 40 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 41 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.title #> 42 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.group_id #> 43 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.count #> value #> 1 The study started to enroll participants in May 2019 and concluded in May 2021. #> 2 No eligible study participants were enrolled in the Confirmatory Cohorts. The study stopped prematurely due to enrolment challenges, the termination was not linked to any safety issues. The Participant Flow refers to the All Subjects Screened. #> 3 P1 #> 4 P2 #> 5 Control #> 6 Fenoldopam #> 7 Infants in the Placebo arm will receive 0.9% sodium chloride (0.1 ml/hr). If, after 6 hrs there is not a clinically concerning decrease in blood pressure, as determined by attending physician, the rate of infusion (in this arm the placebo) will be increased to 0.2 ml/kg/hr. This rate will be continued throughout the remainder of the study.\\r0.9%NS: Randomized to receive Fenoldopam or 0.9%NS #> 8 Infants in the experimental arm will receive fenoldopam (60 ug/ml; 0.1 ml/hr to provide 0.1ug/kg/min). If, after 6 hrs there is not a clinically concerning decrease in blood pressure, as determined by attending physician, the rate of infusion will be increased to 0.2 ml/kg/hr (0.2 ug/kg/min for infants receiving fenoldopam). This rate will be continued throughout the remainder of the study.\\rFenoldopam: Randomized to receive Fenoldopam or 0.9%NS #> 9 P1 #> 10 Exploratory Cohort #> 11 Participants in this arm received brivaracetam (BRV) 0.5 milligram per kilogram (mg/kg) administered as an intravenous (iv) solution for injection twice daily (bid) during the 48-hour Evaluation Period. An additional 3 doses of BRV (0.5 mg/kg) could have been administered every 12 hours for 48 hours (at the discretion of the Investigator). Treatment with antiepileptic drugs (AEDs) per standard of care (SToC) (first-line, second-line, or subsequent treatment) were continued in parallel with BRV treatment. #> 12 Overall Study #> 13 Overall Study #> 14 STARTED #> 15 COMPLETED #> 16 NOT COMPLETED #> 17 P1 #> 18 P2 #> 19 1 #> 20 0 #> 21 P1 #> 22 P2 #> 23 1 #> 24 0 #> 25 P1 #> 26 P2 #> 27 0 #> 28 0 #> 29 STARTED #> 30 Treated #> 31 COMPLETED #> 32 NOT COMPLETED #> 33 P1 #> 34 P1 #> 35 P1 #> 36 P1 #> 37 9 #> 38 6 #> 39 6 #> 40 3 #> 41 Ineligibility #> 42 P1 #> 43 3"},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-changes-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Possibly breaking changes","title":"ctrdata 1.18.0.9000","text":"CTGOV retired 2024-06-25 classic website API used ctrdata since 2015. support users, ctrdata now automatically translates redirects queries current website. helps automatically updating previously loaded queries (ctrLoadQueryIntoDb(querytoupdate = )), manually migrating queries reproducible work clinical trials information. new functionality ctrdata translates user’s search query URL classic website query current CTGOV website, search parameters. Since structure format data differs data retrieved current API previously retrieved classic API, ctrdata continue identify current API register = \"CTGOV2\", support analysis stage. CTIS relaunched 2024-06-17, ctrdata fully updated . moment, CTIS provides basic searches search query URL. support users, ctrdata includes updated script extract user’s search parameters clipboard browser URL bar, searches trials opening query URL, see https://rfhb.github.io/ctrdata/#id_2-script--automatically-copy-users-query--web-browser.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.18.0.9000","text":"Reduced size demo database package, addressing CRAN notes Adapted ctrFindActiveSubstanceSynonyms() CTGOV2 API, note: curated terms used studies returned Updated register information, adding caveats issues Updated estimated download sizes, added typing new fields CTIS Avoided duplicate data file retrievals Split utils.R files functions fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.18.0.9000","text":"Correct partial date brackets CTGOV2","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1180-2024-05-13","dir":"Changelog","previous_headings":"","what":"ctrdata 1.18.0 (2024-05-13)","title":"ctrdata 1.18.0 (2024-05-13)","text":"CRAN release: 2024-05-13","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-change-1-18-0","dir":"Changelog","previous_headings":"","what":"Possibly breaking change","title":"ctrdata 1.18.0 (2024-05-13)","text":"File names documents downloaded CTIS now include document type use different separators (e.g., “parts2auth - SbjctInfaICF - …” abbreviation “Subject information informed consent form (publication)”, previously “parts2auth_…”)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-18-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.18.0 (2024-05-13)","text":"Add retrieval historic versions trial records CTGOV2 (automatically retrieved CTIS, available registers) Added typing newly appearing fields CTIS Increase testing coverage 93.7% locally Added missing CI combination DuckDB CTGOV2","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-18-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.18.0 (2024-05-13)","text":"Correct typing certain fields (lists ) integers Handle marginal case dbGetFieldsIntoDf() Changed unlink intermediate files Minor vignettes corrections","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1172-2024-02-25","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.2 (2024-02-25)","title":"ctrdata 1.17.2 (2024-02-25)","text":"CRAN release: 2024-02-25","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.2 (2024-02-25)","text":"Switch sequence API endpoints used CTIS Correct handling multiple public events CTIS Re-use CTIS downloads given session","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1171-2024-02-05","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.1 (2024-02-05)","title":"ctrdata 1.17.1 (2024-02-05)","text":"CRAN release: 2024-02-04","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-17-1","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.17.1 (2024-02-05)","text":"Additional CTIS field types possibly documents (associated clinical trials) Use ctId instead id CTIS top-level field (synonym used API clinicalTrialId)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.1 (2024-02-05)","text":"Added handling unexpected Unicode protocol-related data one trial EUCTR Improved predicted download sizes times EUCTR Return message CTIS query result trials","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1170-2024-01-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.0 (2024-01-22)","title":"ctrdata 1.17.0 (2024-01-22)","text":"CRAN release: 2024-01-22","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-changes-1-17-0","dir":"Changelog","previous_headings":"","what":"Possibly breaking changes","title":"ctrdata 1.17.0 (2024-01-22)","text":"Reimplemented dbGetFieldsIntoDf() accelerate predictable, simplified returns, particular nested fields; also attempts recursively expand simply nested data additional columns returned data frame Reimplemented dbFindFields() accelerate; based improved nodbi::docdb_query() dbFindFields() now digests sample records quickly find fields, records sample = FALSE taking increasing time increasing number records using nodbi::scr_postgres(), parameter fields dbGetFieldsIntoDf() limited less 50 fields; message flags backend potential compatibility issues, suggesting use parent fields, e.g., .b instead c(\".b.c.d\", \".b.c.e\") Parameter stopifnodata dbGetFieldsIntoDf() needed deprecated Reimplemented typing fields speed simplify","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-17-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.17.0 (2024-01-22)","text":"Register data re-used downloaded interactive session (, temporary folder now re-used throughout user’s session) Temporary folder can set users options(ctrdata.tempdir = \"\") Inform MS Windows users cygwin found may chose delete Many fields added typing e.g. date dbGetFieldsIntoDf()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.0 (2024-01-22)","text":"Adapted corrected information loading newly available data CTIS Corrected escaping, back-conversion, characters JSON CTIS","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1160-2023-11-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.16.0 (2023-11-24)","title":"ctrdata 1.16.0 (2023-11-24)","text":"CRAN release: 2023-11-24","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"xml-files-are-converted-slightly-differently-1-16-0","dir":"Changelog","previous_headings":"Possibly breaking changes","what":"XML files are converted slightly differently","title":"ctrdata 1.16.0 (2023-11-24)","text":"EUCTR result-related information attributes: e.g. new: {\"id\":\"PostAssignmentPeriod-46349\"}, : {\"@attributes\":{\"id\":\"PostAssignmentPeriod-46349\"}} Consequently, work just delete @attributes field names dbGetFieldsIntoDf(\"clinical_results.baseline.analyzed_list.analyzed.count_list.count.@attributes.value\", db) EUCTR protocol-related information although differences found yet CTGOV attributes bare values remain included resulting NDJSON (e.g., records March 15, 2004<\/start_date>, converted {\"start_date\":\"March 15, 2004\"})","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"euctr-some-renaming-to-harmonise-eu-andrd-country-trial-fields-1-16-0","dir":"Changelog","previous_headings":"Possibly breaking changes","what":"EUCTR: some renaming to harmonise EU and 3rd country trial fields","title":"ctrdata 1.16.0 (2023-11-24)","text":"new: e83_single_site_trial, (EU trials): e83_the_trial_involves_single_site_in_the_member_state_concerned new: e83_single_site_trial, (3rd country trials): e83_will_this_trial_be_conducted_ at_a_single_site_globally new: e863_trial_sites_planned_in, (EU trials): e863_specify_the_regions_in_which_trial_sites_are_planned new: e863_trial_sites_planned_in, (3rd country trials): e863_specify_the_countries_outside_of_the_eea_in_which_trial_sites_are_planned new: e84_multiple_sites_in_member_state, (EU trials): e84_the_trial_involves_multiple_sites_in_the_member_state_concerned new: e840_multiple_sites_globally, (3rd country trials): e84_will_this_trial_be_conducted_at_multiple_sites_globally See also https://github.com/rfhb/ctrdata/issues/26#issuecomment-1749555081","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-16-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.16.0 (2023-11-24)","text":"corrected batch iterations CTIS trials accommodating unclear totalSize response corrected translation fields browser URL API call CTGOV2 (closes https://github.com/rfhb/ctrdata/issues/32) corrected minimum curl version 5.1.0 (closes https://github.com/rfhb/ctrdata/issues/31) handled errors saving EUCTR results (e.g., long file path name, closes https://github.com/rfhb/ctrdata/issues/30 https://github.com/rfhb/ctrdata/issues/28)","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"major-1-16-0","dir":"Changelog","previous_headings":"Improvements","what":"Major","title":"ctrdata 1.16.0 (2023-11-24)","text":"external tools required (Cygwin, perl, cat, sed, php functionality transforming text, XML NDJSON replaced Javascript using R package V8); addresses personally communicated concerns faciliates use package ctrdata environments (e.g., https://github.com/rfhb/ctrdata/issues/26); consequently, might breaking change analysing certain fields, see fields affected.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"other-1-16-0","dir":"Changelog","previous_headings":"Improvements","what":"Other","title":"ctrdata 1.16.0 (2023-11-24)","text":"added results summary download CTIS added documents download ISRCTN factored document download function ensure dbFindFields() returns fields EU 3rd country trials EUCTR (addresses https://github.com/rfhb/ctrdata/issues/26) changed order importing CTIS database, improved speed better checked data downloads, repeat necessary factored temporary folder creation added using options(ctrdata.tempdir = ...) set removed dfListExtractKey(), long deprecated removed dfMergeTwoVariablesRelevel(), long deprecated reorganised code file layout","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1152-2023-09-10","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.2 (2023-09-10)","title":"ctrdata 1.15.2 (2023-09-10)","text":"CRAN release: 2023-09-17 fix handling utf8 upstream multi-language strings CTIS correct creating lists downloading documents ctis adding missing endpoints CTIS found increasing amount data, e.g. publicevents.temporaryHaltList.details 2022-501559-99-00","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1151-2023-08-29","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.1 (2023-08-29)","title":"ctrdata 1.15.1 (2023-08-29)","text":"CRAN release: 2023-08-30 correct LaTeX documentation resulting CRAN error correct parts downloading CTIS, including file name sanitisation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1150-2023-08-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.0 (2023-08-27)","title":"ctrdata 1.15.0 (2023-08-27)","text":"CRAN release: 2023-08-27 added CTGOV REST API 2.0.0.-test new register identifier CTGOV2 handle CTGOV classic interface register CTGOV improved ctrdataURLcopier.js rewrite searches views CTIS mangle CTIS: change partIIInfo object array, adding new partIIIinfoKey '{\"partIIInfo\": \"\": {...}, \"\": {...}}' becomes '{\"partIIInfo\": [{\"partIIIinfoKey\": , ...}, {\"partIIIinfoKey\": , ...}]}') correct dbGetFieldsIntoDf() specific lists","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1140-2023-07-16","dir":"Changelog","previous_headings":"","what":"ctrdata 1.14.0 (2023-07-16)","title":"ctrdata 1.14.0 (2023-07-16)","text":"CRAN release: 2023-07-16 fix dbFindIdsUniqueTrials() single-record register contents expand number CTIS variables typed date dfMergeVariablesRelevel() superseeds dfMergeTwoVariablesRelevel()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1133-2023-06-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.3 (2023-06-24)","title":"ctrdata 1.13.3 (2023-06-24)","text":"CRAN release: 2023-06-24 typo dbFindFields() use CTGOV classic website (ctrdata adapted new website) correct missing names attributes return vector dbFindIdsUniqueTrials()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1132-2023-05-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.2 (2023-05-27)","title":"ctrdata 1.13.2 (2023-05-27)","text":"CRAN release: 2023-05-26 correct selection lists ids documents download CTIS reduce dependencies (rvest, dplyr removed)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1131-2023-05-07","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.1 (2023-05-07)","title":"ctrdata 1.13.1 (2023-05-07)","text":"CRAN release: 2023-05-07 load CTIS data (publicEvaluation) download documents integrate downloading documents ctrLoadQueryIntoDb() also CTGOV use documents.path CTGOV, EUCTR, CTIS; deprecated euctrresultsfilespath added documents.regexp select documents downloading based file name","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1130-2023-04-23","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.0 (2023-04-23)","title":"ctrdata 1.13.0 (2023-04-23)","text":"CRAN release: 2023-04-24 data CTIS imported completely adapt functions accommodate CTIS provide Tampermonkey script get URL user’s query register speed ctrLoadQueryIntoDb() CTIS nodbi >=0.9.2.9000 keep register names vector returned dbFindIdsUniqueTrials() correct dbFindFields() EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1121-2023-03-29","dir":"Changelog","previous_headings":"","what":"ctrdata 1.12.1 (2023-03-29)","title":"ctrdata 1.12.1 (2023-03-29)","text":"CRAN release: 2023-03-29 fix escaping hash symbol PDF rendition help page fix file encoding CTIS downloads MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1120-2023-03-25","dir":"Changelog","previous_headings":"","what":"ctrdata 1.12.0 (2023-03-25)","title":"ctrdata 1.12.0 (2023-03-25)","text":"CRAN release: 2023-03-26 added first access new register: CTIS, EU Clinical Trial Information System stop (instead warning) register host errors (e.g. incorrect number records) switch use curl::multi_download() can resume retrievals registers require curl >= 5.0","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1111-2022-11-20","dir":"Changelog","previous_headings":"","what":"ctrdata 1.11.1 (2022-11-20)","title":"ctrdata 1.11.1 (2022-11-20)","text":"CRAN release: 2022-11-20 cater short EUCTR results-related information show warning beta CTGOV website supported limit unit testing MongoDB SQLite return error ctrGetQueryUrl() query URL prevent re-using connections reduce http/2 layer errors update query history querytoupdate used new records found make ctrLoadQueryIntoDb() always return visible result correct dfTrials2Long() identifier (EUCTR top “1” across fields) correct non-ASCII characters","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1110-2022-11-02","dir":"Changelog","previous_headings":"","what":"ctrdata 1.11.0 (2022-11-02)","title":"ctrdata 1.11.0 (2022-11-02)","text":"CRAN release: 2022-11-02 now works DuckDB (>= v0.6.0) database backend, using nodbi (>= v0.9.0) reduced default number parallel connections EUCTR 10 4","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1102-2022-08-20","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.2 (2022-08-20)","title":"ctrdata 1.10.2 (2022-08-20)","text":"CRAN release: 2022-08-20 fix slow speed dfName2Value() fix remove row names dfName2Value() fix internal function handle tibble fix handling certain ISRCTN queries fix dbGetFieldsIntoDf() missing data fix timeouts methods package testing fix dbGetFieldsIntoDf() rare complex fields fix URL Rd file make examples runnable demo database include wherevalue dfName2Value() result","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1101-2022-07-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.1 (2022-07-24)","title":"ctrdata 1.10.1 (2022-07-24)","text":"CRAN release: 2022-07-24 fix documentation issues (https://stat.ethz.ch/pipermail/r-package-devel/2022q3/008240.html) fix unit test unused missing argument fix GitHub actions tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1100-2022-07-01","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.0 (2022-07-01)","title":"ctrdata 1.10.0 (2022-07-01)","text":"CRAN release: 2022-07-06 ctrLoadQueryIntoDb() new parameter euctrresultsfilespath, deprecating euctrresultspdfpath ctrLoadQueryIntoDb() now also extracts saves results files PDF files ctrFindActiveSubstanceSynonyms() returns NULL non-existing active substance","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-191-2022-04-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.9.1 (2022-04-24)","title":"ctrdata 1.9.1 (2022-04-24)","text":"CRAN release: 2022-04-24 type e811… variables bugfix dbGetFieldsIntoDf bugfix annotations mix backends editorial update vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-190-2022-03-13","dir":"Changelog","previous_headings":"","what":"ctrdata 1.9.0 (2022-03-13)","title":"ctrdata 1.9.0 (2022-03-13)","text":"CRAN release: 2022-03-13 chunked trial batches ndjson files accelerated database import package dplyr loaded, functions return tibble instead data frame update correct documentation dbFindFields() returns vector fields now names register field occurs accelerated binary checks (cygwin / Windows) remove internet proxy mangling order use system configuration (e.g., transparent proxies used, environment variable https_proxy specified user) refactored internal caching correct dbGetFieldsIntoDf() specific nested data structures correct dfTrials2Long() specific fields correct dbFindIdsUniqueTrials() single trial register modify field typing decode HTML entities type fields difftime, e.g. min_age CTGOV speed parts dbGetFieldsIntoDf() simplify fields dbFindFields() returns names leaf node fields improve update documentation changed EU Member State default DE dbFindIdsUniqueTrials() corrected installCygwinWindowsDoInstall() properly update installation (remove –prune-install) test binaries installCygwinWindowsDoInstall() cache successful binary testing correct typing required_header.download_date improve numbering dfTrials2Long(), covering nested items thorough documentation improvement simplified dbFindFields() cleaned testing binaries cleaned helper scripts removed ctrGetQueryUrlFromBrowser(), long deprecated uses nodbi 0.6.0 can use PostgreSQL backend include PostgreSQL Github Actions","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-180-2021-11-18","dir":"Changelog","previous_headings":"","what":"ctrdata 1.8.0 (2021-11-18)","title":"ctrdata 1.8.0 (2021-11-18)","text":"CRAN release: 2021-11-21 changes match nodbi 0.5.0 simplifying database operations (user-visible functions: ctrLoadQueryIntoDb, dbFindIdsUniqueTrials, dbGetFieldsIntoDf), without changes API","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-171-2021-08-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.7.1 (2021-08-22)","title":"ctrdata 1.7.1 (2021-08-22)","text":"CRAN release: 2021-08-22 fix DBI needed Imports (CRAN Note) fix potential file name issue conversion script fix dbFindFields() never return _id (previously depended database backend) changed tests (CRAN detection, register availability, additional tests)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-170-2021-07-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.7.0 (2021-07-24)","title":"ctrdata 1.7.0 (2021-07-24)","text":"CRAN release: 2021-07-25 much reduced database backend-specific code, using nodbi 0.4.3 (released 2021-07-23) also introduces transactions sqlite using RSQLite >=2.2.4 (released 2021-03-12) temporary directory creation needed, automated deletion changes detecting non-functioning register servers streamlined unit testing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-160-2021-05-09","dir":"Changelog","previous_headings":"","what":"ctrdata 1.6.0 (2021-05-09)","title":"ctrdata 1.6.0 (2021-05-09)","text":"CRAN release: 2021-05-09 added support ISRCTN refactored checking binaries caching info updated EUCTR download parameters refactored ctrGetQueryUrl ctrOpenSearchPagesInBrowser harmonised error checking avoid errors external scripts refactored url / query mangling, added detailed testing refactored storing JSON database (handle big files, reduce memory) improved dbFindIdsUniqueTrials (speed, memory, register coverage) factored conversion JSON accelerated EUCTR results history download storage external scripts now create multiple chunks records use identifier fields dbFindIdsUniqueTrials adding user info field entries typed","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-153-2021-04-19","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.3 (2021-04-19)","title":"ctrdata 1.5.3 (2021-04-19)","text":"CRAN release: 2021-04-19 include message handle server certificate issues, propagating user settings httr curl operations ensure identical return structures new trials found dfTrials2Long: harmonise identifier level assignment, address cases field occurs input df dfMergeTwoVariablesRelevel: corrected improved user info dfName2Value: remove duplicate rows, e.g. duplicated criteria","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-152-2021-04-05","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.2 (2021-04-05)","title":"ctrdata 1.5.2 (2021-04-05)","text":"CRAN release: 2021-04-06 bugfix EOL converting EUCTR files","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-151-2021-03-21","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.1 (2021-03-21)","title":"ctrdata 1.5.1 (2021-03-21)","text":"CRAN release: 2021-03-21 bugfix non-matching euctr protocol result ids: trials EUCTR results downloaded version 1.5.0 downloaded (ctrLoadQueryIntoDb) dfTrials2Long refactored accelerated API change: dfTrials2Long return value (identifier replaces main_id sub_id) new option save EUCTR results PDF files user-specified directory","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-150-2021-03-14","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.0 (2021-03-14)","title":"ctrdata 1.5.0 (2021-03-14)","text":"CRAN release: 2021-03-16 return values dbGetFieldsIntoDf now mostly identical whether using src_mongo src_sqlite, best ensure portability analysis code permit dots queries / URLs improved handling queryterm renamed ctrGetQueryUrlFromBrowser ctrGetQueryUrl soft deprecated ctrGetQueryUrlFromBrowser ensure parallel retrievals EUCTR speed routines dbGetFieldsIntoDf make dfTrials2Long handle NA better improved documentation, clarified examples simplified internals typing fields, start typing results fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-141-2020-11-03","dir":"Changelog","previous_headings":"","what":"ctrdata 1.4.1 (2020-11-03)","title":"ctrdata 1.4.1 (2020-11-03)","text":"CRAN release: 2020-11-03 reset row names data frames returned functions update curl parameters accessing EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-14-2020-10-17","dir":"Changelog","previous_headings":"","what":"ctrdata 1.4 (2020-10-17)","title":"ctrdata 1.4 (2020-10-17)","text":"new: easy access variables dfTrials2Long() + dfName2Value() improved dfMergeTwoVariablesRelevel() maintain type data revised simplified vignettes deprecated: dfListExtractKey() refactored parts euctr retrieval notify user euctr register server permit compression long retrieval take fixed identifying unique ids","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-132-2020-10-03","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.2 (2020-10-03)","title":"ctrdata 1.3.2 (2020-10-03)","text":"CRAN release: 2020-10-05 quote system file paths","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-131-2020-08-01","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.1 (2020-08-01)","title":"ctrdata 1.3.1 (2020-08-01)","text":"CRAN release: 2020-08-02 fix error CI tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-130-2020-07-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.0 (2020-07-27)","title":"ctrdata 1.3.0 (2020-07-27)","text":"CRAN release: 2020-07-27 workaround EUCTR certificate issue streamline ctrGetQueryUrlFromBrowser() better handling complex fields include tests query string handling, checking parameters return values better clean-testing ctrLoadQueryIntoDb(querytorerun = …) now looks date querytorerun last run, often use euctr update options switching travis github action upped coverage code tested","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-121-2020-05-18","dir":"Changelog","previous_headings":"","what":"ctrdata 1.2.1 (2020-05-18)","title":"ctrdata 1.2.1 (2020-05-18)","text":"CRAN release: 2020-05-18 tinytest >= 1.2.1 avoid regression error correct testing detail","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-12-2019-12-07","dir":"Changelog","previous_headings":"","what":"ctrdata 1.2 (2019-12-07)","title":"ctrdata 1.2 (2019-12-07)","text":"CRAN release: 2019-12-08 correct cygwin install detail","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-11-2019-11-12","dir":"Changelog","previous_headings":"","what":"ctrdata 1.1 (2019-11-12)","title":"ctrdata 1.1 (2019-11-12)","text":"CRAN release: 2019-11-12 release nodbi 0.4 available update description installation github handled mixed arrays text values key ctgov trial records user information importing nesting added euctr trial records user verbose information extended record importing improved parsing euctr trial records correct re-opening sqlite connection","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-101-2019-10-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.0.1 (2019-10-22)","title":"ctrdata 1.0.1 (2019-10-22)","text":"CRAN release: 2019-10-23 correction testing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-10-2019-10-16","dir":"Changelog","previous_headings":"","what":"ctrdata 1.0 (2019-10-16)","title":"ctrdata 1.0 (2019-10-16)","text":"CRAN release: 2019-10-16 switch nodbi::scr_{mongo,sqlite}() re-implementation functions switch testthat tinytest, users can check tinytest::test_package(“ctrdata”) improvements euctr trial import new function dfListExtractKey speed testing bash commands windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0182-2019-04-30","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18.2 (2019-04-30)","title":"ctrdata 0.18.2 (2019-04-30)","text":"CRAN release: 2019-05-01 extended compatibility cygwin Windows find use cygw* windows refactored escaping bash command called windows corrected typing date fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0181-2019-04-14","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18.1 (2019-04-14)","title":"ctrdata 0.18.1 (2019-04-14)","text":"simplified cygwin install updated documentation corrected inconsistent handling query terms added automated proxy handling","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-018-2019-04-11","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18 (2019-04-11)","title":"ctrdata 0.18 (2019-04-11)","text":"CRAN release: 2019-04-11 release version bug fixes field typing move use remote mongodb server updated vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-017-2019-03-27","dir":"Changelog","previous_headings":"","what":"ctrdata 0.17 (2019-03-27)","title":"ctrdata 0.17 (2019-03-27)","text":"improve dbFindFields() formatting added parameter force running query added typing (numeric fields) improve cygwin install attempts information removed dependency local mongodb installation (major rewrite) improved support remote mongodb servers (note changes host / db / uri parameters) Important: Added checking SSL certificates EUCTR EUCTR server sending required intermediate root certificates, thus failing curl httr, see https://www.digicert.com/help/?host=www.clinicaltrialsregister.eu fixed EUCTR results retrieval (curl return value order predictable) removed second time adding metadata one function streamlined user information progress feedback","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0143-2019-03-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.3 (2019-03-12)","title":"ctrdata 0.14.3 (2019-03-12)","text":"turned error message new trials found prevent failing tests new trials found rss feed","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0142-2019-03-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.2 (2019-03-07)","title":"ctrdata 0.14.2 (2019-03-07)","text":"harmonise user information","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0141-2019-03-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.1 (2019-03-07)","title":"ctrdata 0.14.1 (2019-03-07)","text":"CRAN release: 2019-03-12 replaced RCurl (failed register servers) httr curl create README.md README.Rmd","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-014-2019-03-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14 (2019-03-06)","title":"ctrdata 0.14 (2019-03-06)","text":"intention submit CRAN, therefore changing several warnings messages, improve testing tool chain applications","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0133-2019-03-03","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.3 (2019-03-03)","title":"ctrdata 0.13.3 (2019-03-03)","text":"prettified dbFindFields() removing count symbols (XX.) paths improve converting invalid XML EUCTR result files JSON","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0132-2019-02-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.2 (2019-02-28)","title":"ctrdata 0.13.2 (2019-02-28)","text":"made EUCTR retrieval robust added marginal case url single trial EUCTR extended timeout checking online status EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0131-2019-02-24","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.1 (2019-02-24)","title":"ctrdata 0.13.1 (2019-02-24)","text":"added typing dates logical fields using dbGetFieldsIntoDf()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-013-2019-01-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13 (2019-01-06)","title":"ctrdata 0.13 (2019-01-06)","text":"dbGetVariablesIntoDf() deprecated, use dbGetFieldsIntoDf() instead dbFindVariable() deprecated, use dbFindFields() instead dbMergeTwoVariablesRelevel() parameter varnames deprecated, use colnames instead","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0121-2018-12-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.12.1 (2018-12-15)","title":"ctrdata 0.12.1 (2018-12-15)","text":"added function ctrFindActiveSubstanceSynonyms() obtain synonyms active substance added user information number trials CTGOV downloaded, limit 5000 per query corrected import EUCTR details = FALSE","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-012-2018-05-19","dir":"Changelog","previous_headings":"","what":"ctrdata 0.12 (2018-05-19)","title":"ctrdata 0.12 (2018-05-19)","text":"added possibility add user’s annotations records retrieved query (new option annotate.text)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0112-2018-04-22","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11.2 (2018-04-22)","title":"ctrdata 0.11.2 (2018-04-22)","text":"changed queryterm processing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0111-2018-04-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11.1 (2018-04-07)","title":"ctrdata 0.11.1 (2018-04-07)","text":"improved installFindMongoBinaries(), now better detect mongo binary locations use example cron scripts, may access user’s path information","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-011-2018-01-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11 (2018-01-28)","title":"ctrdata 0.11 (2018-01-28)","text":"newly retrieved: EUCTR results history, new fields “firstreceived_results_date” “version_results_history” adding feature per issue #8","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0104-2017-12-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.4 (2017-12-28)","title":"ctrdata 0.10.4 (2017-12-28)","text":"note compatibility mongoDB versions fixing issue #8 simplified license","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0-10-4","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.3 (2017-11-24)","title":"ctrdata 0.10.4 (2017-12-28)","text":"changed custom-built “x5_trial_status” “p_end_of_trial_status” provided EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0102-2017-11-22","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.2 (2017-11-22)","title":"ctrdata 0.10.2 (2017-11-22)","text":"editorial project updates","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0101-2017-07-30","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.1 (2017-07-30)","title":"ctrdata 0.10.1 (2017-07-30)","text":"now loading results euctr available xml","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0100-2017-07-25","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.0 (2017-07-25)","title":"ctrdata 0.10.0 (2017-07-25)","text":"fully load results ctgov prepare loading results euctr","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0914-2017-06-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.14 (2017-06-28)","title":"ctrdata 0.9.14 (2017-06-28)","text":"refactored system calls windows now part continuous integration","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0913-2017-06-23","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.13 (2017-06-23)","title":"ctrdata 0.9.13 (2017-06-23)","text":"refactored ctrLoadQueryIntoDb","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0912-2017-06-18","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.12 (2017-06-18)","title":"ctrdata 0.9.12 (2017-06-18)","text":"Preparing new CTGOV interface Improved documentation Corrected ctrGetQueryUrlFromBrowser return value","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09111-2017-02-04","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.11.1 (2017-02-04)","title":"ctrdata 0.9.11.1 (2017-02-04)","text":"Improved documentation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0911-2017-01-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.11 (2017-01-15)","title":"ctrdata 0.9.11 (2017-01-15)","text":"Added functionality: EUCTR fallback import mechanism large JSON file fails import mongoDB (splitting importing one JSON file trial, tested several thousand trials)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09101-2017-01-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.10.1 (2017-01-12)","title":"ctrdata 0.9.10.1 (2017-01-12)","text":"Fixes issues conversion EUCTR records details. Fixes issue placebo information converted IMP fields.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09100-2016-12-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.10.0 (2016-12-28)","title":"ctrdata 0.9.10.0 (2016-12-28)","text":"Added metadata attributes returned objects indicate database, query, timestamp etc.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0995-2016-12-14","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.5 (2016-12-14)","title":"ctrdata 0.9.9.5 (2016-12-14)","text":"Added option ctrLoadQueryIntoDb(querytoupdate = “last”) re-download last query collection","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0994-2016-11-18","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.4 (2016-11-18)","title":"ctrdata 0.9.9.4 (2016-11-18)","text":"Added progress indicator ctrLoadQueryIntoDb() indicate network download traffic","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0993-2016-11-17","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.3 (2016-11-17)","title":"ctrdata 0.9.9.3 (2016-11-17)","text":"deduplication dbFindIdsUniqueTrials() optimised speed memory, added check ISRCTN","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0992-2016-11-13","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.2 (2016-11-13)","title":"ctrdata 0.9.9.2 (2016-11-13)","text":"corrected deduplication dbFindIdsUniqueTrials()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0991-2016-11-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.1 (2016-11-12)","title":"ctrdata 0.9.9.1 (2016-11-12)","text":"renamed ctrQueryHistoryInDb() dbQueryHistory() note: change json format query history, breaking compatibility refactored concerned functions use mongolite rmongodb supported","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09-2016-10-17","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9 (2016-10-17)","title":"ctrdata 0.9 (2016-10-17)","text":"changed implementation dbFindIdsUniqueTrials() editorial changes examples","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-081-2016-09-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.8.1 (2016-09-07)","title":"ctrdata 0.8.1 (2016-09-07)","text":"added field indicate source register improved ctrLoadQueryIntoDb() details = FALSE added example map plotting","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-08-2016-09-04","dir":"Changelog","previous_headings":"","what":"ctrdata 0.8 (2016-09-04)","title":"ctrdata 0.8 (2016-09-04)","text":"dbFindIdsUniqueTrials now encapsulates dfFindIdsUniqueEuctrRecord dfFindIdsUniqueEuctrRecords removed installation instructions updated recently rmongodb removed CRAN","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-07-2016-05-29","dir":"Changelog","previous_headings":"","what":"ctrdata 0.7 (2016-05-29)","title":"ctrdata 0.7 (2016-05-29)","text":"dbGetVariablesIntoDf changed concatenate values array objects completed test adaptation travis improving perl regex checking helper applications","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-062-2016-04-20","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6.2 (2016-04-20)","title":"ctrdata 0.6.2 (2016-04-20)","text":"add / update field “record_last_import” every imported / updated record","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-061-2016-04-02","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6.1 (2016-04-02)","title":"ctrdata 0.6.1 (2016-04-02)","text":"changed provide vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-06-2016-02-25","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6 (2016-02-25)","title":"ctrdata 0.6 (2016-02-25)","text":"different update mechanism EUCTR implemented corrected function name db… dfFindUniqueEuctrRecord()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-059-2016-01-23","dir":"Changelog","previous_headings":"","what":"ctrdata 0.5.9 (2016-01-23)","title":"ctrdata 0.5.9 (2016-01-23)","text":"Corrected bugs Started preparation submission CRAN Preparing include package unit tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-05-2015-11-29","dir":"Changelog","previous_headings":"","what":"ctrdata 0.5 (2015-11-29)","title":"ctrdata 0.5 (2015-11-29)","text":"Published github Improved documentation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-04-2015-10-08","dir":"Changelog","previous_headings":"","what":"ctrdata 0.4 (2015-10-08)","title":"ctrdata 0.4 (2015-10-08)","text":"Renamed functions consistency ease--use","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-03-2015-10-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.3 (2015-10-06)","title":"ctrdata 0.3 (2015-10-06)","text":"Added functionality download xml data CTGOV, includes data csv format","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-028","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.8","title":"ctrdata 0.2.8","text":"Changed extended history queries included database. New function dbCTRQueryHistory()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-027","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.7","title":"ctrdata 0.2.7","text":"Added function merging variables different registers optionally merge values new values Note function findCTRkey renamed dbFindCTRkey acts database","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-025","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.5","title":"ctrdata 0.2.5","text":"Added function selecting preferred language versions trials EUCTR Improved use automatic proxy configuration script","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-022","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.2","title":"ctrdata 0.2.2","text":"Added proxy function improved installation cygwin MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-02-2015-09-19","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2 (2015-09-19)","title":"ctrdata 0.2 (2015-09-19)","text":"Now also working MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-01-2015-09-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.1 (2015-09-15)","title":"ctrdata 0.1 (2015-09-15)","text":"First version basic functionality Limited testing Works Mac OS X (10.10.x)","code":""}] +[{"path":"https://rfhb.github.io/ctrdata/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2015 Ralf Herold Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"install-package-ctrdata-on-an-r-system","dir":"Articles","previous_headings":"","what":"Install package ctrdata on an R system","title":"Install R package ctrdata","text":"R Project website (https://www.r-project.org/) provides installers R system. can used software products graphical user interfaces R Studio, Microsoft R Open, Visual Studio Code. General information ctrdata package available : https://rfhb.github.io/ctrdata/. R, execute: using development version package ctrdata, install GitHub: Either install package ctrdata user’s library.","code":"install.packages(\"ctrdata\") # install package under development install.packages(c(\"remotes\")) remotes::install_github(\"rfhb/ctrdata\", dependencies = TRUE, build_vignettes = TRUE)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"internet-access-via-proxy","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Internet access via proxy","title":"Install R package ctrdata","text":"Functions package ctrdata start ctr... require access trial registers internet via https protocol. Many organisations use transparent proxies may require users configurations. However, necessary, package ctrdata can use proxy settings set users R session follows:","code":"Sys.setenv(https_proxy = \"your_proxy.server.domain:8080\") # if needed Sys.setenv(https_proxy_user = \"your_userid:your_password\") # if needed"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"databases-to-use","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Databases to use","title":"Install R package ctrdata","text":"time, PostgreSQL, DuckDB, SQLite MongoDB (local remote) database can used package ctrdata. full SQLite database provided R package RSQLite. Suggested installation instructions PostgreSQL local MongoDB server ; remote MongoDB database server accessible . See speed comparison databases; recommended: DuckDB, PostgreSQL MongoDB local server.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_install.html","id":"attach-package-ctrdata","dir":"Articles","previous_headings":"Install package ctrdata on an R system","what":"Attach package ctrdata","title":"Install R package ctrdata","text":"completing installation, attach package user’s library. also check availability additional installation requirements mentioned : Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.17.2. https://cran.r-project.org/package=ctrdata","code":"library(ctrdata)"},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"attach-package-ctrdata","dir":"Articles","previous_headings":"Get started","what":"Attach package ctrdata","title":"Retrieve clinical trial information","text":"Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.18.0. https://cran.r-project.org/package=ctrdata","code":"library(ctrdata) citation(\"ctrdata\")"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"open-registers-advanced-search-page-in-browser","dir":"Articles","previous_headings":"Get started","what":"Open register’s advanced search page in browser","title":"Retrieve clinical trial information","text":"functions open browser, user can start searching trials interest.","code":"# Please review and respect register copyrights: ctrOpenSearchPagesInBrowser( copyright = TRUE ) # Open browser with example search: ctrOpenSearchPagesInBrowser( url = \"cancer&age=under-18\", register = \"EUCTR\" )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"adjust-search-parameters-and-execute-search-in-browser","dir":"Articles","previous_headings":"Get started","what":"Adjust search parameters and execute search in browser","title":"Retrieve clinical trial information","text":"Refine search trials interest listed browser. total number trials can retrieved package ctrdata intentionally limited queries 10,000 result records.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"copy-address-from-browser-address-bar-to-clipboard","dir":"Articles","previous_headings":"Get started","what":"Copy address from browser address bar to clipboard","title":"Retrieve clinical trial information","text":"Use functions keyboard shortcuts according operating system. See automation copy URLs user’s queries supported clinical trial registers.","code":""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"get-address-from-clipboard","dir":"Articles","previous_headings":"Get started","what":"Get address from clipboard","title":"Retrieve clinical trial information","text":"next steps executed R environment:","code":"q <- ctrGetQueryUrl() # * Using clipboard content as register query URL: https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer&age=under-18&status=completed&phase=phase-one # * Found search query from EUCTR: query=cancer&age=under-18&status=completed&phase=phase-one q # query-term query-register # 1 query=cancer&age=under-18&status=completed&phase=phase-one EUCTR # To check, this opens a browser with the query ctrOpenSearchPagesInBrowser(url = q)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"retrieve-protocol-related-information-transform-save-to-database-check","dir":"Articles","previous_headings":"Get started","what":"Retrieve protocol-related information, transform, save to database, check","title":"Retrieve clinical trial information","text":"file-base SQLite database, takes 20 seconds 300 records, time needed internet-retrieval slow register. Speed higher registers, using MongoDB memory-based SQLite.","code":"# Count number of trial records ctrLoadQueryIntoDb( queryterm = q, only.count = TRUE )$n # * Found search query from EUCTR: query=cancer&age=under-18&status=completed&phase=phase-one # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # [1] 103 # Connect to a database and chose a collection (table) db <- nodbi::src_sqlite( dbname = \"sqlite_file.sql\", collection = \"test\" ) # Retrieve records, download into database ctrLoadQueryIntoDb( queryterm = q, con = db ) # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # Download status: 6 done; 0 in progress. Total size: 8.73 Mb (100%)... done! # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 414 records on 103 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"test\") # $n # [1] 414 # Show which queries have been downloaded into database dbQueryHistory(con = db) # query-timestamp query-register query-records query-term # 1 2024-05-12 17:56:11 EUCTR 414 query=cancer&age=under-18&status=completed&phase=phase-one"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"repeat-and-update-a-previous-query","dir":"Articles","previous_headings":"","what":"Repeat and update a previous query","title":"Retrieve clinical trial information","text":"Instead “last”, integer number can specified querytoupdate corresponds number using dbQueryHistory(). Depending register, update (differential update) possible original query executed fully .","code":"ctrLoadQueryIntoDb( querytoupdate = \"last\", con = db )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"retrieve-results","dir":"Articles","previous_headings":"","what":"Retrieve results","title":"Retrieve clinical trial information","text":"EUCTR, result-related trial information requested retrieved, take longer download store. CTGOV, results always included retrieval. Note trial documents, including results reports, can downloaded specifying parameter documents.path, see help(ctrLoadQueryIntoDb). file-base SQLite database, takes 4 minutes 300 records, time needed merging result- protocol-related information SQLite; much faster MongoDB PostgreSQL. download presence results recorded dbQueryHistory() availability results increases time.","code":"ctrLoadQueryIntoDb( queryterm = q, euctrresults = TRUE, con = db ) # * Checking trials in EUCTR... # Retrieved overview, multiple records of 103 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 414 records on 103 trial(s) # * Checking results if available from EUCTR for 103 trials: # (1/4) Downloading results... # Download status: 103 done; 0 in progress. Total size: 59.71 Mb (100%)... done! # Download status: 27 done; 0 in progress. Total size: 108.69 Kb (100%)... done! # - extracting results (. = data, F = file[s] and data, x = none): # . . . . . . F . . . . F . . . . . . . F . . . . . . . . . . . . . . . . . . . . . . . . F . F F . F . . # F . . . F F . . . . . F . . . . . . F . . . F . # (2/4) Converting to NDJSON (estimate: 8 s)... # (3/4) Importing results into database (may take some time)... # (4/4) Results history: not retrieved (euctrresultshistory = FALSE) # = Imported or updated results for 76 trials # Updated history (\"meta-info\" in \"test\") # $n # [1] 414"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-information-from-another-register","dir":"Articles","previous_headings":"","what":"Add information from another register","title":"Retrieve clinical trial information","text":"collection can used store (analyse) trial information different registers. Example: file-base SQLite database, takes 10 seconds 200 records. Note example, warning message may issued importing NDJSON file trial records. warning arises high level complexity XML content trial records. issue can resolved increasing operating system stack size available R, see: https://github.com/rfhb/ctrdata/issues/22","code":"ctrLoadQueryIntoDb( queryterm = \"https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. # Note that the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&intr=Drug&aggFilters=ages:child,status:com # # * Found search query from CTGOV2: cond=neuroblastoma&intr=Drug&aggFilters=ages:child,status:com # * Checking trials using CTGOV REST API 2.0, found 222 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 22 MB total) # Download status: 1 done; 0 in progress. Total size: 9.79 Mb (615%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 222 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"test\") # $n # [1] 222"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-records-from-ctis-register-into-the-same-collection","dir":"Articles","previous_headings":"","what":"Add records from CTIS register into the same collection","title":"Retrieve clinical trial information","text":"23 June 2024, 4100 trials publicly accessible CTIS, used since January 2023 new clinical trials European Union (EU). Queries CTIS search interface can automatically copied clipboard user can paste queryterm, see .","code":"# Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = 'searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"}', register = \"CTIS\", con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trial list(s), found 7 trials # (2/4) Downloading and processing trial data... (estimate: 0.6 Mb) # Download status: 7 done; 0 in progress. Total size: 262.58 Kb (100%)... done! # (3/4) Importing records into database... # (4/4) Updating with additional data: . # = Imported 7, updated 7 record(s) on 7 trial(s) # Updated history (\"meta-info\" in \"test\") # $n # [1] 7"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-personal-annotations","dir":"Articles","previous_headings":"","what":"Add personal annotations","title":"Retrieve clinical trial information","text":"downloading trial information, user can specify annotation records downloaded. default, annotations accumulated trial records loaded updated; alternatively, annotations can replaced. Annotations useful analyses, example specially identify subsets records database.","code":"ctrLoadQueryIntoDb( queryterm = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=neuroblastoma&recrs=e&age=0&type=Intr&cntry=DE\"), annotation.text = \"site_DE \", annotation.mode = \"append\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. # Note that the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&type=Intr&cntry=DE # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&country=Germany&aggFilters=ages:child,studyType:int,status:com # # * Found search query from CTGOV2: # cond=neuroblastoma&country=Germany&aggFilters=ages:child,studyType:int,status:com # * Checking trials using CTGOV REST API 2.0, found 16 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 1.6 MB total) # Download status: 1 done; 0 in progress. Total size: 487.83 Kb (492%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 16 trial(s) # = Annotated retrieved records (16 records) # Updated history (\"meta-info\" in \"test\") # $n # [1] 16"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"add-information-using-trial-identifiers","dir":"Articles","previous_headings":"","what":"Add information using trial identifiers","title":"Retrieve clinical trial information","text":"identifiers clinical trials interest already known, example shows can processed import trial information database collection. involves constructing query combines identifiers iterating sets identifiers. Note combine identifiers using “++” queryterm, register specified. Note CTIS, trial information identified trial identifiers can retrieved one--one, repeating queries trial https://euclinicaltrials.eu/app/#/search?number=2023-503994-39-00.","code":"# ids of trials of interest ctIds <- c( \"NCT00001209\", \"NCT00001436\", \"NCT00187109\", \"NCT01516567\", \"NCT01471782\", \"NCT03042429\", \"NCT00357084\", \"NCT00357500\", \"NCT00365755\", \"NCT00407433\", \"NCT00410657\", \"NCT00436657\", \"NCT00436852\", \"NCT00445965\", \"NCT00450307\", \"NCT00450827\", \"NCT00471679\", \"NCT00486564\", \"NCT00492167\", \"NCT00499616\", \"NCT00503724\", \"NCT00509353\", \"NCT00520936\", \"NCT00536601\", \"NCT00567567\", \"NCT00578864\", \"NCT00601003\", \"NCT00644696\", \"NCT00646230\", \"NCT00659984\", \"NCT00716976\", \"NCT00743496\", \"NCT00793845\", \"NCT00806182\", \"NCT00831844\", \"NCT00867568\", \"NCT00877110\", \"NCT00885326\", \"NCT00918320\", \"NCT00923351\", \"NCT00939770\", \"NCT00960739\" ) # split into sets of each 25 trial ids # (larger sets e.g. 50 may still work) idSets <- split(ctIds, ceiling(seq_along(ctIds) / 25)) # variable to collect import results result <- NULL # iterate over sets of trial ids for (idSet in idSets) { # import setResult <- ctrLoadQueryIntoDb( # for CTGOV2 use: queryterm = paste0(\"term=\", paste0(idSet, collapse = \" \")), # specify register that holds the information register = \"CTGOV2\", con = db ) # append results result <- c(result, list(setResult)) } # inspect results as.data.frame(do.call(rbind, result))[, c(\"n\", \"failed\")] # n failed # 1 25 NULL # 2 17 NULL"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"find-synonyms-of-active-substance-names","dir":"Articles","previous_headings":"","what":"Find synonyms of active substance names","title":"Retrieve clinical trial information","text":"registers automatically expand search terms include alternative terms, codes names active substances. obtain character vector synonyms active substance name, use: names can used queries register.","code":"ctrFindActiveSubstanceSynonyms( activesubstance = \"imatinib\" ) # [1] \"imatinib\" \"Carcemia\" \"Cemivil\" # [4] \"CGP 57148\" \"CGP-57148B\" \"CGP57148B\" # [7] \"Gleevac\" \"Gleevec\" \"Gleevec (Imatinib Mesylate)\" # [10] \"Glevec\" \"Glivec\" \"Imatinib\" # [13] \"Imatinib Mesylate\" \"Imatinib-AFT\" \"NSC #716051\" # [16] \"NSC-716051\" \"QTI571\" \"ST1571\" # [19] \"STI 571\" \"STI-571\" \"STI571\" # [22] \"tyrosine kinase inhibitors\" \"Ziatir\" \"Zoleta\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_retrieve.html","id":"using-a-mongodb-database","dir":"Articles","previous_headings":"","what":"Using a MongoDB database","title":"Retrieve clinical trial information","text":"example works free service . Note user name password need encoded. format connection string documented https://docs.mongodb.com/manual/reference/connection-string/. recommended databases, see vignette Install R package ctrdata.","code":"# Specify base uri for remote MongoDB server, # as part of the encoded connection string db <- nodbi::src_mongo( # Note: this provides read-only access url = \"mongodb+srv://DWbJ7Wh:bdTHh5cS@cluster0-b9wpw.mongodb.net\", db = \"dbperm\", collection = \"dbperm\") # Since the above access is read-only, # just obtain fields of interest: dbGetFieldsIntoDf( fields = c(\"a2_eudract_number\", \"e71_human_pharmacology_phase_i\"), con = db) # _id a2_eudract_number e71_human_pharmacology_phase_i # 1 2010-024264-18-3RD 2010-024264-18 TRUE # 2 2010-024264-18-AT 2010-024264-18 TRUE # 3 2010-024264-18-DE 2010-024264-18 TRUE # 4 2010-024264-18-GB 2010-024264-18 TRUE # 5 2010-024264-18-IT 2010-024264-18 TRUE # 6 2010-024264-18-NL 2010-024264-18 TRUE"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"preparations","dir":"Articles","previous_headings":"","what":"Preparations","title":"Summarise and analyse clinical trial information","text":"using MongoDB, faster SQLite, can handle credentials, provides access remote servers can directly retrieve nested elements paths. See README.md Retrieve clinical trial information examples using SQLite. Also PostgreSQL can used database, see Install R package ctrdata. See Retrieve clinical trial information details.","code":"db <- nodbi::src_mongo( url = \"mongodb://localhost\", db = \"my_database_name\", collection = \"my_collection_name\" ) db # MongoDB 7.0.8 (uptime: 265661s) # URL: mongodb://localhost # Database: my_database_name # Collection: my_collection_name # empty collection nodbi::docdb_delete(db, db$collection) # library(ctrdata) # These two queries are similar, for completed interventional (drug) # trials with children with a neuroblastoma from either register ctrLoadQueryIntoDb( # using queryterm and register... queryterm = \"query=neuroblastoma&age=under-18&status=completed\", register = \"EUCTR\", euctrresults = TRUE, con = db ) ctrLoadQueryIntoDb( # or using full URL of search results queryterm = \"https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&recrs=e&age=0&intr=Drug\", con = db ) dbQueryHistory(con = db) # query-timestamp query-register query-records query-term # 1 2024-05-12 18:39:52 EUCTR 210 query=neuroblastoma&age=under-18&status=completed # 2 2024-05-12 18:40:10 CTGOV 226 cond=neuroblastoma&recrs=e&age=0&intr=Drug"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"find-fields-variables-of-interest","dir":"Articles","previous_headings":"","what":"Find fields / variables of interest","title":"Summarise and analyse clinical trial information","text":"Specify part name variable interest; variables including deeply nested variable names searched. search fields cached thus accelerated R session, long new ctrLoadQueryIntoDb() executed.","code":"# dbFindFields(namepart = \"date\", sample = FALSE, con = db) # Finding fields in database collection (may take some time) . . . . . # Field names cached for this session. # CTGOV # \"completion_date\" # CTGOV # \"last_update_posted\" # CTGOV # \"last_update_submitted\" # CTGOV # \"last_update_submitted_qc\" # CTGOV # \"primary_completion_date\" # CTGOV # \"provided_document_section.provided_document.document_date\" # CTGOV # \"required_header.download_date\" # CTGOV # \"start_date\" # CTGOV # \"verification_date\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives_es\" # EUCTR # \"e231_full_title_date_and_version_of_each_substudy_and_their_related_objectives_it\" # EUCTR # \"n_date_of_competent_authority_decision\" # EUCTR # \"n_date_of_ethics_committee_opinion\" # EUCTR # \"p_date_of_the_global_end_of_the_trial\" # EUCTR # \"trialChanges.globalAmendments.globalAmendment.date\" # EUCTR # \"trialChanges.globalInterruptions.globalInterruption.date\" # EUCTR # \"trialChanges.globalInterruptions.globalInterruption.restartDate\" # EUCTR # \"trialInformation.analysisStageDate\" # EUCTR # \"trialInformation.globalEndOfTrialDate\" # EUCTR # \"trialInformation.primaryCompletionDate\" # EUCTR # \"trialInformation.recruitmentStartDate\" # EUCTR # \"x6_date_on_which_this_record_was_first_entered_in_the_eudract_database\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"data-frame-from-database","dir":"Articles","previous_headings":"","what":"Data frame from database","title":"Summarise and analyse clinical trial information","text":"fields interest can obtained database represented R data.frame:","code":"result <- dbGetFieldsIntoDf( c( \"f41_in_the_member_state\", \"f422_in_the_whole_clinical_trial\", \"a1_member_state_concerned\", \"p_end_of_trial_status\", \"n_date_of_competent_authority_decision\", \"a2_eudract_number\", \"overall_status\", \"start_date\", \"primary_completion_date\" ), con = db )"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"metadata-from-data-frame","dir":"Articles","previous_headings":"","what":"Metadata from data frame","title":"Summarise and analyse clinical trial information","text":"objects returned functions package include attributes metadata indicate database, table / collection query details. Metadata can reused R. database, variable “_id” unique index record. “_id” NCT number CTGOV records (e.g., “NCT00002560”), EudraCT number EUCTR records including postfix identifying EU Member State (e.g., “2008-001436-12-NL”). relevant de-duplicate records trial can registered CTGOV EUCTR, can records involved country EUCTR. De-duplication done analysis stage enables select trial record taken one register, one EU Member State. basis de-duplication recording additional trial identifiers supplementary fields (variables), checked reported using function dbFindIdsUniqueTrials(): unique ids can used like de-duplicate data.frame created :","code":"attributes(result) # [...] # # $class # [1] \"data.frame\" # # $`ctrdata-dbname` # [1] \"my_database_name\" # # $`ctrdata-table` # [1] \"my_collection_name\" # # $`ctrdata-dbqueryhistory` # query-timestamp query-register query-records query-term # 1 2024-05-12 18:39:52 EUCTR 210 query=neuroblastoma&age=under-18&status=completed # 2 2024-05-12 18:40:10 CTGOV 226 cond=neuroblastoma&recrs=e&age=0&intr=Drug # Obtain de-duplicated trial record ids ids <- dbFindIdsUniqueTrials( preferregister = \"EUCTR\", con = db ) # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 436 found in collection # - Finding duplicates among registers' and sponsor ids... # - 159 EUCTR _id were not preferred EU Member State record for 54 trials # - Keeping 51 / 210 / 0 / 0 / 0 records from EUCTR / CTGOV / ISRCTN / CTIS / CTGOV2 # = Returning keys (_id) of 261 records in collection \"my_collection_name\" # Eliminate duplicate trials records: result <- result[result[[\"_id\"]] %in% ids, ] # nrow(result) # [1] 261"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"simple-analysis---dates","dir":"Articles","previous_headings":"","what":"Simple analysis - dates","title":"Summarise and analyse clinical trial information","text":"data.frame generated dbGetFieldsIntoDf(), fields typed dates, logical, character numbers. typing facilitates using respective type data analysis, example dates base R graphics:","code":"# str(result) # 'data.frame': 261 obs. of 10 variables: # $ _id : chr \"2004-004386-15-DE\" \"2005-000915-80-IT\" ... # $ a1_member_state_concerned : chr \"Germany - BfArM\" \"Italy - Italian Medicines Agency\" ... # $ a2_eudract_number : chr \"2004-004386-15\" \"2005-000915-80\" \"2005-001267-63\" ... # $ f41_in_the_member_state : int NA NA 5 37 70 24 100 35 10 24 ... # $ f422_in_the_whole_clinical_trial : int 230 NA 12 67 70 NA 100 156 2230 NA ... # $ n_date_of_competent_authority_decision: Date, format: \"2005-07-08\" \"2005-04-21\" \"2005-07-08\" ... # $ p_end_of_trial_status : chr \"Completed\" \"Completed\" \"Completed\" \"Completed\" ... # $ overall_status : chr NA NA NA NA ... # $ start_date : Date, format: NA NA NA ... # $ primary_completion_date : Date, format: NA NA NA ... # - attr(*, \"ctrdata-dbname\")= chr \"my_database_name\" # - attr(*, \"ctrdata-table\")= chr \"my_collection_name\" # - attr(*, \"ctrdata-dbqueryhistory\")='data.frame': 2 obs. of 4 variables: # ..$ query-timestamp: chr [1:2] \"2024-05-12 18:39:52\" \"2024-05-12 18:40:10\" # ..$ query-register : chr [1:2] \"EUCTR\" \"CTGOV\" # ..$ query-records : int [1:2] 210 226 # ..$ query-term : chr [1:2] \"query=neuroblastoma&age=under-18&status=completed\" # \"cond=neuroblastoma&recrs=e&age=0&intr=Drug\" # Open file for saving png(\"vignettes/nb1.png\") # Visualise trial start date hist( result[[\"n_date_of_competent_authority_decision\"]], breaks = \"years\" ) box() dev.off()"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"merge-corresponding-fields-from-registers","dir":"Articles","previous_headings":"","what":"Merge corresponding fields from registers","title":"Summarise and analyse clinical trial information","text":"field “n_date_of_competent_authority_decision” used exists EUCTR, yet corresponds field “start_date” CTGOV. Thus, give start trial, two fields can merged analysis, using convenience function dfMergeVariablesRelevel() ctrdata package: sophisticated use dfMergeVariablesRelevel(), values original variables can mapped new values merged variable, follows:","code":"# Merge two variables into a new variable: result$trialstart <- dfMergeVariablesRelevel( result, colnames = c( \"n_date_of_competent_authority_decision\", \"start_date\" ) ) # Plot from both registers png(\"vignettes/nb2.png\") hist( result[[\"trialstart\"]], breaks = \"years\" ) box() dev.off() # First, define how values of the new, merged variable # (e.g., \"ongoing\") will result from values of the # original variable (e.g, \"Recruiting): mapped_values <- list( \"ongoing\" = c( # EUCTR \"Recruiting\", \"Active\", \"Ongoing\", \"Temporarily Halted\", \"Restarted\", # CTGOV \"Active, not recruiting\", \"Enrolling by invitation\", \"Not yet recruiting\", \"ACTIVE_NOT_RECRUITING\", # CTIS \"Ongoing, recruiting\", \"Ongoing, recruitment ended\", \"Ongoing, not yet recruiting\", \"Authorised, not started\" ), \"completed\" = c( \"Completed\", \"COMPLETED\", \"Ended\"), \"other\" = c( \"GB - no longer in EU/EEA\", \"Trial now transitioned\", \"Withdrawn\", \"Suspended\", \"No longer available\", \"Terminated\", \"TERMINATED\", \"Prematurely Ended\", \"Under evaluation\") ) # Secondly, use the list of mapped # values when merging two variable: tmp <- dfMergeVariablesRelevel( result, colnames = c( \"overall_status\", \"p_end_of_trial_status\" ), levelslist = mapped_values ) table(tmp) # ongoing completed other # 4 252 4"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"user-annotations","dir":"Articles","previous_headings":"","what":"User annotations","title":"Summarise and analyse clinical trial information","text":"using ctrLoadQueryIntoDb(), ctrdata adds record fields annotation record_last_import. annotation field single string user specifies retrieving trials (Retrieve clinical trial information). user can specify append, prefix replace existing annotations trial record loaded , see example . last date time trial record imported updated automatically using ctrLoadQueryIntoDb(). fields can also used analysis. example, string functions can used annotations, e.g. split components. Since annotations specified retrieving trials steps , far annotation fields stopifnodata set FALSE avoid function raises error alert users:","code":"# ctrLoadQueryIntoDb( queryterm = \"query=neuroblastoma&resultsstatus=trials-with-results\", register = \"EUCTR\", euctrresults = TRUE, annotation.text = \"test annotation\", annotation.mode = \"append\", con = db ) result <- dbGetFieldsIntoDf( fields = c( \"annotation\", \"record_last_import\" ), con = db ) str(result) # 'data.frame': 482 obs. of 3 variables: # $ _id : chr \"2004-004386-15-DE\" \"2004-004386-15-ES\" \"2004-004386-15-IT\" ... # $ record_last_import: Date, format: \"2024-05-12\" \"2024-05-12\" \"2024-05-12\" ... # $ annotation : chr \"test annotation\" \"test annotation\" \"test annotation\" ..."},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-sample-size-using-historic-versions-of-trial-records","dir":"Articles","previous_headings":"","what":"Analysing sample size using historic versions of trial records","title":"Summarise and analyse clinical trial information","text":"Historic versions can set retrieved CTGOV2 specifying ctgov2history = <...> using ctrLoadQueryIntoDb(); functionality added ctrdata version 1.18.0. Historic versions automatically retrieved CTIS. versions include trial data available date respective version. CTGOV2 records, historic versions added follows ctrdata data model trial record, ellipsis ... represents trial data fields: {\"_id\":\"NCT01234567\", \"title\": \"Current title\", ..., \"history\": [{\"history_version\": {\"version_number\": 1, \"version_date\": \"2020-21-22 10:11:12\"}, \"title\": \"Original title\", ...}, {\"history_version\": {\"number\": 2, \"date\": \"2021-22-23 11:13:13\"}, \"title\": \"Later title\", ...}]} example shows planned realised number participants (sample size) changed time individual trials, using data registers.","code":"# # load some trials from CTGOV2 specifying that # for each trial, 5 versions should be retrieved ctrLoadQueryIntoDb( queryterm = \"https://clinicaltrials.gov/search?cond=neuroblastoma&aggFilters=phase:3,status:com\", con = db, ctgov2history = 5L ) ctrLoadQueryIntoDb( queryterm = \"https://euclinicaltrials.eu/app/#/search?basicSearchInputAND=cancer&ageGroupCode=2\", con = db ) result <- dbGetFieldsIntoDf( fields = c( # CTGOV2 \"history.protocolSection.designModule.enrollmentInfo.count\", \"history.history_version\", # CTIS \"applications.submissionDate\", \"applications.partI.rowSubjectCount\" ), con = db ) # helpers library(dplyr) library(tidyr) library(ggplot2) # mangle and plot result %>% unnest(cols = starts_with(\"history.\")) %>% unnest(cols = starts_with(\"applications.\")) %>% mutate(version_date = as.Date(version_date)) %>% mutate(count = dfMergeVariablesRelevel(., colnames = c( \"history.protocolSection.designModule.enrollmentInfo.count\", \"applications.partI.rowSubjectCount\"))) %>% mutate(date = dfMergeVariablesRelevel(., colnames = c( \"applications.submissionDate\", \"version_date\"))) %>% select(`_id`, count, date) %>% arrange(`_id`, date) %>% group_by(`_id`) %>% ggplot( mapping = aes( x = date, y = count, colour = `_id`) ) + geom_step() + geom_point() + theme_light() + guides(colour = \"none\") ggsave(\"vignettes/samplesizechanges.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-nested-fields-such-as-trial-results","dir":"Articles","previous_headings":"","what":"Analysing nested fields such as trial results","title":"Summarise and analyse clinical trial information","text":"registers represent clinical trial information nesting fields (e.g., several reporting groups within several measures within one several endpoints). visualisation hierarchical representation CTGOV : analysis nested information highlighted duration response facilitated ctrdata follows. main steps : transform nested information long, name-value data frame identify measures interest (e.g. duration response, blue circles ) located information hierarchy specifying name value fields (wherename, wherevalue) finally obtain value specifying name(s) value field(s) (valuename, red circles figure ).","code":"# dbFindFields(\"outcome\", db) # remotes::install_github(\"https://github.com/hrbrmstr/jsonview\") result <- dbGetFieldsIntoDf(\"clinical_results.outcome_list.outcome\", db) jsonview::json_tree_view(result[[\"clinical_results.outcome_list.outcome\"]][ result[[\"_id\"]] == \"NCT00520936\" ]) # 1. Create data frame from results fields. # These are the key results fields from # CTGOV and from EUCTR: result <- dbGetFieldsIntoDf( fields = c( # CTGOV \"clinical_results.baseline.analyzed_list.analyzed.count_list.count\", \"clinical_results.baseline.group_list.group\", \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.outcome_list.outcome\", \"study_design_info.allocation\", # EUCTR \"@attributes.eudractNumber\", \"trialInformation.populationAgeGroup\", \"subjectDisposition.recruitmentDetails\", \"baselineCharacteristics.baselineReportingGroups.baselineReportingGroup\", \"endPoints.endPoint\", \"trialChanges.hasGlobalInterruptions\", \"subjectAnalysisSets\", \"adverseEvents.seriousAdverseEvents.seriousAdverseEvent\" ), con = db ) # Keep only unique trial records result <- result[result[[\"_id\"]] %in% dbFindIdsUniqueTrials(con = db), ] # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 497 found in collection # - Finding duplicates among registers' and sponsor ids... # - 187 EUCTR _id were not preferred EU Member State record for 79 trials # - Keeping 69 / 184 / 20 / 0 / 13 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS # = Returning keys (_id) of 286 records in collection \"my_collection_name\" # 2. The columns of the results data frame # contain nested lists of fields, example: str(result[[\"endPoints.endPoint\"]][1]) # List of 1 # $ :List of 12 # ..$ title : chr \"Primary\" # ..$ readyForValues : chr \"false\" # ..$ countable : chr \"false\" # ..$ unit : chr \"TBC\" # ..$ timeFrame : chr \"TBC\" # ..$ type :List of 1 # .. ..$ value: chr \"ENDPOINT_TYPE.primary\" # ..$ centralTendencyType :List of 1 # .. ..$ value: chr \"MEASURE_TYPE.arithmetic\" # ..$ dispersionType :List of 1 # .. ..$ value: chr \"ENDPOINT_DISPERSION.standardDeviation\" # ..$ categories : chr \"\" # ..$ armReportingGroups : chr \"\" # ..$ subjectAnalysisSetReportingGroups: chr \"\" # ..$ statisticalAnalyses : chr \"\" # All nested data are transformed to a long, # name-value data.frame (resulting in several # hundred rows per trial record): long_result <- dfTrials2Long(df = result) # Total 162238 rows, 152 unique names of variables # 3. Obtain values for fields of interest where # they related to measures of interest. The # parameters can be regular expressions. dor <- dfName2Value( df = long_result, wherename = paste0( \"clinical_results.outcome_list.outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"duration of response\", valuename = paste0( \"clinical_results.*category_list.category.measurement_list.measurement.value|\", \"endPoints.*armReportingGroup.tendencyValues.tendencyValue.value\" ) ) # Returning values for 7 out of 113 trials # Duration of response has been reported variably in # months and days. Here, just select trials reporting # duration of response in months: dor <- dor[ grepl(\"months\", dfName2Value( df = long_result, wherename = paste0( \"clinical_results.*outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"duration of response\", valuename = paste0( \"clinical_results.*measure.units|\", \"endPoints.endPoint.unit\" ) )[[\"value\"]], ignore.case = TRUE ), ] # Returning values for 12 out of 113 trials # the identifier is generated to identify repeated and # nested elements in a trial, so that it permits to # find the valuename that corresponds to the item # for which wherename has wherevalue) dor[, c(\"_id\", \"identifier\", \"value\")] # _id identifier value # 1 2010-019348-37-IT 8.2 7.0 # 2 2010-019348-37-IT 8.3 8.1 # 5 2013-003595-12-SK 6.2 999.0 # 6 2013-003595-12-SK 6.3 999.0 # 7 2013-003595-12-SK 6.4 999.0 # 8 2013-003595-12-SK 6.5 999.0 # 9 2013-003595-12-SK 6.6 999.0 # 10 2013-003595-12-SK 6.7 999.0 # 11 2014-000445-79-DE 3 40.5 # 14 2014-005674-11-3RD 3.4 99999.0 # 15 2015-000230-29-DE 5.1.1 99999.0 # [...]"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysing-primary-endpoints","dir":"Articles","previous_headings":"","what":"Analysing primary endpoints","title":"Summarise and analyse clinical trial information","text":"Text analysis used many fields trial information registers. example simply categorise type primary endpoint. addition, number subjects extracted compared type primary endpoint.","code":"# Several \"measure\" entries are in \"primary_outcome\". # They are concatenated into a list when specifying # the JSON path \"primary_outcome.measure\" result <- dbGetFieldsIntoDf( c( # CTGOV \"primary_outcome.measure\", \"enrollment\", # EUCTR \"e51_primary_end_points\", # \"f11_trial_has_subjects_under_18\" \"f11_number_of_subjects_for_this_age_range\" ), con = db ) # De-duplicate result <- result[ result[[\"_id\"]] %in% dbFindIdsUniqueTrials(con = db), ] # Merge primary endpoint (pep) result$pep <- dfMergeVariablesRelevel( df = result, colnames = c( \"primary_outcome.measure\", \"e51_primary_end_points\" ) ) # Merge number of subjects result$nsubj <- dfMergeVariablesRelevel( df = result, colnames = c( \"enrollment\", \"f11_number_of_subjects_for_this_age_range\" ) ) # For primary endpoint of interest, # use regular expression on text: result$pep_is_efs <- grepl( pattern = \"((progression|event|relapse|recurrence|disease)[- ]free)|pfs|dfs|efs)\", x = result$pep, ignore.case = TRUE ) # Tabulate table(result$pep_is_efs) # FALSE TRUE # 207 21 # Plot library(ggplot2) ggplot( data = result, aes( x = nsubj, y = pep_is_efs ) ) + geom_boxplot() + scale_x_log10() # Warning message: # Removed 25 rows containing non-finite values (`stat_boxplot()`). ggsave(\"vignettes/boxpep.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analysis-methods-and-p-values","dir":"Articles","previous_headings":"","what":"Analysis methods and p values","title":"Summarise and analyse clinical trial information","text":"","code":"# helper normalise_string <- function(x) { x <- gsub(\",\", \"\", x) x <- gsub(\"-\", \" \", x) x <- tolower(x) x <- tools::toTitleCase(x) x <- gsub(\"[ ]+\", \" \", x) x <- trimws(x) x } # get trials into database ctrLoadQueryIntoDb( queryterm = paste0( \"https://clinicaltrials.gov/ct2/results?rslt=With&age=0&intr=Drug&\", \"phase=1&phase=2&strd_s=01%2F01%2F2010&strd_e=12%2F31%2F2012\"), con = db) # get result set result <- dbGetFieldsIntoDf(c( \"start_date\", \"detailed_description.textblock\", \"official_title\", \"eligibility.maximum_age\", \"study_design_info.allocation\", \"primary_outcome.measure\", \"arm_group.arm_group_type\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.method\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.p_value\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.param_type\", \"clinical_results.outcome_list.outcome.analysis_list.analysis.non_inferiority_type\", \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.baseline.analyzed_list.analyzed.count_list.count.value\" ), con = db) # number of participants (last number is typically all groups summed up) # also see README.Rmd for alternative way, summing up non-total groups result$totalparticipants <- vapply( result[[\"clinical_results.baseline.analyzed_list.analyzed.count_list.count.value\"]], FUN = function(x) rev(x)[1], numeric(1L)) # first reported p value for primary endpoint analysis result$pvalueprimaryanalysis <- vapply( result[[\"clinical_results.outcome_list.outcome.analysis_list.analysis.p_value\"]], FUN = function(x) as.numeric(trimws(gsub(\"[<>=]\", \"\", strsplit(x, \" / \")[[1]][1]))), numeric(1)) # statistical method used for primary endpoint analysis result$methodprimaryanalysis <- vapply( result[[\"clinical_results.outcome_list.outcome.analysis_list.analysis.method\"]], FUN = function(x) normalise_string(strsplit(x, \" / \")[[1]][1]), character(1)) # based on allocation arms, keep trials that are likely to investigate safety and efficacy result$controlled <- grepl( \"Placebo|No Intervention\", result$arm_group.arm_group_type, ignore.case = TRUE) table(result$controlled) # FALSE TRUE # 871 326 result <- subset(result, controlled == TRUE) # http://varianceexplained.org/statistics/interpreting-pvalue-histogram/ # http://www.pnas.org/content/100/16/9440.full # plot p values library(ggplot2) ggplot(result, aes(pvalueprimaryanalysis)) + stat_ecdf(geom = \"step\") + labs( title = \"Paediatric phase 2 or 3 interventional trials\\nwith randomisation to placebo or to no intervention\", x = \"Range of p values\", y = \"Empirical cumulative density of p values\\nof primary endpoint results\") + geom_vline(xintercept = 0.05, linetype = 3) ggsave(\"vignettes/phase23_paed_p_values.png\", width = 6, height = 4) # plot sample size v p value ggplot(result, aes(x = totalparticipants, y = pvalueprimaryanalysis)) + geom_point() + ylim(0, 1) + xlim(0, 1000) + scale_x_log10() + geom_hline(yintercept = 0.05, linetype = 3) ggsave(\"vignettes/phase23_paed_p_values_participants.png\", width = 6, height = 4) # statistical method used for primary endpoint analysis tmp <- table(result$methodprimaryanalysis) tmp <- tmp[rev(order(tmp))] tmp <- data.frame(tmp) knitr::kable(tmp[1:10,])"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"investigational-or-authorised-medicinal-product","dir":"Articles","previous_headings":"","what":"Investigational or authorised medicinal product?","title":"Summarise and analyse clinical trial information","text":"information status authorisation (licensing) medicine used trial recorded EUCTR field dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation. corresponding field CTGOV known. status tree starting dimp element.","code":"# library(dplyr) # Get results result <- dbGetFieldsIntoDf( fields = c( \"a1_member_state_concerned\", \"n_date_of_competent_authority_decision\", \"dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation\", \"x6_date_on_which_this_record_was_first_entered_in_the_eudract_database\", \"f422_in_the_whole_clinical_trial\", \"a2_eudract_number\" ), con = db ) # Find first date of authorisation in EU member state tmp <- aggregate( result[[\"n_date_of_competent_authority_decision\"]], by = list(result[[\"a2_eudract_number\"]]), FUN = function(x) min(x) ) result <- merge( x = result, y = tmp, by.x = \"a2_eudract_number\", by.y = \"Group.1\", all.x = TRUE ) result %<>% rowwise() %>% mutate(startdatefirst = min( x, x6_date_on_which_this_record_was_first_entered_in_the_eudract_database, na.rm = TRUE)) # Now de-duplicate result <- result[ result[[\"_id\"]] %in% dbFindIdsUniqueTrials( include3rdcountrytrials = FALSE, con = db), ] # How many of the investigational medicinal product(s) # used in the trial are authorised? number_authorised <- sapply( result[[\"dimp.d21_imp_to_be_used_in_the_trial_has_a_marketing_authorisation\"]], function(i) length(i[i]) ) table(number_authorised, exclude = \"\") # number_authorised # 0 1 2 3 4 6 8 15 # 26 18 7 5 3 2 1 1 result[[\"any_authorised\"]] <- number_authorised > 0L # Plot library(ggplot2) library(scales) ggplot( data = result, aes( x = startdatefirst, fill = any_authorised ) ) + scale_x_date( breaks = breaks_width(width = \"2 years\"), labels = date_format(\"%Y\") ) + geom_histogram(binwidth = 2 * 365.25) + labs( title = \"Neuroblastoma trials in EU\", x = \"Year of trial authorisation (or entered in EUCTR)\", y = \"Number of trials\", fill = \"Medicine\\nauthorised?\" ) ggsave(\"vignettes/nbtrials.png\", width = 6, height = 4)"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"analyses-using-aggregation-pipeline-and-mapreduce","dir":"Articles","previous_headings":"","what":"Analyses using aggregation pipeline and mapreduce","title":"Summarise and analyse clinical trial information","text":"example analysis functions can run directly MongoDB server, fast consume R resources.","code":"# Load library for database access library(mongolite) # Create R object m to access the # collection db created above: m <- mongo( url = paste0(db[[\"url\"]], \"/\", db[[\"db\"]]), collection = db[[\"collection\"]] ) # Number of records in collection: m$count() # [1] 1490 # Number of EUCTR records, using JSON for query: m$count(query = '{\"_id\": {\"$regex\": \"[0-9]{4}-[0-9]{6}-[0-9]{2}\", \"$options\": \"i\"}}') # [1] 269 # Alternative: m$count(query = '{\"ctrname\": \"EUCTR\"}') # [1] 256 # Number of CTGOV records: m$count(query = '{\"_id\": {\"$regex\": \"NCT[0-9]{8}\", \"$options\": \"i\"}}') # [1] 1220 # Alternative: m$count(query = '{\"ctrname\": \"CTGOV\"}') # [1] 1197 # To best define regular expressions for analyses, # inspect the field (here, primary_outcome.measure): # Regular expressions (\"$regex\") are case insensitive (\"i\") head( m$distinct( key = \"primary_outcome.measure\", query = '{\"ctrname\": \"CTGOV\"}' ) ) # [1] \"% Calories Taken Orally\" \"1-year Progression-free Survival\" # [3] \"10-year Hematologic Cancer Rate\" \"10-year Mortality Rate in Marrow Donors\" # [5] \"10-year Overall Cancer Incidence\" \"17-hydroxyprogesterone Response to ACTH\""},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"aggregation","dir":"Articles","previous_headings":"Analyses using aggregation pipeline and mapreduce","what":"Aggregation","title":"Summarise and analyse clinical trial information","text":"following example uses aggregation pipeline MongoDB. See details mongo’s aggregation pipleline: https://docs.mongodb.org/manual/core/aggregation-pipeline/","code":"# # Total count of PFS, EFS, RFS or DFS out <- m$aggregate( # Count number of documents in collection that # matches in primary_outcome.measure the # regular expression, pipeline = '[{\"$match\": {\"primary_outcome.measure\": {\"$regex\": \"(progression|event|relapse|recurrence|disease)[- ]free\", \"$options\": \"i\"}}}, {\"$group\": {\"_id\": \"null\", \"count\": {\"$sum\": 1}}}]' ) out # _id count # 1 null 51 # List records of trials with overall survival # as primary endpoint, and list start date out <- m$aggregate( pipeline = '[{\"$match\": {\"primary_outcome.measure\": {\"$regex\": \"overall survival\", \"$options\": \"i\"}}}, {\"$project\": {\"_id\": 1, \"start_date\": 1}}]' ) head(out) # _id start_date # 1 NCT00445965 January 2006 # 2 NCT00793845 August 2008 # 3 NCT00923351 June 2, 2007 # 4 NCT00796510 July 2010 # 5 NCT01182350 September 2011 # 6 NCT01190930 August 9, 2010"},{"path":"https://rfhb.github.io/ctrdata/articles/ctrdata_summarise.html","id":"mapreduce","dir":"Articles","previous_headings":"Analyses using aggregation pipeline and mapreduce","what":"Mapreduce","title":"Summarise and analyse clinical trial information","text":"following examples uses map-reduce operation MongoDB. Note deprecated starting MongoDB 5. information: https://docs.mongodb.com/manual/core/map-reduce/ Thus, query expressed aggregation pipeline.","code":"# Count number of trials by number of study # participants in bins of hundreds of participants: hist <- m$mapreduce( map = \"function() {emit(Math.floor(this.enrollment/100)*100, 1)}\", reduce = \"function(id, counts) {return Array.sum(counts)}\" ) # read as: 141 trials had 0 to less than 100 participants hist[order(hist[[\"_id\"]]), ] # _id value # 33 0 707 # 19 100 162 # 30 200 76 # 10 300 59 # 6 400 30 # 37 500 29 # 26 600 17 # 36 700 21 # 27 800 13 # 8 900 9 # 35 1000 5 # 23 1100 3 # [...] # same as aggregation pipeline, # which is more future proof m$aggregate(pipeline = ' [ { \"$project\": { \"flooredNumber\": { \"$multiply\": [ { \"$floor\": { \"$divide\": [ { \"$toInt\": \"$enrollment\" }, 100 ] } }, 100 ] } } }, { \"$group\": { \"_id\": \"$flooredNumber\", \"count\": { \"$count\": {} } } }, { \"$sort\": { \"_id\": 1 } } ] ') # _id count # 1 NA 317 # 2 0 707 # 3 100 162 # 4 200 76 # 5 300 59 # 6 400 30 # 7 500 29 # 8 600 17 # 9 700 21 # 10 800 13 # [...]"},{"path":"https://rfhb.github.io/ctrdata/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ralf Herold. Author, maintainer.","code":""},{"path":"https://rfhb.github.io/ctrdata/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Herold R (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.18.0.9000, https://rfhb.github.io/ctrdata/, https://cran.r-project.org/package=ctrdata.","code":"@Manual{, title = {ctrdata: Retrieve and Analyze Clinical Trials in Public Registers}, author = {Ralf Herold}, year = {2024}, note = {R package version 1.18.0.9000, https://rfhb.github.io/ctrdata/}, url = {https://cran.r-project.org/package=ctrdata}, }"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"ctrdata-for-aggregating-and-analysing-clinical-trials","dir":"","previous_headings":"","what":"Retrieve and Analyze Clinical Trials in Public Registers","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"package ctrdata provides functions retrieving (downloading) information clinical trials public registers, aggregating analysing information; can used EU Clinical Trials Register (“EUCTR”, https://www.clinicaltrialsregister.eu/) EU Clinical Trials Information System (“CTIS”, https://euclinicaltrials.eu/, see example) ClinicalTrials.gov (“CTGOV” classic 2023 “CTGOV2”, see example) ISRCTN Registry (https://www.isrctn.com/) motivation investigate understand trends design conduct trials, availability patients facilitate using detailed results research meta-analyses. ctrdata package R system, systems tools can used databases created package. README reviewed 2024-06-23 version 1.19.0 (major improvements: removed external dependencies; refactored dbGetFieldsIntoDf(); 🔔 retrieve historic CTGOV2 versions).","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"main-features","dir":"","previous_headings":"","what":"Main features","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Protocol- results-related trial information easily downloaded: Users define query register’s web interface, copy URL enter ctrdata retrieves one go trials found. script can automate copying query URL registers. Personal annotations can made downloading trials. Also, trial documents historic versions available registers trials can downloaded. Downloaded trial information transformed stored collection document-centric database, fast offline access. Information different registers can accumulated single collection. Uses DuckDB, PostgreSQL, RSQLite MongoDB, via R package nodbi: see section Databases . Easily re-run previous query collection retrieve update trial records. analyses, convenience functions ctrdata allow find synonyms active substance, identify unique (de-duplicated) trial records across registers, merge recode fields well easily access deeply-nested fields. Analysis can done R (see vignette) systems, using JSON-structured information database. Remember respect registers’ terms conditions (see ctrOpenSearchPagesInBrowser(copyright = TRUE)). Please cite package publication follows: “Ralf Herold (2024). ctrdata: Retrieve Analyze Clinical Trials Public Registers. R package version 1.17.2, https://cran.r-project.org/package=ctrdata”.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata used unpublished work : Lasch et al. (2022) Impact COVID‐19 Initiation Clinical Trials Europe United States. Clinical Pharmacology & Therapeutics https://doi.org/10.1002/cpt.2534 Sood et al. Managing Evidence Infodemic: Automation Approaches Used Developing NICE COVID-19 Living Guidelines. medRxiv https://doi.org/10.1101/2022.06.13.22276242 🔔 Blogging Innovation coming paediatric research Cancer Research UK (2017) impact collaboration: value UK medical research EU science health","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"id_1-install-package-ctrdata-in-r","dir":"","previous_headings":"Installation","what":"1. Install package ctrdata in R","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata CRAN GitHub. Within R, use following commands install package ctrdata: commands also install package’s dependencies (jsonlite, httr, curl, clipr, xml2, nodbi, stringi, tibble, lubridate, jqr, dplyr, zip V8).","code":"# Install CRAN version: install.packages(\"ctrdata\") # Alternatively, install development version: install.packages(\"devtools\") devtools::install_github(\"rfhb/ctrdata\", build_vignettes = TRUE)"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"id_2-script-to-automatically-copy-users-query-from-web-browser","dir":"","previous_headings":"Installation","what":"2. Script to automatically copy user’s query from web browser","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"optional; works registers supported ctrdata recommended CTIS URL web browser reflect parameters user specified querying register. web browser, install Tampermonkey browser extension, click “New user script” “Tools”, enter “Import URL” URL: https://raw.githubusercontent.com/rfhb/ctrdata/master/tools/ctrdataURLcopier.js last click “Install”. browser extension can disabled enabled user. enabled, URLs user’s queries registers automatically copied clipboard can pasted queryterm = ... parameter function ctrLoadQueryIntoDb()","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"overview-of-functions-in-ctrdata","dir":"","previous_headings":"","what":"Overview of functions in ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"functions listed approximate order use user’s workflow (bold, main functions). See also package documentation overview.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"databases-for-use-with-ctrdata","dir":"","previous_headings":"","what":"Databases for use with ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata retrieves trial information stores database collection, given connection object parameter con several ctrdata functions; connection object created slightly different ways four supported database backends can used ctrdata shown table. speed comparison, see nodbi documentation. Besides ctrdata functions , connection object can equally used functions packages, nodbi (last row table) , case MongoDB database backend, mongolite (see vignettes).","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"data-model-of-ctrdata","dir":"","previous_headings":"","what":"Data model of ctrdata","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Package ctrdata uses data models implicit data retrieved different registers. mapping provided register’s data model putative target data model. reasons include registers’ data models notably evolving time data fields similar values meaning registers. Thus, handling data different models registers done time analysis. approach allows high level flexibility, transparency reproducibility. See examples help text function dfMergeVariablesRelevel() section Analysis across trials align related fields different registers joint analysis. NoSQL databases, one clinical trial one document, corresponding one row SQLite, PostgreSQL DuckDB table, one document MongoDB collection. NoSQL backends allow documents different structures, used accommodate different data models registers. Package ctrdata stores every document: field _id trial identification provided register retrieved field ctrname name register (EUCTR, CTGOV, CTGOV2, ISRCTN, CTIS) trial retrieved field record_last_import date time document last updated using ctrLoadQueryIntoDb() CTGOV2: object history historic version trial history_version, contains fields version_number (starting 1) version_date original fields provided register trial (see examples ) visualising data structure trial, see vignette section.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Install R package ctrdata Retrieve clinical trial information Summarise analyse clinical trial information","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"example-workflow","dir":"","previous_headings":"","what":"Example workflow","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"aim download protocol-related trial information tabulate trials’ status conduct. Attach package ctrdata: See help get started ctrdata: Information trial registers can used ctrdata (last updated 2024-06-23): Open registers’ advanced search pages browser: Adjust search parameters execute search browser trials interest listed browser, copy address browser’s address bar clipboard (can automate , see ) Search used example: https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer&age=-18&phase=phase-one&status=completed Get address clipboard: 🔔 Queries trial registers can automatically copied clipboard (including “CTIS”, URL show query) using solution . Retrieve protocol-related information, transform save database: database collection specified first, using nodbi (see specify PostgreSQL, RSQlite, DuckDB MongoDB backend, see section Databases). , trial information retrieved loaded collection: hood, EUCTR plain text XML files EUCTR, CTGOV, ISRCTN converted using Javascript via V8 R NDJSON, imported database collection. Analyse Tabulate status trials part agreed paediatric development program (paediatric investigation plan, PIP). ctrdata functions return data.frame (tibble, package tibble loaded). Add records another register (CTGOV) collection new website API introduced July 2023 (https://www.clinicaltrials.gov/) supported ctrdata since mid-2023 identified ctrdata CTGOV2. 2024-06-25, CTGOV retired classic website API used ctrdata since 2015. support users, ctrdata however automatically translates redirects queries current website. helps automatically updating previously loaded queries (ctrLoadQueryIntoDb(querytoupdate = )), manually migrating queries reproducible work clinical trials information. new functionality ctrdata translates user’s search query URL classic website query current CTGOV website, search parameters. Going forward, users recommended change use CTGOV2 queries. regards study data, important differences exist field names contents information retrieved using CTGOV CTGOV2; see XML schema study records CTGOV REST API CTGOV2. details, call help(\"ctrdata-registers\"). one reasons ctrdata handles situation two different registers continue identify current API register = \"CTGOV2\", support analysis stage. Note loading trials ctrdata overwrites previous record CTGOV2 data, whether previous record retrieved using CTGOV CTGOV queries. Search used example: https://www.clinicaltrials.gov/search?cond=Neuroblastoma&aggFilters=ages:child,results:,studyType:int Using example classic CTGOV: Add records third register (ISRCTN) collection Search used example: https://www.isrctn.com/search?q=neuroblastoma Add records fourth register (CTIS 🔔) collection Queries CTIS search interface can automatically copied clipboard user can paste queryterm, see . Subsequent relaunch CTIS 2024-06-17, 4200 trials publicly accessible CTIS. See download documents CTIS. Analysis across trials Show cumulative start trials time. Analysis across registers Result-related trial information Analyse simple result details, CTGOV2 (see vignette examples): Neuroblastoma trials Download documents: retrieve protocols, statistical analysis plans documents local folder ./files-.../","code":"library(ctrdata) help(\"ctrdata\") help(\"ctrdata-registers\") ctrOpenSearchPagesInBrowser() # Please review and respect register copyrights: ctrOpenSearchPagesInBrowser(copyright = TRUE) q <- ctrGetQueryUrl() # * Using clipboard content as register query URL: # https://www.clinicaltrialsregister.eu/ctr-search/search?query=cancer& # age=under-18&phase=phase-one&status=completed # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one&status=completed q # query-term query-register # 1 query=cancer&age=under-18&phase=phase-one&status=completed EUCTR # Connect to (or create) an SQLite database # stored in a file on the local system: db <- nodbi::src_sqlite( dbname = \"some_database_name.sqlite_file\", collection = \"some_collection_name\" ) # Retrieve trials from public register: ctrLoadQueryIntoDb( queryterm = q, euctrresults = TRUE, con = db ) # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one&status=completed # * Checking trials in EUCTR... # Retrieved overview, multiple records of 104 trial(s) from 6 page(s) to be downloaded (estimate: 10 MB) # (1/3) Downloading trials... # Note: register server cannot compress data, transfer takes longer (estimate: 100 s) # Download status: 6 done; 0 in progress. Total size: 8.91 Mb (100%)... done! # (2/3) Converting to NDJSON (estimate: 2 s)... # (3/3) Importing records into database... # = Imported or updated 418 records on 104 trial(s) # * Checking results if available from EUCTR for 104 trials: # (1/4) Downloading results... # Download status: 104 done; 0 in progress. Total size: 59.72 Mb (100%)... done! # Download status: 28 done; 0 in progress. Total size: 112.71 Kb (100%)... done! # - extracting results (. = data, F = file[s] and data, x = none): # F . F F . F . . F . . . F F . . . . . . . . . . . . . . . . . . F . . . . . . F . . # . F . . . . . . . . . F . . . . F . . . . . F . . . . . . . . . . . # (2/4) Converting to NDJSON (estimate: 8 s)... # (3/4) Importing results into database (may take some time)... # (4/4) Results history: not retrieved (euctrresultshistory = FALSE) # = Imported or updated results for 76 trials # No history found in expected format. # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 418 # Get all records that have values in the fields of interest: result <- dbGetFieldsIntoDf( fields = c( \"a7_trial_is_part_of_a_paediatric_investigation_plan\", \"p_end_of_trial_status\", \"a2_eudract_number\" ), con = db ) # Find unique (deduplicated) trial identifiers for trials that have more than # one record, for example for several EU Member States or in several registers: uniqueids <- dbFindIdsUniqueTrials(con = db) # Searching for duplicate trials... # - Getting all trial identifiers (may take some time), 418 found in collection # - Finding duplicates among registers' and sponsor ids... # - 314 EUCTR _id were not preferred EU Member State record for 104 trials # - Keeping 104 / 0 / 0 / 0 / 0 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS # = Returning keys (_id) of 104 records in collection \"some_collection_name\" # Keep only unique / de-duplicated records: result <- subset( result, subset = `_id` %in% uniqueids ) # Tabulate the selected clinical trial information: with( result, table( p_end_of_trial_status, a7_trial_is_part_of_a_paediatric_investigation_plan ) ) # a7_trial_is_part_of_a_paediatric_investigation_plan # p_end_of_trial_status FALSE TRUE # Completed 50 23 # GB - no longer in EU/EEA 1 1 # Ongoing 4 3 # Prematurely Ended 2 3 # Restarted 0 1 # Temporarily Halted 1 1 # Trial now transitioned 1 0 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = \"cond=Neuroblastoma&aggFilters=ages:child,results:with,studyType:int\", register = \"CTGOV2\", con = db ) # * Appears specific for CTGOV REST API 2.0 # * Found search query from CTGOV2: cond=Neuroblastoma&aggFilters=ages:child,results:with,studyType:int # * Checking trials using CTGOV REST API 2.0, found 100 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 10 MB total) # Download status: 1 done; 0 in progress. Total size: 9.19 Mb (805%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 100 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 100 # Retrieve trials: ctrLoadQueryIntoDb( queryterm = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=neuroblastoma&rslt=With&recrs=e&age=0&intr=Drug\"), con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that # the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=neuroblastoma&rslt=With&recrs=e&age=0&intr=Drug # # with this URL: # # https://clinicaltrials.gov/search?cond=neuroblastoma&intr=Drug&aggFilters=ages:child,results:with,status:com # # * Found search query from CTGOV2: cond=neuroblastoma&intr=Drug&aggFilters=ages:child,results:with,status:com # * Checking trials using CTGOV REST API 2.0, found 62 trials # (1/3) Downloading in 1 batch(es) (max. 1000 trials each; estimate: 6.2 MB total) # Download status: 1 done; 0 in progress. Total size: 7.12 Mb (937%)... done! # (2/3) Converting to NDJSON... # (3/3) Importing records into database... # JSON file #: 1 / 1 # = Imported or updated 62 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 62 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = \"https://www.isrctn.com/search?q=neuroblastoma\", con = db ) # * Found search query from ISRCTN: q=neuroblastoma # * Checking trials in ISRCTN... # Retrieved overview, records of 9 trial(s) are to be downloaded (estimate: 0.2 MB) # (1/3) Downloading trial file... # Download status: 1 done; 0 in progress. Total size: 93.28 Kb (100%)... done! # (2/3) Converting to NDJSON (estimate: 0.05 s)... # (3/3) Importing records into database... # = Imported or updated 9 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 9 # See how many trials are in CTIS publicly accessible: ctrLoadQueryIntoDb( queryterm = \"\", register = \"CTIS\", only.count = TRUE, con = db ) # $n # [1] 4194 # Retrieve trials from another register: ctrLoadQueryIntoDb( queryterm = paste0( 'https://euclinicaltrials.eu/ctis-public/search#', 'searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"}'), con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"neonates\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trials list, found 7 trials # (2/4) Downloading and processing trial data... (estimate: 0.6 Mb) # Download status: 7 done; 0 in progress. Total size: 262.58 Kb (100%)... done! # (3/4) Importing records into database... # (4/4) Updating with additional data: . # = Imported 7, updated 7 record(s) on 7 trial(s) # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 7 allFields <- dbFindFields(\".*\", db, sample = TRUE) # Finding fields in database collection (sampling 5 trial records per register) . . . . . . . . # Field names cached for this session. length(allFields[grepl(\"CTIS\", names(allFields))]) # [1] 618 # root field names in CTIS ctisFields <- allFields[grepl(\"CTIS\", names(allFields))] ctisFields[!grepl(\"[.]\", ctisFields)] # CTIS CTIS CTIS CTIS # \"ageGroup\" \"authorizedApplication\" \"correctiveMeasures\" \"ctNumber\" # CTIS CTIS CTIS CTIS # \"ctPublicStatus\" \"ctPublicStatusCode\" \"ctrname\" \"ctStatus\" # CTIS CTIS CTIS CTIS # \"decisionDate\" \"decisionDateOverall\" \"documents\" \"events\" # CTIS CTIS CTIS CTIS # \"gender\" \"lastUpdated\" \"publishDate\" \"record_last_import\" # CTIS CTIS CTIS CTIS # \"recruitmentStatus\" \"results\" \"resultsFirstReceived\" \"sponsorType\" # CTIS CTIS CTIS CTIS # \"startDateEU\" \"therapeuticAreas\" \"totalNumberEnrolled\" \"trialCountries\" # CTIS CTIS # \"trialPhase\" \"trialRegion\" # use an alternative to dbGetFieldsIntoDf() allData <- nodbi::docdb_query(src = db, key = db$collection, query = '{\"ctrname\":\"CTIS\"}') # names of top-level data items sort(names(allData)) # [1] \"_id\" \"ageGroup\" \"authorizedApplication\" \"correctiveMeasures\" # [5] \"ctNumber\" \"ctPublicStatus\" \"ctPublicStatusCode\" \"ctrname\" # [9] \"ctStatus\" \"decisionDate\" \"decisionDateOverall\" \"documents\" # [13] \"events\" \"gender\" \"lastUpdated\" \"publishDate\" # [17] \"record_last_import\" \"recruitmentStatus\" \"results\" \"resultsFirstReceived\" # [21] \"sponsorType\" \"startDateEU\" \"therapeuticAreas\" \"totalNumberEnrolled\" # [25] \"trialCountries\" \"trialPhase\" \"trialRegion\" # use yet another alternative oneTrial <- DBI::dbGetQuery( db$con, paste0( \"SELECT json(json) FROM \", db$collection, \" WHERE jsonb_extract(json, '$.ctrname') == 'CTIS'\", \" LIMIT 1;\")) # display full json tree # remotes::install_github(\"hrbrmstr/jsonview\") if (require(jsonview)) json_tree_view(oneTrial[[1]]) # total size of object format(object.size(allData), \"MB\") # [1] \"1.4 Mb\" # use helper library library(dplyr) library(magrittr) library(tibble) library(purrr) library(tidyr) # get names of all fields / variables in the collaction length(dbFindFields(\".*\", con = db)) # [1] 1667 dbFindFields(\"start.*date|date.*decision\", con = db) # Using cache of fields. # - Get trial data result <- dbGetFieldsIntoDf( fields = c( \"ctrname\", \"record_last_import\", # CTGOV2 \"protocolSection.statusModule.startDateStruct.date\", \"protocolSection.statusModule.overallStatus\", # EUCTR \"n_date_of_competent_authority_decision\", \"trialInformation.recruitmentStartDate\", # needs above: 'euctrresults = TRUE' \"p_end_of_trial_status\", # ISRCTN \"trialDesign.overallStartDate\", \"trialDesign.overallEndDate\", # CTIS \"authorizedPartI.trialDetails.trialInformation.trialDuration.estimatedRecruitmentStartDate\", \"ctStatus\" ), con = db ) # - Deduplicate trials and obtain unique identifiers # for trials that have records in several registers # - Calculate trial start date # - Calculate simple status for ISRCTN # - Update end of trial status for EUCTR result %<>% filter(`_id` %in% dbFindIdsUniqueTrials(con = db)) %>% rowwise() %>% mutate(start = max(c_across(matches(\"(date.*decision)|(start.*date)\")), na.rm = TRUE)) %>% mutate(isrctnStatus = if_else(trialDesign.overallEndDate < record_last_import, \"Ongoing\", \"Completed\")) %>% mutate(p_end_of_trial_status = if_else( is.na(p_end_of_trial_status) & !is.na(n_date_of_competent_authority_decision), \"Ongoing\", p_end_of_trial_status)) %>% ungroup() # - Merge fields from different registers with re-leveling statusValues <- list( \"ongoing\" = c( # EUCTR \"Recruiting\", \"Active\", \"Ongoing\", \"Temporarily Halted\", \"Restarted\", # CTGOV \"Active, not recruiting\", \"Enrolling by invitation\", \"Not yet recruiting\", \"ACTIVE_NOT_RECRUITING\", # CTIS \"Ongoing, recruiting\", \"Ongoing, recruitment ended\", \"Ongoing, not yet recruiting\", \"Authorised, not started\" ), \"completed\" = c( \"Completed\", \"COMPLETED\", \"Ended\"), \"other\" = c( \"GB - no longer in EU/EEA\", \"Trial now transitioned\", \"Withdrawn\", \"Suspended\", \"No longer available\", \"Terminated\", \"TERMINATED\", \"Prematurely Ended\", \"Under evaluation\") ) result[[\"state\"]] <- dfMergeVariablesRelevel( df = result, colnames = c( \"p_end_of_trial_status\", \"protocolSection.statusModule.overallStatus\", \"ctStatus\", \"isrctnStatus\" ), levelslist = statusValues ) # - Plot example library(ggplot2) ggplot(result) + stat_ecdf(aes(x = start, colour = state)) + labs( title = \"Evolution over time of a set of trials\", subtitle = \"Data from EUCTR, CTIS, ISRCTN, CTGOV2\", x = \"Date of start (proposed or realised)\", y = \"Cumulative proportion of trials\", colour = \"Current status\", caption = Sys.Date() ) ggsave( filename = \"man/figures/README-ctrdata_across_registers.png\", width = 5, height = 3, units = \"in\" ) # Get all records that have values in any of the specified fields: result <- dbGetFieldsIntoDf( fields = c( # fields from CTGOV2 only \"resultsSection.baselineCharacteristicsModule.denoms.counts.value\", \"resultsSection.baselineCharacteristicsModule.denoms.units\", \"resultsSection.baselineCharacteristicsModule.groups.title\", \"protocolSection.armsInterventionsModule.armGroups.type\", \"protocolSection.designModule.designInfo.allocation\", \"protocolSection.contactsLocationsModule.locations.city\", \"protocolSection.conditionsModule.conditions\" ), con = db ) # Mangle to calculate: # - which columns with values for group counts are not labelled Total # - what are the numbers in each of the groups etc. result %<>% rowwise() %>% mutate( number_of_arms = stringi::stri_count_fixed( resultsSection.baselineCharacteristicsModule.groups.title, \" / \"), is_randomised = case_when( protocolSection.designModule.designInfo.allocation == \"RANDOMIZED\" ~ TRUE, protocolSection.designModule.designInfo.allocation == \"NON_RANDOMIZED\" ~ FALSE, number_of_arms == 1L ~ FALSE, .default = FALSE ), which_not_total = list(which(strsplit( resultsSection.baselineCharacteristicsModule.groups.title, \" / \")[[1]] != \"Total\")), num_sites = length(strsplit(protocolSection.contactsLocationsModule.locations.city, \" / \")[[1]]), num_participants = sum(as.integer( resultsSection.baselineCharacteristicsModule.denoms.counts.value[which_not_total])), num_arms_or_groups = max(number_of_arms, length(which_not_total)) ) # Inspect: View(result) # Example plot: library(ggplot2) ggplot(data = result) + labs( title = \"Trials including patients with a neuroblastoma\", subtitle = \"ClinicalTrials.Gov, trials with results\" ) + geom_point( mapping = aes( x = num_sites, y = num_participants, size = num_arms_or_groups, colour = is_randomised ) ) + scale_x_log10() + scale_y_log10() + labs( x = \"Number of sites\", y = \"Total number of participants\", colour = \"Randomised?\", size = \"# Arms / groups\", caption = Sys.Date() ) ggsave( filename = \"man/figures/README-ctrdata_results_neuroblastoma.png\", width = 5, height = 3, units = \"in\" ) ### EUCTR document files can be downloaded when results are requested # All files are downloaded and saved (documents.regexp is not used with EUCTR) ctrLoadQueryIntoDb( queryterm = \"query=cancer&age=under-18&phase=phase-one\", register = \"EUCTR\", euctrresults = TRUE, documents.path = \"./files-euctr/\", con = db ) # * Found search query from EUCTR: query=cancer&age=under-18&phase=phase-one # [...] # Created directory ./files-euctr/ # Downloading trials... # [...] # = Imported or updated results for 121 trials # = documents saved in './files-euctr' ### CTGOV files are downloaded, here corresponding to the default of # documents.regexp = \"prot|sample|statist|sap_|p1ar|p2ars|ctalett|lay|^[0-9]+ \" ctrLoadQueryIntoDb( queryterm = \"cond=Neuroblastoma&type=Intr&recrs=e&phase=1&u_prot=Y&u_sap=Y&u_icf=Y\", register = \"CTGOV\", documents.path = \"./files-ctgov/\", con = db ) # * Appears specific for CTGOV Classic website # Since 2024-06-25, the classic CTGOV servers are no longer available. Package # ctrdata has translated the classic CTGOV query URL from this call of function # ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current # CTGOV2. This is printed below and is also part of the return value of this function, # ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that # the fields and data schema of trials differ between CTGOV and CTGOV2. # # Replace this URL: # # https://classic.clinicaltrials.gov/ct2/results?cond=Neuroblastoma&type=Intr&recrs= # &phase=1&u_prot=Y&u_sap=Y&u_icf=Y # # with this URL: # # https://clinicaltrials.gov/search?cond=Neuroblastoma&aggFilters=phase:2, # docs:prot sap icf,studyType:int,status:com # # * Found search query from CTGOV2: cond=Neuroblastoma&aggFilters=phase:2, # docs:prot sap icf,studyType:int,status:com # * Checking trials using CTGOV REST API 2.0, found 26 trials # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-ctgov/ # - Created directory ./files-ctgov # - Creating subfolder for each trial # - Applying 'documents.regexp' to 34 documents # - Downloading 34 missing documents # Download status: 34 done; 0 in progress. Total size: 69.68 Mb (100%)... done! # = Newly saved 34 document(s) for 26 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-ctgov ### CTGOV2 files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = \"https://clinicaltrials.gov/search?cond=neuroblastoma&aggFilters=phase:1,results:with\", documents.path = \"./files-ctgov2/\", con = db ) # * Found search query from CTGOV2: cond=neuroblastoma&aggFilters=phase:1,results:with # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-ctgov2/ # - Created directory ./files-ctgov2 # - Creating subfolder for each trial # - Applying 'documents.regexp' to 35 documents # - Downloading 35 missing documents # Download status: 35 done; 0 in progress. Total size: 76.64 Mb (100%)... done! # = Newly saved 35 document(s) for 22 trial(s); 0 document(s) for 0 trial(s) already # existed in ./files-ctgov2 ### ISRCTN files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = \"https://www.isrctn.com/search?q=alzheimer\", documents.path = \"./files-isrctn/\", con = db ) # * Found search query from ISRCTN: q=alzheimer # [...] # * Checking for documents... # - Getting links to documents # - Downloading documents into 'documents.path' = ./files-isrctn/ # - Created directory ./files-isrctn # - Creating subfolder for each trial # - Applying 'documents.regexp' to 41 documents # - Downloading 26 missing documents # Download status: 26 done; 0 in progress. Total size: 12.83 Mb (100%)... done! # Download status: 2 done; 0 in progress. Total size: 6.56 Kb (100%)... done! # = Newly saved 24 document(s) for 12 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-isrctn ### CTIS files are downloaded, using the default of documents.regexp ctrLoadQueryIntoDb( queryterm = paste0( 'https://euclinicaltrials.eu/ctis-public/search#', 'searchCriteria={\"containAll\":\"\",\"containAny\":\"cancer\",\"containNot\":\"\"}'), documents.path = \"./files-ctis/\", con = db ) # * Found search query from CTIS: searchCriteria={\"containAll\":\"\",\"containAny\":\"cancer\",\"containNot\":\"\"} # * Checking trials in CTIS... # (1/4) Downloading trial list(s), found 1109 trials # (2/4) Downloading and processing trial data... (estimate: 100 Mb) # (3/4) Importing records into database... # (4/4) Updating with additional data: . # * Checking for documents... # - Downloading documents into 'documents.path' = ./files-ctis/ # - Created directory ./files-ctis # - Creating subfolder for each trial # - Applying 'documents.regexp' to 20 documents # - Downloading 13 missing documents # Download status: 13 done; 0 in progress. Total size: 8.07 Mb (100%)... done! # = Newly saved 13 document(s) for 4 trial(s); 0 document(s) for 0 trial(s) # already existed in ./files-ctis # = Imported 1109, updated 1109 record(s) on 1109 trial(s) # No history found in expected format. # Updated history (\"meta-info\" in \"some_collection_name\") # $n # [1] 1109"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"tests","dir":"","previous_headings":"","what":"Tests","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"See also https://app.codecov.io/gh/rfhb/ctrdata/tree/master/R","code":"tinytest::test_all() # test_ctrdata_ctrfindactivesubstance.R 4 tests OK 1.6s # test_ctrdata_duckdb_ctgov2.R.. 50 tests OK 2.4s # test_ctrdata_duckdb_ctis.R.... 172 tests OK 15.2s # test_ctrdata_mongo_local_ctgov.R 51 tests OK 57.7s # test_ctrdata_other_functions.R 64 tests OK 3.8s # test_ctrdata_postgres_ctgov2.R 50 tests OK 2.6s # test_ctrdata_sqlite_ctgov.R... 52 tests OK 56.0s # test_ctrdata_sqlite_ctgov2.R.. 50 tests OK 2.3s # test_ctrdata_sqlite_ctis.R.... 194 tests OK 12.5s # test_ctrdata_sqlite_euctr.R... 105 tests OK 1.3s # test_ctrdata_sqlite_isrctn.R.. 38 tests OK 21.4s # test_euctr_error_sample.R..... 8 tests OK 0.9s # All ok, 838 results (38m 48.8s) covr::package_coverage(path = \".\", type = \"tests\") # ctrdata Coverage: 93.68% # R/zzz.R: 80.95% # R/ctrRerunQuery.R: 89.16% # R/ctrLoadQueryIntoDbEuctr.R: 90.03% # R/utils.R: 90.89% # R/ctrLoadQueryIntoDbIsrctn.R: 92.11% # R/dbGetFieldsIntoDf.R: 93.06% # R/ctrLoadQueryIntoDbCtgov2.R: 94.05% # R/ctrLoadQueryIntoDb.R: 94.12% # R/ctrLoadQueryIntoDbCtis.R: 94.13% # R/ctrLoadQueryIntoDbCtgov.R: 95.04% # R/dbFindFields.R: 95.24% # R/ctrGetQueryUrl.R: 96.00% # R/ctrOpenSearchPagesInBrowser.R: 97.22% # R/dfMergeVariablesRelevel.R: 97.30% # R/dfTrials2Long.R: 97.35% # R/dbFindIdsUniqueTrials.R: 97.77% # R/dfName2Value.R: 98.61% # R/ctrFindActiveSubstanceSynonyms.R: 100.00% # R/dbQueryHistory.R: 100.00%"},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"future-features","dir":"","previous_headings":"","what":"Future features","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"See project outline https://github.com/users/rfhb/projects/1 Canonical definitions, filters, calculations works (since August 2023) data mangling analyses across registers, e.g. define study population, identify interventional trials, calculate study duration; public collaboration canonical scripts speed harmonising analyses. Merge results-related fields retrieved different registers, corresponding endpoints (work yet started). challenge incomplete congruency different structure data fields. Authentication, expected required CTGOV2; specifications yet known (work yet started). Explore registers ICTRP (authentication needed), JPRN, jRCT, UMIN-CTR, ChiCTR (exploration continually ongoing; added value, terms conditions programmatic access vary; clear roadmap established yet). Retrieve previous versions protocol- results-related information. challenges include, historic versions can retrieved one--one, include results, structured format. (functionality available version 1.17.2.9000 extent seems reasonably possible time, namely protocol-related information CTIS protocol- results-related information CTGOV2)","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Data providers curators clinical trial registers. Please review respect copyrights terms conditions, see ctrOpenSearchPagesInBrowser(copyright = TRUE). Package ctrdata made possible building work done R, clipr. curl, dplyr, duckdb, httr, jqr, jsonlite, lubridate, mongolite, nodbi, RPostgres, RSQLite, rvest, stringi xml2.","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"issues-and-notes","dir":"","previous_headings":"Acknowledgements","what":"Issues and notes","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Please file issues bugs . Also check handle closed issues, e.g. C stack usage close limit SSL certificate problem: unable get local issuer certificate Information trial registers may fully correct; see example publication CTGOV. attempts made harmonise field names registers (nevertheless, dfMergeVariablesRelevel() can used merge map several variables / fields one).","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"postgresql","dir":"","previous_headings":"Trial records’ JSON in databases","what":"PostgreSQL","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation PostgreSQL","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"mongodb","dir":"","previous_headings":"Trial records’ JSON in databases","what":"MongoDB","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation MongoDB","code":""},{"path":"https://rfhb.github.io/ctrdata/index.html","id":"sqlite","dir":"","previous_headings":"Trial records’ JSON in databases","what":"SQLite","title":"Retrieve and Analyze Clinical Trials in Public Registers","text":"Example JSON representation SQLite","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and prepare nodbi connection object for ctrdata — ctrDb","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"Check prepare nodbi connection object ctrdata","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"","code":"ctrDb(con)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"con connection object, see section `Databases` ctrdata.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrDb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and prepare nodbi connection object for ctrdata — ctrDb","text":"Connection object list, collection element root","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":null,"dir":"Reference","previous_headings":"","what":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"active substance can identified recommended international nonproprietary name (INN), trade product name, company code(s). find likely synonyms, function retrieves CTGOV2 field protocolSection.armsInterventionsModule.interventions.otherNames. Note free error checked manually.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"","code":"ctrFindActiveSubstanceSynonyms(activesubstance = \"\", verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"activesubstance active substance, atomic character vector verbose Print number studies found CTGOV2 `activesubstance`","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"character vector active substance (input parameter) synonyms, NULL active substance found may invalid","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrFindActiveSubstanceSynonyms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find synonyms of an active substance — ctrFindActiveSubstanceSynonyms","text":"","code":"if (FALSE) { ctrFindActiveSubstanceSynonyms(activesubstance = \"imatinib\") # [1] \"imatinib\" \"Carcemia\" \"Cemivil\" # [4] \"CGP 57148\" \"CGP-57148B\" \"CGP57148B\" # [7] \"Gleevac\" \"gleevec\" \"Gleevec (Imatinib Mesylate)\" # [10] \"Glevec\" \"glivec\" \"Imatinib\" # [13] \"imatinib mesylate\" \"Imatinib-AFT\" \"IND # 55666\" # [16] \"NSC #716051\" \"NSC-716051\" \"QTI571\" # [19] \"ST1571\" \"STI 571\" \"STI-571\" # [22] \"STI571\" \"tyrosine kinase inhibitors\" }"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query details — ctrGetQueryUrl","title":"Get query details — ctrGetQueryUrl","text":"Extracts query parameters register name parameter `url` clipboard, URL register search copied.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query details — ctrGetQueryUrl","text":"","code":"ctrGetQueryUrl(url = \"\", register = \"\")"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query details — ctrGetQueryUrl","text":"url URL browser address bar. specified, clipboard contents checked suitable URL. automatically copying user's query register web browser clipboard, see . Can also contain query term dbQueryHistory()[\"query-term\"]. register Optional name register (one \"EUCTR\", \"CTGOV2\" \"ISRCTN\" \"CTIS\") case `url` query term full URL","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query details — ctrGetQueryUrl","text":"data frame (tibble, tibble loaded) column names `query-term` `query-register`. data frame (tibble) can passed parameter `query-term` ctrLoadQueryIntoDb parameter `url` ctrOpenSearchPagesInBrowser.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrGetQueryUrl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get query details — ctrGetQueryUrl","text":"","code":"# user copied into the clipboard the URL from # the address bar of the browser that shows results # from a query in one of the trial registers if (interactive()) try(ctrGetQueryUrl(), silent = TRUE) # extract query parameters from search result URL # (URL was cut for the purpose of formatting only) ctrGetQueryUrl( url = paste0( \"https://classic.clinicaltrials.gov/ct2/results?\", \"cond=&term=AREA%5BMaximumAge%5D+RANGE%5B0+days%2C+28+days%5D\", \"&type=Intr&rslt=&age_v=&gndr=&intr=Drugs%2C+Investigational\", \"&titles=&outc=&spons=&lead=&id=&cntry=&state=&city=&dist=\", \"&locn=&phase=2&rsub=&strd_s=01%2F01%2F2015&strd_e=01%2F01%2F2016\", \"&prcd_s=&prcd_e=&sfpd_s=&sfpd_e=&rfpd_s=&rfpd_e=&lupd_s=&lupd_e=&sort=\" ) ) #> * Appears specific for CTGOV Classic website #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=AREA%5BMaximumAge%5D+RANGE%5B0+days%2C+28+days%5D&type=Intr&intr=Drugs%2C+Investigational&phase=2&strd_s=01%2F01%2F2015&strd_e=01%2F01%2F2016 #> #> with this URL: #> #> https://clinicaltrials.gov/search?start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> * Found search query from CTGOV2: start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> query-term #> 1 start=2015-01-01_2016-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int #> query-register #> 1 CTGOV2 ctrGetQueryUrl(\"https://www.clinicaltrialsregister.eu/ctr-search/trial/2007-000371-42/results\") #> * Found search query from EUCTR: query=2007-000371-42 #> query-term query-register #> 1 query=2007-000371-42 EUCTR ctrGetQueryUrl(\"https://euclinicaltrials.eu/ctis-public/view/2022-500041-24-00\") #> * Found search query from CTIS: searchCriteria={\"containAll\":\"2022-500041-24-00\",\"containAny\":\"\",\"containNot\":\"\"} #> query-term #> 1 searchCriteria={\"containAll\":\"2022-500041-24-00\",\"containAny\":\"\",\"containNot\":\"\"} #> query-register #> 1 CTIS ctrGetQueryUrl(\"https://classic.clinicaltrials.gov/ct2/show/NCT01492673?cond=neuroblastoma\") #> * Appears specific for CTGOV Classic website #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click 'Return to List' in browser and use this as 'url'. #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=NCT01492673 #> #> with this URL: #> #> https://clinicaltrials.gov/search?term=NCT01492673 #> * Found search query from CTGOV2: term=NCT01492673 #> query-term query-register #> 1 term=NCT01492673 CTGOV2 ctrGetQueryUrl(\"https://clinicaltrials.gov/ct2/show/NCT01492673?cond=neuroblastoma\") #> * Appears specific for CTGOV Classic website #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click 'Return to List' in browser and use this as 'url'. #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> https://classic.clinicaltrials.gov/ct2/results?term=NCT01492673 #> #> with this URL: #> #> https://clinicaltrials.gov/search?term=NCT01492673 #> * Found search query from CTGOV2: term=NCT01492673 #> query-term query-register #> 1 term=NCT01492673 CTGOV2 ctrGetQueryUrl(\"https://clinicaltrials.gov/study/NCT01467986?aggFilters=ages:child\") #> * Appears specific for CTGOV REST API 2.0 #> * Note: 'url' shows a single trial (and is returned by the function) but also had search parameters: If interested in search results, click on 'Search Results' in browser and use this as 'url'. #> * Found search query from CTGOV2: id=NCT01467986 #> query-term query-register #> 1 id=NCT01467986 CTGOV2 ctrGetQueryUrl(\"https://www.isrctn.com/ISRCTN70039829\") #> * Found search query from ISRCTN: q=ISRCTN70039829 #> query-term query-register #> 1 q=ISRCTN70039829 ISRCTN"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":null,"dir":"Reference","previous_headings":"","what":"Load and store register trial information — ctrLoadQueryIntoDb","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"Retrieves information clinical trials registers stores collection database. Main function ctrdata accessing registers. collection can store trial information different queries different registers. Query details stored collection can accessed using dbQueryHistory. previous query can re-run, replaces adds trial records keeping user annotations trial records.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"","code":"ctrLoadQueryIntoDb( queryterm = NULL, register = \"\", querytoupdate = NULL, forcetoupdate = FALSE, euctrresults = FALSE, euctrresultshistory = FALSE, ctgov2history = FALSE, documents.path = NULL, documents.regexp = \"prot|sample|statist|sap_|p1ar|p2ars|icf|ctalett|lay|^[0-9]+ \", annotation.text = \"\", annotation.mode = \"append\", only.count = FALSE, con = NULL, verbose = FALSE, ... )"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"queryterm Either string full URL search query register, data frame returned ctrGetQueryUrl dbQueryHistory functions, , together parameter register, string query elements search URL. query details recorded collection later use update records. \"CTIS\", queryterm can empty string obtain trial records. automatically copying user's query register web browser clipboard, see register String abbreviation register query, either \"EUCTR\", \"CTGOV2\", \"ISRCTN\" \"CTIS\". needed queryterm provides full URL query results. querytoupdate Either word \"last\", row number query data frame returned dbQueryHistory run retrieve new update trial records since query run last time. parameter takes precedence queryterm. \"EUCTR\", updates available last seven days; query run time passed since run last. work \"CTIS\" time. forcetoupdate TRUE, run query given querytoupdate, irrespective run last. Default FALSE. euctrresults TRUE, also download available results retrieving loading trials EUCTR. slows function. (\"CTGOV2\" \"CTIS\", available results always retrieved loaded collection.) euctrresultshistory TRUE, also download available history results publication \"EUCTR.\" quite time-consuming. Default FALSE. ctgov2history trials CTGOV2, retrieve historic versions record. Default FALSE, time-consuming operation. Use n n versions (recommended), 1 first (original) version, -1 last--one version, \"n:m\" nth mth versions, TRUE versions trial record retrieved. Note register CTIS, historic versions available `applications` field retrieved automatically. documents.path relative absolute path directory exists can created, save documents directly available register (\"EUCTR\", \"CTGOV2\", \"ISRCTN\", \"CTIS\") PDFs results, analysis plans, spreadsheets, patient information sheets, assessments product information. Default NULL, disables saving documents. documents.regexp Regular expression, case insensitive, select documents, saving documents requested (see documents.path). set NULL, empty placeholder files saved every document saved. Default \"prot|sample|statist|sap_|p1ar|p2ars|icf|ctalett|lay|^[0-9]+ \". Used \"CTGOV2\", \"ISRCTN\" \"CTIS\" (\"EUCTR\", available documents saved case). annotation.text Text including field \"annotation\" records retrieved query loaded collection. contents field \"annotation\" trial record preserved e.g. running function loading record annotation, see parameter annotation.mode. annotation.mode One \"append\" (default), \"prepend\" \"replace\" new annotation.text respect existing annotation records retrieved query loaded collection. .count Set TRUE return number trial records found register query. load trial information database. Default FALSE. con connection object, see section `Databases` ctrdata. verbose Printing additional information set TRUE; default FALSE. ... use (capture deprecated parameters).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"list elements `n` (number trial records newly imported updated), `success` (vector _id's successfully loaded records), `failed` (vector identifiers records failed load) `queryterm` (query term used). returned list several attributes (including database collection name, well query history database collection) facilitate documentation.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrLoadQueryIntoDb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load and store register trial information — ctrLoadQueryIntoDb","text":"","code":"if (FALSE) { dbc <- nodbi::src_sqlite(collection = \"my_collection\") # Retrieve protocol- and results-related information # on two specific trials identified by their EU number ctrLoadQueryIntoDb( queryterm = \"2005-001267-63+OR+2008-003606-33\", register = \"EUCTR\", euctrresults = TRUE, con = dbc ) # Count ongoing interventional cancer trials involving children # Note this query is a classical CTGOV query and is translated # to a corresponding query for the current CTGOV2 webinterface ctrLoadQueryIntoDb( queryterm = \"cond=cancer&recr=Open&type=Intr&age=0\", register = \"CTGOV\", only.count = TRUE, con = dbc ) # Retrieve all information on more than 40 trials # that are labelled as phase 3 and that mention # either neuroblastoma or lymphoma from ISRCTN, # into the same collection as used before ctrLoadQueryIntoDb( queryterm = paste0( \"https://www.isrctn.com/search?\", \"q=neuroblastoma+OR+lymphoma&filters=phase%3APhase+III\"), con = dbc ) # Retrieve information trials in CTIS mentioning neonates ctrLoadQueryIntoDb( queryterm = paste0(\"https://euclinicaltrials.eu/ctis-public/\", \"search#searchCriteria={%22containAll%22:%22%22,\", \"%22containAny%22:%22neonates%22,%22containNot%22:%22%22}\"), con = dbc ) }"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":null,"dir":"Reference","previous_headings":"","what":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"Open advanced search pages register(s), execute search browser","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"","code":"ctrOpenSearchPagesInBrowser(url = \"\", register = \"\", copyright = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"url search results page show browser. open browser previous search, output ctrGetQueryUrl dbQueryHistory can used. Can left empty string (default) open advanced search page register. register Register(s) open, \"EUCTR\", \"CTGOV2\", \"ISRCTN\" \"CTIS\". Default empty string, opens advanced search page register(s). copyright (Optional) set TRUE, opens copyright pages registers.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"(String) Full URL corresponding shortened url conjunction register , invisibly TRUE url specified.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrOpenSearchPagesInBrowser.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Open register to show query results or search page — ctrOpenSearchPagesInBrowser","text":"","code":"# Open all and check copyrights before using registers ctrOpenSearchPagesInBrowser(copyright = TRUE) # Open specific register advanced search page ctrOpenSearchPagesInBrowser(register = \"CTGOV2\") ctrOpenSearchPagesInBrowser(register = \"CTIS\") ctrOpenSearchPagesInBrowser(register = \"EUCTR\") ctrOpenSearchPagesInBrowser(register = \"ISRCTN\") # Open all queries that were loaded into demo collection dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbh <- dbQueryHistory( con = dbc ) for (r in seq_len(nrow(dbh))) { ctrOpenSearchPagesInBrowser(dbh[r, ]) } #> Since 2024-06-25, the classic CTGOV servers are no longer available. Package ctrdata has translated the classic CTGOV query URL from this call of function ctrLoadQueryIntoDb(queryterm = ...) into a query URL that works with the current CTGOV2. This is printed below and is also part of the return value of this function, ctrLoadQueryIntoDb(...)$url. This URL can be used with ctrdata functions. Note that the fields and data schema of trials differ between CTGOV and CTGOV2. #> #> Replace this URL: #> #> term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> #> with this URL: #> #> https://clinicaltrials.gov/search?start=2018-01-01_2020-01-01&term=AREA[MaximumAge] RANGE[0 days, 28 days]&intr=Drugs, Investigational&aggFilters=phase:3,studyType:int"},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":null,"dir":"Reference","previous_headings":"","what":"ctrdata: information on clinical trial registers — ctrdata-registers","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"Registers clinical trials protocol- result-related information can retrieved analysed package ctrdata, last updated 2024-06-23.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-overview","dir":"Reference","previous_headings":"","what":"1 - Overview","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"EUCTR: EU Clinical Trials Register contains close 44,000 clinical trials (least one investigational medicinal product, IMP; European Union beyond; new trials, results contained trials continue added) CTIS: EU Clinical Trials Information System started January 2023 new clinical trials. includes 4,100 publicly accessible trials. automatically get CTIS search query URL: CTGOV2: ClinicalTrials.gov includes close 500,000 interventional observational studies ISRCTN: ISRCTN Registry includes 25,000 interventional observational health studies","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-notable-changes","dir":"Reference","previous_headings":"","what":"2 - Notable changes","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"CTGOV retired 2024-06-25; ctrdata subsequently translates CTGOV queries CTGOV2 queries. new website (CTGOV2) can used ctrdata since 2023-08-27. CTIS relaunched 2024-06-17, changing data structure search syntax, ctrdata updated. CTIS can used ctrdata since 2023-03-25. information changes: ","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"-example-explanation-and-ctrdata-motivation","dir":"Reference","previous_headings":"","what":"4 - Example explanation and ctrdata motivation","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"*example expert search interventional trials primarily neonates, investigating infectious conditions. shows searches registers may sufficient identify sought trials: CTGOV2 search retrieves trials conducted exclusively neonates. EUCTR retrieves trials neonates, exclusively neonates. ISRCTN retrieves studies interventions medicines. CTIS retrieves trials mention words neonates infection. address , trials can retrieved ctrLoadQueryIntoDb database collection second step can selected, based values relevant fields retrieved trial information, example: EUCTR field f115_children_211years age criteria ISRCTN field interventions.intervention.interventionType type study CTIS fields ageGroup authorizedApplication.authorizedPartI.medicalConditions.medicalCondition ctrdata helps identifying fields function dbGetFieldsIntoDf.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata-registers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ctrdata: information on clinical trial registers — ctrdata-registers","text":"Ralf Herold ralf.herold@mailbox.org","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":null,"dir":"Reference","previous_headings":"","what":"ctrdata: get started, database connection, function overview — ctrdata","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"package aggregating analysing information clinical studies, obtaining documents, public registers","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-database-connection","dir":"Reference","previous_headings":"","what":"1 - Database connection","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"Package ctrdata retrieves trial information stores database collection, given connection object parameter con several ctrdata functions; connection object created almost identical ways supported backends: Use connection object ctrdata function, example dbQueryHistory, packages, example mongolite::mongo nodbi::docdb_query. Use demo database: dbc <- nodbi::src_sqlite(dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\")","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-operate-on-a-clinical-trial-register","dir":"Reference","previous_headings":"","what":"2 - Operate on a clinical trial register","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"ctrOpenSearchPagesInBrowser, ctrLoadQueryIntoDb (load trial records database collection); see ctrdata-registers details registers search.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-get-a-data-frame-from-the-database-collection","dir":"Reference","previous_headings":"","what":"3 - Get a data frame from the database collection","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"dbFindFields (find names fields interest trial records collection), dbGetFieldsIntoDf (create data frame fields interest collection), dbFindIdsUniqueTrials (get de-duplicated identifiers clinical trials' records can used subset data frame).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"-operate-on-a-data-frame-with-trial-information","dir":"Reference","previous_headings":"","what":"4 - Operate on a data frame with trial information","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"dfTrials2Long (convert fields nested elements long format), dfName2Value (get values variable(s) interest).","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/reference/ctrdata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ctrdata: get started, database connection, function overview — ctrdata","text":"Ralf Herold ralf.herold@mailbox.org","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of fields in the database collection — dbFindFields","title":"Find names of fields in the database collection — dbFindFields","text":"Given part name field interest user, function returns full field names used records previously loaded collection (using ctrLoadQueryIntoDb). names fields value collection can returned. Set sample = FALSE force screening records collection field names, see .","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of fields in the database collection — dbFindFields","text":"","code":"dbFindFields(namepart = \".*\", con, sample = TRUE, verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of fields in the database collection — dbFindFields","text":"namepart character string (can regular expression, including Perl-style) searched among field names (keys) collection, case-insensitive. default `\".*\"` lists fields. con connection object, see section `Databases` ctrdata. sample TRUE (default), uses sample 5 trial records per register identify fields, rapidly return possibly incomplete set field names. FALSE, uses trial records collection, take time trials ensures returns names fields collection. verbose TRUE, prints additional information (default FALSE).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of fields in the database collection — dbFindFields","text":"Vector strings full names field(s) found, ordered register alphabet, see examples. Names vector names register holding respective fields. field names can fed dbGetFieldsIntoDf extract data field(s) collection data frame.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find names of fields in the database collection — dbFindFields","text":"full names child fields returned dot notation (e.g., clinical_results.outcome_list.outcome.measure.class_list.class.title) addition, names parent fields (e.g., clinical_results) returned. Data parent fields typically complex (nested), see dfTrials2Long easily handling . field definitions registers, see \"Definition\" ctrdata-registers. Note: dbFindFields first called ctrLoadQueryIntoDb, take moment.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindFields.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of fields in the database collection — dbFindFields","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbFindFields(namepart = \"date\", con = dbc)[1:5] #> Finding fields in database collection #> (sampling 5 trial records per register) #> . #> . #> . #> . #> . #> . #> . #> . #> #> Field names cached for this session. #> EUCTR #> \"n_date_of_competent_authority_decision\" #> EUCTR #> \"n_date_of_ethics_committee_opinion\" #> EUCTR #> \"p_date_of_the_global_end_of_the_trial\" #> EUCTR #> \"trialChanges.globalAmendments.globalAmendment.date\" #> EUCTR #> \"trialInformation.analysisStageDate\" # view all 3350+ fields from all registers: allFields <- dbFindFields(con = dbc, sample = FALSE) #> Finding fields in database collection #> (may take some time) #> . #> . #> . #> . #> . #> #> Field names cached for this session. if (interactive()) View(data.frame( register = names(allFields), field = allFields))"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":null,"dir":"Reference","previous_headings":"","what":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"Records clinical trial can loaded one register collection. function returns deduplicated identifiers trials collection, respecting register(s) preferred user. registers recording identifiers also registers, used function provide vector identifiers deduplicated trials.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"","code":"dbFindIdsUniqueTrials( preferregister = c(\"EUCTR\", \"CTGOV\", \"CTGOV2\", \"ISRCTN\", \"CTIS\"), prefermemberstate = \"DE\", include3rdcountrytrials = TRUE, con, verbose = FALSE )"},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"preferregister vector order preference registers generate unique _id's, default c(\"EUCTR\", \"CTGOV\", \"CTGOV2\", \"ISRCTN\", \"CTIS\") prefermemberstate Code single EU Member State records returned. available, record DE lacking , random Member State's record trial returned. list codes EU Member States, please see vector countriesEUCTR. Specifying \"3RD\" return Third Country record trials, available. include3rdcountrytrials logical value trials retained conducted exclusively third countries, , outside European Union. Ignored prefermemberstate set \"3RD\". con connection object, see section `Databases` ctrdata. verbose TRUE, prints fields registers used find corresponding trial records","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"named vector strings keys (field \"_id\") records collection represent unique trials, names correspond register record.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"Note content records may differ registers (, \"EUCTR\", records different Member States). differences considered function.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbFindIdsUniqueTrials.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get identifiers of deduplicated trial records — dbFindIdsUniqueTrials","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbFindIdsUniqueTrials(con = dbc) #> Searching for duplicate trials... #> - Getting all trial identifiers... #> (may take some time)... #> , 29 found in collection #> - Finding duplicates among registers' and sponsor ids... #> - 2 EUCTR _id were not preferred EU Member State record for 8 trials #> - Keeping 3 / 8 / 5 / 8 / 3 records from EUCTR / CTGOV / CTGOV2 / ISRCTN / CTIS #> = Returning keys (_id) of 27 records in collection \"my_trials\" #> ISRCTN ISRCTN ISRCTN EUCTR #> \"12949496\" \"13281214\" \"17473621\" \"2012-003632-23-SE\" #> EUCTR EUCTR CTIS CTIS #> \"2014-002606-20-PT\" \"2014-003556-31-SE\" \"2022-501142-30-00\" \"2023-505613-24-00\" #> CTIS ISRCTN ISRCTN ISRCTN #> \"2024-510663-34-00\" \"20343063\" \"61070850\" \"76463425\" #> ISRCTN ISRCTN CTGOV2 CTGOV2 #> \"80181452\" \"88261002\" \"NCT00617929\" \"NCT01125800\" #> CTGOV2 CTGOV2 CTGOV2 CTGOV #> \"NCT01483820\" \"NCT01505608\" \"NCT01592045\" \"NCT02620761\" #> CTGOV CTGOV CTGOV CTGOV #> \"NCT03280147\" \"NCT03325439\" \"NCT03431558\" \"NCT03876704\" #> CTGOV CTGOV CTGOV #> \"NCT04001712\" \"NCT04041765\" \"NCT05969327\" #> attr(,\"ctrdata-dbname\") #> [1] \"/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/ctrdata/extdata/demo.sqlite\" #> attr(,\"ctrdata-table\") #> [1] \"my_trials\" #> attr(,\"ctrdata-dbqueryhistory\") #> query-timestamp query-register query-records #> 1 2024-05-16 14:05:23 EUCTR 5 #> 2 2024-05-16 14:06:43 CTGOV 8 #> 3 2024-05-16 14:07:32 ISRCTN 8 #> 4 2024-05-16 14:07:57 CTGOV2 5 #> 5 2024-06-23 16:14:56 CTIS 3 #> query-term #> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-28&dateTo=2015-03-31&status=completed #> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> 3 q=&filters=ageRange:Neonate,phase:Phase+III #> 4 distance=50&cond=neuroblastoma&aggFilters=phase:2,results:with&primComp=2014-01-01_2014-12-31 #> 5 searchCriteria={\"containAll\":\"infection\",\"containAny\":\"neonates\",\"containNot\":\"\"}"},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"Fields collection retrieved records data frame (tibble). Within given trial record, fields can hierarchical structured, , nested. Th function uses field names appropriately type values returns, harmonising original values (e.g. \"Information present EudraCT\" `NA`, \"Yes\" `TRUE`, \"false\" `FALSE`, date strings dates time differences, number strings numbers). function simplifies structure nested data may concatenate multiple strings field using \" / \" (see example) may widened returned data frame additional columns recursively expanded simply nested data (e.g., \"externalRefs\" columns \"externalRefs.doi\", \"externalRefs.eudraCTNumber\" etc.). alternative way handling complex nested data, see dfTrials2Long followed dfName2Value extracting sought variable(s).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"","code":"dbGetFieldsIntoDf(fields = \"\", con, verbose = FALSE, ...)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"fields Vector one strings, names sought fields. See function dbFindFields find names fields. Dot path notation (\"field.subfield\") without indices supported. compatibility `nodbi::src_postgres()` needed, specify fewer 50 fields, consider also using parent fields e.g., `\".b\"` instead `c(\".b.c.d\", \".b.c.e\")`, accessing sought fields dfTrials2Long followed dfName2Value R functions. con connection object, see section `Databases` ctrdata. verbose Printing additional information set TRUE; (default FALSE). ... use (captures deprecated parameter stopifnodata)","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"data frame (tibble, tibble loaded) columns corresponding sought fields. column records' `_id` always included. maximum number rows returned data frame equal , less number trial records database collection.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbGetFieldsIntoDf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create data frame of specified fields from database collection — dbGetFieldsIntoDf","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\") # get fields that are nested within another field # and can have multiple values with the nested field dbGetFieldsIntoDf( fields = \"b1_sponsor.b31_and_b32_status_of_the_sponsor\", con = dbc) #> _id b1_sponsor.b31_and_b32_status_of_the_sponsor #> 1 2012-003632-23-CZ Commercial #> 2 2012-003632-23-SE Commercial #> 5 2014-002606-20-PT Commercial #> 4 2014-003556-31-GB Commercial #> 3 2014-003556-31-SE Commercial # fields that are lists of string values are # returned by concatenating values with a slash dbGetFieldsIntoDf( fields = \"keyword\", con = dbc) #> _id #> 2 NCT03280147 #> 3 NCT03325439 #> 4 NCT03431558 #> 6 NCT04001712 #> 7 NCT04041765 #> keyword #> 2 Neonate / Sepsis / Antibiotics / Duration #> 3 Electroencephalographic neonatal seizures / Brivaracetam / Epilepsy / ENS / Newborns / Pharmacokinetic #> 4 Bovine Lactoferrin, Neonatal infection, Low Birth Weight #> 6 early caffeine preterm #> 7 IgM-enriched Intravenous Immunoglobulin"},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":null,"dir":"Reference","previous_headings":"","what":"Show history of queries loaded into a database collection — dbQueryHistory","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"Show history queries loaded database collection","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"","code":"dbQueryHistory(con, verbose = FALSE)"},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"con connection object, see section `Databases` ctrdata. verbose TRUE, prints additional information (default FALSE).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"data frame (tibble, tibble loaded) columns: `query-timestamp`, `query-register`, `query-records` (note: number records loaded last executing ctrLoadQueryIntoDb, total record number) `query-term`, one row time ctrLoadQueryIntoDb loaded trial records collection.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dbQueryHistory.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show history of queries loaded into a database collection — dbQueryHistory","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dbQueryHistory(con = dbc) #> query-timestamp query-register query-records #> 1 2024-05-16 14:05:23 EUCTR 5 #> 2 2024-05-16 14:06:43 CTGOV 8 #> 3 2024-05-16 14:07:32 ISRCTN 8 #> 4 2024-05-16 14:07:57 CTGOV2 5 #> 5 2024-06-23 16:14:56 CTIS 3 #> query-term #> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-28&dateTo=2015-03-31&status=completed #> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2 #> 3 q=&filters=ageRange:Neonate,phase:Phase+III #> 4 distance=50&cond=neuroblastoma&aggFilters=phase:2,results:with&primComp=2014-01-01_2014-12-31 #> 5 searchCriteria={\"containAll\":\"infection\",\"containAny\":\"neonates\",\"containNot\":\"\"}"},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"Merge variables data frame returned dbGetFieldsIntoDf new variable, optionally also map values new levels.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"","code":"dfMergeVariablesRelevel(df = NULL, colnames = \"\", levelslist = NULL)"},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"df data.frame variables (columns) merged one vector. colnames vector names columns `df` hold variables merged, selection columns per select. levelslist names list one slice new value used vector old values (optional).","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"vector, type columns merged","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfMergeVariablesRelevel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge variables, keeping type, and optionally relevel factors — dfMergeVariablesRelevel","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) df <- dbGetFieldsIntoDf( fields = c(\"overall_status\", \"x5_trial_status\"), con = dbc ) statusvalues <- list( \"ongoing\" = c(\"Recruiting\", \"Active\", \"Ongoing\"), \"completed\" = c(\"Completed\", \"Prematurely Ended\", \"Terminated\"), \"other\" = c(\"Withdrawn\", \"Suspended\", \"No longer available\") ) dfMergeVariablesRelevel( df = df, colnames = 'contains(\"status\")', levelslist = statusvalues ) #> Columns identified to be merged: overall_status, x5_trial_status #> [1] completed completed ongoing completed completed completed completed #> [8] completed completed #> Levels: ongoing completed other"},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":null,"dir":"Reference","previous_headings":"","what":"Get value for variable of interest — dfName2Value","title":"Get value for variable of interest — dfName2Value","text":"Get information variable interest (e.g., clinical endpoints) long data frame protocol- result-related trial information returned dfTrials2Long. Parameters `valuename`, `wherename` `wherevalue` matched using Perl regular expressions ignoring case.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get value for variable of interest — dfName2Value","text":"","code":"dfName2Value(df, valuename = \"\", wherename = \"\", wherevalue = \"\")"},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get value for variable of interest — dfName2Value","text":"df data frame (tibble) four columns (`_id`, `identifier`, `name`, `value`) returned dfTrials2Long valuename character string name field holds value variable interest (e.g., summary measure \"endPoints.*tendencyValue.value\") wherename (optional) character string identify variable interest among repeatedly occur trial record (e.g., \"endPoints.endPoint.title\") wherevalue (optional) character string value variable identified `wherename` (e.g., \"response\")","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get value for variable of interest — dfName2Value","text":"data frame (tibble, tibble loaded) includes values interest, columns `_id`, `identifier`, `name`, `value` `` (contents `wherevalue` found `wherename`). Contents `value` strings unless elements numbers. `identifier` generated function dfTrials2Long identify matching elements, e.g endpoint descriptions measurements.","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfName2Value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get value for variable of interest — dfName2Value","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\" ) dfwide <- dbGetFieldsIntoDf( fields = c( ## ctgov - typical results fields # \"clinical_results.baseline.analyzed_list.analyzed.count_list.count\", # \"clinical_results.baseline.group_list.group\", # \"clinical_results.baseline.analyzed_list.analyzed.units\", \"clinical_results.outcome_list.outcome\", \"study_design_info.allocation\", ## euctr - typical results fields # \"trialInformation.fullTitle\", # \"baselineCharacteristics.baselineReportingGroups.baselineReportingGroup\", # \"trialChanges.hasGlobalInterruptions\", # \"subjectAnalysisSets\", # \"adverseEvents.seriousAdverseEvents.seriousAdverseEvent\", \"endPoints.endPoint\", \"subjectDisposition.recruitmentDetails\" ), con = dbc ) dflong <- dfTrials2Long(df = dfwide) #> clinical_results.outcome_list.outcome #> study_design_info.allocation #> endPoints.endPoint #> subjectDisposition.recruitmentDetails #> #> . #> . #> . #> . #> . #> . #> . #> . #> #> Total 7096 rows, 79 unique names of variables ## get values for the endpoint 'response' dfName2Value( df = dflong, valuename = paste0( \"clinical_results.*measurement.value|\", \"clinical_results.*outcome.measure.units|\", \"endPoints.endPoint.*tendencyValue.value|\", \"endPoints.endPoint.unit\" ), wherename = paste0( \"clinical_results.*outcome.measure.title|\", \"endPoints.endPoint.title\" ), wherevalue = \"response\" ) #> Returning values for 2 out of 12 trials #> _id identifier #> 1 2012-003632-23-CZ 1 #> 2 2012-003632-23-CZ 1 #> 3 2012-003632-23-CZ 2 #> 4 2012-003632-23-CZ 6 #> 5 2012-003632-23-CZ 6.1 #> 6 2012-003632-23-CZ 6.2 #> 7 2012-003632-23-CZ 6.3 #> 8 2012-003632-23-CZ 6.4 #> 9 2012-003632-23-CZ 6.5 #> 10 2012-003632-23-CZ 8 #> 11 2012-003632-23-CZ 8 #> 12 2012-003632-23-SE 1 #> 13 2012-003632-23-SE 1 #> 14 2012-003632-23-SE 2 #> 15 2012-003632-23-SE 6 #> 16 2012-003632-23-SE 6.1 #> 17 2012-003632-23-SE 6.2 #> 18 2012-003632-23-SE 6.3 #> 19 2012-003632-23-SE 6.4 #> 20 2012-003632-23-SE 6.5 #> 21 2012-003632-23-SE 8 #> 22 2012-003632-23-SE 8 #> name #> 1 endPoints.endPoint.unit #> 2 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 3 endPoints.endPoint.unit #> 4 endPoints.endPoint.unit #> 5 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 6 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 7 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 8 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 9 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 10 endPoints.endPoint.unit #> 11 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 12 endPoints.endPoint.unit #> 13 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 14 endPoints.endPoint.unit #> 15 endPoints.endPoint.unit #> 16 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 17 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 18 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 19 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 20 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> 21 endPoints.endPoint.unit #> 22 endPoints.endPoint.subjectAnalysisSetReportingGroups.subjectAnalysisSetReportingGroup.tendencyValues.tendencyValue.value #> value where #> 1 Days Time to Overall Response #> 2 7.0 Time to Overall Response #> 3 At least 1 response (number) Durability of First Response #> 4 Overall Response Rate Overall Response #> 5 0.63 Overall Response #> 6 0 Overall Response #> 7 0.65 Overall Response #> 8 0.59 Overall Response #> 9 0.60 Overall Response #> 10 Percentage of treatment time Cumulative Duration of Response #> 11 78.6 Cumulative Duration of Response #> 12 Days Time to Overall Response #> 13 7.0 Time to Overall Response #> 14 At least 1 response (number) Durability of First Response #> 15 Overall Response Rate Overall Response #> 16 0.63 Overall Response #> 17 0 Overall Response #> 18 0.65 Overall Response #> 19 0.59 Overall Response #> 20 0.60 Overall Response #> 21 Percentage of treatment time Cumulative Duration of Response #> 22 78.6 Cumulative Duration of Response"},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert data frame with trial records into long format — dfTrials2Long","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"function works procotol- results- related information. converts lists values data frame returned dbGetFieldsIntoDf individual rows long data frame. resulting long data frame, values interest can selected using dfName2Value. function particularly useful fields complex content, node field \"clinical_results\" EUCTR, dbGetFieldsIntoDf returns multiply nested list function converts every observation every (leaf) field row .","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"","code":"dfTrials2Long(df)"},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"df Data frame (tibble) columns including trial identifier (_id) one variables obtained dbGetFieldsIntoDf","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"data frame (tibble, tibble loaded) four columns: `_id`, `identifier`, `name`, `value`","code":""},{"path":"https://rfhb.github.io/ctrdata/reference/dfTrials2Long.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert data frame with trial records into long format — dfTrials2Long","text":"","code":"dbc <- nodbi::src_sqlite( dbname = system.file(\"extdata\", \"demo.sqlite\", package = \"ctrdata\"), collection = \"my_trials\") dfwide <- dbGetFieldsIntoDf( fields = \"clinical_results.participant_flow\", con = dbc) dfTrials2Long(df = dfwide) #> clinical_results.participant_flow.recruitment_details #> clinical_results.participant_flow.pre_assignment_details #> clinical_results.participant_flow.group_list.group #> clinical_results.participant_flow.period_list.period.title #> clinical_results.participant_flow.period_list.period.milestone_list.milestone #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.title #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.group_id #> clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.count #> #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> . #> #> Total 43 rows, 12 unique names of variables #> _id identifier #> 1 NCT03325439 0 #> 2 NCT03325439 0 #> 3 NCT02620761 1 #> 4 NCT02620761 2 #> 5 NCT02620761 1 #> 6 NCT02620761 2 #> 7 NCT02620761 1 #> 8 NCT02620761 2 #> 9 NCT03325439 1 #> 10 NCT03325439 2 #> 11 NCT03325439 3 #> 12 NCT02620761 0 #> 13 NCT03325439 0 #> 14 NCT02620761 1 #> 15 NCT02620761 2 #> 16 NCT02620761 3 #> 17 NCT02620761 1.1 #> 18 NCT02620761 1.2 #> 19 NCT02620761 1.1 #> 20 NCT02620761 1.2 #> 21 NCT02620761 2.1 #> 22 NCT02620761 2.2 #> 23 NCT02620761 2.1 #> 24 NCT02620761 2.2 #> 25 NCT02620761 3.1 #> 26 NCT02620761 3.2 #> 27 NCT02620761 3.1 #> 28 NCT02620761 3.2 #> 29 NCT03325439 1 #> 30 NCT03325439 2 #> 31 NCT03325439 3 #> 32 NCT03325439 4 #> 33 NCT03325439 1 #> 34 NCT03325439 2 #> 35 NCT03325439 3 #> 36 NCT03325439 4 #> 37 NCT03325439 1 #> 38 NCT03325439 2 #> 39 NCT03325439 3 #> 40 NCT03325439 4 #> 41 NCT03325439 0 #> 42 NCT03325439 0 #> 43 NCT03325439 0 #> name #> 1 clinical_results.participant_flow.recruitment_details #> 2 clinical_results.participant_flow.pre_assignment_details #> 3 clinical_results.participant_flow.group_list.group.group_id #> 4 clinical_results.participant_flow.group_list.group.group_id #> 5 clinical_results.participant_flow.group_list.group.title #> 6 clinical_results.participant_flow.group_list.group.title #> 7 clinical_results.participant_flow.group_list.group.description #> 8 clinical_results.participant_flow.group_list.group.description #> 9 clinical_results.participant_flow.group_list.group.group_id #> 10 clinical_results.participant_flow.group_list.group.title #> 11 clinical_results.participant_flow.group_list.group.description #> 12 clinical_results.participant_flow.period_list.period.title #> 13 clinical_results.participant_flow.period_list.period.title #> 14 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 15 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 16 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 17 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 18 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 19 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 20 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 21 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 22 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 23 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 24 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 25 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 26 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 27 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 28 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 29 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 30 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 31 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 32 clinical_results.participant_flow.period_list.period.milestone_list.milestone.title #> 33 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 34 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 35 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 36 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.group_id #> 37 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 38 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 39 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 40 clinical_results.participant_flow.period_list.period.milestone_list.milestone.participants_list.participants.count #> 41 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.title #> 42 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.group_id #> 43 clinical_results.participant_flow.period_list.period.drop_withdraw_reason_list.drop_withdraw_reason.participants_list.participants.count #> value #> 1 The study started to enroll participants in May 2019 and concluded in May 2021. #> 2 No eligible study participants were enrolled in the Confirmatory Cohorts. The study stopped prematurely due to enrolment challenges, the termination was not linked to any safety issues. The Participant Flow refers to the All Subjects Screened. #> 3 P1 #> 4 P2 #> 5 Control #> 6 Fenoldopam #> 7 Infants in the Placebo arm will receive 0.9% sodium chloride (0.1 ml/hr). If, after 6 hrs there is not a clinically concerning decrease in blood pressure, as determined by attending physician, the rate of infusion (in this arm the placebo) will be increased to 0.2 ml/kg/hr. This rate will be continued throughout the remainder of the study.\\r0.9%NS: Randomized to receive Fenoldopam or 0.9%NS #> 8 Infants in the experimental arm will receive fenoldopam (60 ug/ml; 0.1 ml/hr to provide 0.1ug/kg/min). If, after 6 hrs there is not a clinically concerning decrease in blood pressure, as determined by attending physician, the rate of infusion will be increased to 0.2 ml/kg/hr (0.2 ug/kg/min for infants receiving fenoldopam). This rate will be continued throughout the remainder of the study.\\rFenoldopam: Randomized to receive Fenoldopam or 0.9%NS #> 9 P1 #> 10 Exploratory Cohort #> 11 Participants in this arm received brivaracetam (BRV) 0.5 milligram per kilogram (mg/kg) administered as an intravenous (iv) solution for injection twice daily (bid) during the 48-hour Evaluation Period. An additional 3 doses of BRV (0.5 mg/kg) could have been administered every 12 hours for 48 hours (at the discretion of the Investigator). Treatment with antiepileptic drugs (AEDs) per standard of care (SToC) (first-line, second-line, or subsequent treatment) were continued in parallel with BRV treatment. #> 12 Overall Study #> 13 Overall Study #> 14 STARTED #> 15 COMPLETED #> 16 NOT COMPLETED #> 17 P1 #> 18 P2 #> 19 1 #> 20 0 #> 21 P1 #> 22 P2 #> 23 1 #> 24 0 #> 25 P1 #> 26 P2 #> 27 0 #> 28 0 #> 29 STARTED #> 30 Treated #> 31 COMPLETED #> 32 NOT COMPLETED #> 33 P1 #> 34 P1 #> 35 P1 #> 36 P1 #> 37 9 #> 38 6 #> 39 6 #> 40 3 #> 41 Ineligibility #> 42 P1 #> 43 3"},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-changes-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Possibly breaking changes","title":"ctrdata 1.18.0.9000","text":"CTGOV retired 2024-06-25 classic website API used ctrdata since 2015. support users, ctrdata now automatically translates redirects queries current website. helps automatically updating previously loaded queries (ctrLoadQueryIntoDb(querytoupdate = )), manually migrating queries reproducible work clinical trials information. new functionality ctrdata translates user’s search query URL classic website query current CTGOV website, search parameters. Since structure format data differs data retrieved current API previously retrieved classic API, ctrdata continue identify current API register = \"CTGOV2\", support analysis stage. CTIS relaunched 2024-06-17, ctrdata fully updated . moment, CTIS provides basic searches search query URL. support users, ctrdata includes updated script extract user’s search parameters clipboard browser URL bar, searches trials opening query URL, see https://rfhb.github.io/ctrdata/#id_2-script--automatically-copy-users-query--web-browser.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.18.0.9000","text":"Reduced size demo database package, addressing CRAN notes Adapted ctrFindActiveSubstanceSynonyms() CTGOV2 API, note: curated terms used studies returned Updated register information, adding caveats issues Updated estimated download sizes, added typing new fields CTIS Avoided duplicate data file retrievals Split utils.R files functions fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-18-0-9000","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.18.0.9000","text":"Correct partial date brackets CTGOV2 Disable HTTP/2 multiplexing CTIS","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1180-2024-05-13","dir":"Changelog","previous_headings":"","what":"ctrdata 1.18.0 (2024-05-13)","title":"ctrdata 1.18.0 (2024-05-13)","text":"CRAN release: 2024-05-13","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-change-1-18-0","dir":"Changelog","previous_headings":"","what":"Possibly breaking change","title":"ctrdata 1.18.0 (2024-05-13)","text":"File names documents downloaded CTIS now include document type use different separators (e.g., “parts2auth - SbjctInfaICF - …” abbreviation “Subject information informed consent form (publication)”, previously “parts2auth_…”)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-18-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.18.0 (2024-05-13)","text":"Add retrieval historic versions trial records CTGOV2 (automatically retrieved CTIS, available registers) Added typing newly appearing fields CTIS Increase testing coverage 93.7% locally Added missing CI combination DuckDB CTGOV2","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-18-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.18.0 (2024-05-13)","text":"Correct typing certain fields (lists ) integers Handle marginal case dbGetFieldsIntoDf() Changed unlink intermediate files Minor vignettes corrections","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1172-2024-02-25","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.2 (2024-02-25)","title":"ctrdata 1.17.2 (2024-02-25)","text":"CRAN release: 2024-02-25","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.2 (2024-02-25)","text":"Switch sequence API endpoints used CTIS Correct handling multiple public events CTIS Re-use CTIS downloads given session","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1171-2024-02-05","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.1 (2024-02-05)","title":"ctrdata 1.17.1 (2024-02-05)","text":"CRAN release: 2024-02-04","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-17-1","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.17.1 (2024-02-05)","text":"Additional CTIS field types possibly documents (associated clinical trials) Use ctId instead id CTIS top-level field (synonym used API clinicalTrialId)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.1 (2024-02-05)","text":"Added handling unexpected Unicode protocol-related data one trial EUCTR Improved predicted download sizes times EUCTR Return message CTIS query result trials","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1170-2024-01-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.17.0 (2024-01-22)","title":"ctrdata 1.17.0 (2024-01-22)","text":"CRAN release: 2024-01-22","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"possibly-breaking-changes-1-17-0","dir":"Changelog","previous_headings":"","what":"Possibly breaking changes","title":"ctrdata 1.17.0 (2024-01-22)","text":"Reimplemented dbGetFieldsIntoDf() accelerate predictable, simplified returns, particular nested fields; also attempts recursively expand simply nested data additional columns returned data frame Reimplemented dbFindFields() accelerate; based improved nodbi::docdb_query() dbFindFields() now digests sample records quickly find fields, records sample = FALSE taking increasing time increasing number records using nodbi::scr_postgres(), parameter fields dbGetFieldsIntoDf() limited less 50 fields; message flags backend potential compatibility issues, suggesting use parent fields, e.g., .b instead c(\".b.c.d\", \".b.c.e\") Parameter stopifnodata dbGetFieldsIntoDf() needed deprecated Reimplemented typing fields speed simplify","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"improvements-1-17-0","dir":"Changelog","previous_headings":"","what":"Improvements","title":"ctrdata 1.17.0 (2024-01-22)","text":"Register data re-used downloaded interactive session (, temporary folder now re-used throughout user’s session) Temporary folder can set users options(ctrdata.tempdir = \"\") Inform MS Windows users cygwin found may chose delete Many fields added typing e.g. date dbGetFieldsIntoDf()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-17-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.17.0 (2024-01-22)","text":"Adapted corrected information loading newly available data CTIS Corrected escaping, back-conversion, characters JSON CTIS","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1160-2023-11-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.16.0 (2023-11-24)","title":"ctrdata 1.16.0 (2023-11-24)","text":"CRAN release: 2023-11-24","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"xml-files-are-converted-slightly-differently-1-16-0","dir":"Changelog","previous_headings":"Possibly breaking changes","what":"XML files are converted slightly differently","title":"ctrdata 1.16.0 (2023-11-24)","text":"EUCTR result-related information attributes: e.g. new: {\"id\":\"PostAssignmentPeriod-46349\"}, : {\"@attributes\":{\"id\":\"PostAssignmentPeriod-46349\"}} Consequently, work just delete @attributes field names dbGetFieldsIntoDf(\"clinical_results.baseline.analyzed_list.analyzed.count_list.count.@attributes.value\", db) EUCTR protocol-related information although differences found yet CTGOV attributes bare values remain included resulting NDJSON (e.g., records March 15, 2004<\/start_date>, converted {\"start_date\":\"March 15, 2004\"})","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"euctr-some-renaming-to-harmonise-eu-andrd-country-trial-fields-1-16-0","dir":"Changelog","previous_headings":"Possibly breaking changes","what":"EUCTR: some renaming to harmonise EU and 3rd country trial fields","title":"ctrdata 1.16.0 (2023-11-24)","text":"new: e83_single_site_trial, (EU trials): e83_the_trial_involves_single_site_in_the_member_state_concerned new: e83_single_site_trial, (3rd country trials): e83_will_this_trial_be_conducted_ at_a_single_site_globally new: e863_trial_sites_planned_in, (EU trials): e863_specify_the_regions_in_which_trial_sites_are_planned new: e863_trial_sites_planned_in, (3rd country trials): e863_specify_the_countries_outside_of_the_eea_in_which_trial_sites_are_planned new: e84_multiple_sites_in_member_state, (EU trials): e84_the_trial_involves_multiple_sites_in_the_member_state_concerned new: e840_multiple_sites_globally, (3rd country trials): e84_will_this_trial_be_conducted_at_multiple_sites_globally See also https://github.com/rfhb/ctrdata/issues/26#issuecomment-1749555081","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"bug-fixes-1-16-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"ctrdata 1.16.0 (2023-11-24)","text":"corrected batch iterations CTIS trials accommodating unclear totalSize response corrected translation fields browser URL API call CTGOV2 (closes https://github.com/rfhb/ctrdata/issues/32) corrected minimum curl version 5.1.0 (closes https://github.com/rfhb/ctrdata/issues/31) handled errors saving EUCTR results (e.g., long file path name, closes https://github.com/rfhb/ctrdata/issues/30 https://github.com/rfhb/ctrdata/issues/28)","code":""},{"path":[]},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"major-1-16-0","dir":"Changelog","previous_headings":"Improvements","what":"Major","title":"ctrdata 1.16.0 (2023-11-24)","text":"external tools required (Cygwin, perl, cat, sed, php functionality transforming text, XML NDJSON replaced Javascript using R package V8); addresses personally communicated concerns faciliates use package ctrdata environments (e.g., https://github.com/rfhb/ctrdata/issues/26); consequently, might breaking change analysing certain fields, see fields affected.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"other-1-16-0","dir":"Changelog","previous_headings":"Improvements","what":"Other","title":"ctrdata 1.16.0 (2023-11-24)","text":"added results summary download CTIS added documents download ISRCTN factored document download function ensure dbFindFields() returns fields EU 3rd country trials EUCTR (addresses https://github.com/rfhb/ctrdata/issues/26) changed order importing CTIS database, improved speed better checked data downloads, repeat necessary factored temporary folder creation added using options(ctrdata.tempdir = ...) set removed dfListExtractKey(), long deprecated removed dfMergeTwoVariablesRelevel(), long deprecated reorganised code file layout","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1152-2023-09-10","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.2 (2023-09-10)","title":"ctrdata 1.15.2 (2023-09-10)","text":"CRAN release: 2023-09-17 fix handling utf8 upstream multi-language strings CTIS correct creating lists downloading documents ctis adding missing endpoints CTIS found increasing amount data, e.g. publicevents.temporaryHaltList.details 2022-501559-99-00","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1151-2023-08-29","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.1 (2023-08-29)","title":"ctrdata 1.15.1 (2023-08-29)","text":"CRAN release: 2023-08-30 correct LaTeX documentation resulting CRAN error correct parts downloading CTIS, including file name sanitisation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1150-2023-08-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.15.0 (2023-08-27)","title":"ctrdata 1.15.0 (2023-08-27)","text":"CRAN release: 2023-08-27 added CTGOV REST API 2.0.0.-test new register identifier CTGOV2 handle CTGOV classic interface register CTGOV improved ctrdataURLcopier.js rewrite searches views CTIS mangle CTIS: change partIIInfo object array, adding new partIIIinfoKey '{\"partIIInfo\": \"\": {...}, \"\": {...}}' becomes '{\"partIIInfo\": [{\"partIIIinfoKey\": , ...}, {\"partIIIinfoKey\": , ...}]}') correct dbGetFieldsIntoDf() specific lists","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1140-2023-07-16","dir":"Changelog","previous_headings":"","what":"ctrdata 1.14.0 (2023-07-16)","title":"ctrdata 1.14.0 (2023-07-16)","text":"CRAN release: 2023-07-16 fix dbFindIdsUniqueTrials() single-record register contents expand number CTIS variables typed date dfMergeVariablesRelevel() superseeds dfMergeTwoVariablesRelevel()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1133-2023-06-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.3 (2023-06-24)","title":"ctrdata 1.13.3 (2023-06-24)","text":"CRAN release: 2023-06-24 typo dbFindFields() use CTGOV classic website (ctrdata adapted new website) correct missing names attributes return vector dbFindIdsUniqueTrials()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1132-2023-05-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.2 (2023-05-27)","title":"ctrdata 1.13.2 (2023-05-27)","text":"CRAN release: 2023-05-26 correct selection lists ids documents download CTIS reduce dependencies (rvest, dplyr removed)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1131-2023-05-07","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.1 (2023-05-07)","title":"ctrdata 1.13.1 (2023-05-07)","text":"CRAN release: 2023-05-07 load CTIS data (publicEvaluation) download documents integrate downloading documents ctrLoadQueryIntoDb() also CTGOV use documents.path CTGOV, EUCTR, CTIS; deprecated euctrresultsfilespath added documents.regexp select documents downloading based file name","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1130-2023-04-23","dir":"Changelog","previous_headings":"","what":"ctrdata 1.13.0 (2023-04-23)","title":"ctrdata 1.13.0 (2023-04-23)","text":"CRAN release: 2023-04-24 data CTIS imported completely adapt functions accommodate CTIS provide Tampermonkey script get URL user’s query register speed ctrLoadQueryIntoDb() CTIS nodbi >=0.9.2.9000 keep register names vector returned dbFindIdsUniqueTrials() correct dbFindFields() EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1121-2023-03-29","dir":"Changelog","previous_headings":"","what":"ctrdata 1.12.1 (2023-03-29)","title":"ctrdata 1.12.1 (2023-03-29)","text":"CRAN release: 2023-03-29 fix escaping hash symbol PDF rendition help page fix file encoding CTIS downloads MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1120-2023-03-25","dir":"Changelog","previous_headings":"","what":"ctrdata 1.12.0 (2023-03-25)","title":"ctrdata 1.12.0 (2023-03-25)","text":"CRAN release: 2023-03-26 added first access new register: CTIS, EU Clinical Trial Information System stop (instead warning) register host errors (e.g. incorrect number records) switch use curl::multi_download() can resume retrievals registers require curl >= 5.0","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1111-2022-11-20","dir":"Changelog","previous_headings":"","what":"ctrdata 1.11.1 (2022-11-20)","title":"ctrdata 1.11.1 (2022-11-20)","text":"CRAN release: 2022-11-20 cater short EUCTR results-related information show warning beta CTGOV website supported limit unit testing MongoDB SQLite return error ctrGetQueryUrl() query URL prevent re-using connections reduce http/2 layer errors update query history querytoupdate used new records found make ctrLoadQueryIntoDb() always return visible result correct dfTrials2Long() identifier (EUCTR top “1” across fields) correct non-ASCII characters","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1110-2022-11-02","dir":"Changelog","previous_headings":"","what":"ctrdata 1.11.0 (2022-11-02)","title":"ctrdata 1.11.0 (2022-11-02)","text":"CRAN release: 2022-11-02 now works DuckDB (>= v0.6.0) database backend, using nodbi (>= v0.9.0) reduced default number parallel connections EUCTR 10 4","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1102-2022-08-20","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.2 (2022-08-20)","title":"ctrdata 1.10.2 (2022-08-20)","text":"CRAN release: 2022-08-20 fix slow speed dfName2Value() fix remove row names dfName2Value() fix internal function handle tibble fix handling certain ISRCTN queries fix dbGetFieldsIntoDf() missing data fix timeouts methods package testing fix dbGetFieldsIntoDf() rare complex fields fix URL Rd file make examples runnable demo database include wherevalue dfName2Value() result","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1101-2022-07-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.1 (2022-07-24)","title":"ctrdata 1.10.1 (2022-07-24)","text":"CRAN release: 2022-07-24 fix documentation issues (https://stat.ethz.ch/pipermail/r-package-devel/2022q3/008240.html) fix unit test unused missing argument fix GitHub actions tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-1100-2022-07-01","dir":"Changelog","previous_headings":"","what":"ctrdata 1.10.0 (2022-07-01)","title":"ctrdata 1.10.0 (2022-07-01)","text":"CRAN release: 2022-07-06 ctrLoadQueryIntoDb() new parameter euctrresultsfilespath, deprecating euctrresultspdfpath ctrLoadQueryIntoDb() now also extracts saves results files PDF files ctrFindActiveSubstanceSynonyms() returns NULL non-existing active substance","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-191-2022-04-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.9.1 (2022-04-24)","title":"ctrdata 1.9.1 (2022-04-24)","text":"CRAN release: 2022-04-24 type e811… variables bugfix dbGetFieldsIntoDf bugfix annotations mix backends editorial update vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-190-2022-03-13","dir":"Changelog","previous_headings":"","what":"ctrdata 1.9.0 (2022-03-13)","title":"ctrdata 1.9.0 (2022-03-13)","text":"CRAN release: 2022-03-13 chunked trial batches ndjson files accelerated database import package dplyr loaded, functions return tibble instead data frame update correct documentation dbFindFields() returns vector fields now names register field occurs accelerated binary checks (cygwin / Windows) remove internet proxy mangling order use system configuration (e.g., transparent proxies used, environment variable https_proxy specified user) refactored internal caching correct dbGetFieldsIntoDf() specific nested data structures correct dfTrials2Long() specific fields correct dbFindIdsUniqueTrials() single trial register modify field typing decode HTML entities type fields difftime, e.g. min_age CTGOV speed parts dbGetFieldsIntoDf() simplify fields dbFindFields() returns names leaf node fields improve update documentation changed EU Member State default DE dbFindIdsUniqueTrials() corrected installCygwinWindowsDoInstall() properly update installation (remove –prune-install) test binaries installCygwinWindowsDoInstall() cache successful binary testing correct typing required_header.download_date improve numbering dfTrials2Long(), covering nested items thorough documentation improvement simplified dbFindFields() cleaned testing binaries cleaned helper scripts removed ctrGetQueryUrlFromBrowser(), long deprecated uses nodbi 0.6.0 can use PostgreSQL backend include PostgreSQL Github Actions","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-180-2021-11-18","dir":"Changelog","previous_headings":"","what":"ctrdata 1.8.0 (2021-11-18)","title":"ctrdata 1.8.0 (2021-11-18)","text":"CRAN release: 2021-11-21 changes match nodbi 0.5.0 simplifying database operations (user-visible functions: ctrLoadQueryIntoDb, dbFindIdsUniqueTrials, dbGetFieldsIntoDf), without changes API","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-171-2021-08-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.7.1 (2021-08-22)","title":"ctrdata 1.7.1 (2021-08-22)","text":"CRAN release: 2021-08-22 fix DBI needed Imports (CRAN Note) fix potential file name issue conversion script fix dbFindFields() never return _id (previously depended database backend) changed tests (CRAN detection, register availability, additional tests)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-170-2021-07-24","dir":"Changelog","previous_headings":"","what":"ctrdata 1.7.0 (2021-07-24)","title":"ctrdata 1.7.0 (2021-07-24)","text":"CRAN release: 2021-07-25 much reduced database backend-specific code, using nodbi 0.4.3 (released 2021-07-23) also introduces transactions sqlite using RSQLite >=2.2.4 (released 2021-03-12) temporary directory creation needed, automated deletion changes detecting non-functioning register servers streamlined unit testing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-160-2021-05-09","dir":"Changelog","previous_headings":"","what":"ctrdata 1.6.0 (2021-05-09)","title":"ctrdata 1.6.0 (2021-05-09)","text":"CRAN release: 2021-05-09 added support ISRCTN refactored checking binaries caching info updated EUCTR download parameters refactored ctrGetQueryUrl ctrOpenSearchPagesInBrowser harmonised error checking avoid errors external scripts refactored url / query mangling, added detailed testing refactored storing JSON database (handle big files, reduce memory) improved dbFindIdsUniqueTrials (speed, memory, register coverage) factored conversion JSON accelerated EUCTR results history download storage external scripts now create multiple chunks records use identifier fields dbFindIdsUniqueTrials adding user info field entries typed","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-153-2021-04-19","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.3 (2021-04-19)","title":"ctrdata 1.5.3 (2021-04-19)","text":"CRAN release: 2021-04-19 include message handle server certificate issues, propagating user settings httr curl operations ensure identical return structures new trials found dfTrials2Long: harmonise identifier level assignment, address cases field occurs input df dfMergeTwoVariablesRelevel: corrected improved user info dfName2Value: remove duplicate rows, e.g. duplicated criteria","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-152-2021-04-05","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.2 (2021-04-05)","title":"ctrdata 1.5.2 (2021-04-05)","text":"CRAN release: 2021-04-06 bugfix EOL converting EUCTR files","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-151-2021-03-21","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.1 (2021-03-21)","title":"ctrdata 1.5.1 (2021-03-21)","text":"CRAN release: 2021-03-21 bugfix non-matching euctr protocol result ids: trials EUCTR results downloaded version 1.5.0 downloaded (ctrLoadQueryIntoDb) dfTrials2Long refactored accelerated API change: dfTrials2Long return value (identifier replaces main_id sub_id) new option save EUCTR results PDF files user-specified directory","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-150-2021-03-14","dir":"Changelog","previous_headings":"","what":"ctrdata 1.5.0 (2021-03-14)","title":"ctrdata 1.5.0 (2021-03-14)","text":"CRAN release: 2021-03-16 return values dbGetFieldsIntoDf now mostly identical whether using src_mongo src_sqlite, best ensure portability analysis code permit dots queries / URLs improved handling queryterm renamed ctrGetQueryUrlFromBrowser ctrGetQueryUrl soft deprecated ctrGetQueryUrlFromBrowser ensure parallel retrievals EUCTR speed routines dbGetFieldsIntoDf make dfTrials2Long handle NA better improved documentation, clarified examples simplified internals typing fields, start typing results fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-141-2020-11-03","dir":"Changelog","previous_headings":"","what":"ctrdata 1.4.1 (2020-11-03)","title":"ctrdata 1.4.1 (2020-11-03)","text":"CRAN release: 2020-11-03 reset row names data frames returned functions update curl parameters accessing EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-14-2020-10-17","dir":"Changelog","previous_headings":"","what":"ctrdata 1.4 (2020-10-17)","title":"ctrdata 1.4 (2020-10-17)","text":"new: easy access variables dfTrials2Long() + dfName2Value() improved dfMergeTwoVariablesRelevel() maintain type data revised simplified vignettes deprecated: dfListExtractKey() refactored parts euctr retrieval notify user euctr register server permit compression long retrieval take fixed identifying unique ids","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-132-2020-10-03","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.2 (2020-10-03)","title":"ctrdata 1.3.2 (2020-10-03)","text":"CRAN release: 2020-10-05 quote system file paths","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-131-2020-08-01","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.1 (2020-08-01)","title":"ctrdata 1.3.1 (2020-08-01)","text":"CRAN release: 2020-08-02 fix error CI tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-130-2020-07-27","dir":"Changelog","previous_headings":"","what":"ctrdata 1.3.0 (2020-07-27)","title":"ctrdata 1.3.0 (2020-07-27)","text":"CRAN release: 2020-07-27 workaround EUCTR certificate issue streamline ctrGetQueryUrlFromBrowser() better handling complex fields include tests query string handling, checking parameters return values better clean-testing ctrLoadQueryIntoDb(querytorerun = …) now looks date querytorerun last run, often use euctr update options switching travis github action upped coverage code tested","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-121-2020-05-18","dir":"Changelog","previous_headings":"","what":"ctrdata 1.2.1 (2020-05-18)","title":"ctrdata 1.2.1 (2020-05-18)","text":"CRAN release: 2020-05-18 tinytest >= 1.2.1 avoid regression error correct testing detail","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-12-2019-12-07","dir":"Changelog","previous_headings":"","what":"ctrdata 1.2 (2019-12-07)","title":"ctrdata 1.2 (2019-12-07)","text":"CRAN release: 2019-12-08 correct cygwin install detail","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-11-2019-11-12","dir":"Changelog","previous_headings":"","what":"ctrdata 1.1 (2019-11-12)","title":"ctrdata 1.1 (2019-11-12)","text":"CRAN release: 2019-11-12 release nodbi 0.4 available update description installation github handled mixed arrays text values key ctgov trial records user information importing nesting added euctr trial records user verbose information extended record importing improved parsing euctr trial records correct re-opening sqlite connection","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-101-2019-10-22","dir":"Changelog","previous_headings":"","what":"ctrdata 1.0.1 (2019-10-22)","title":"ctrdata 1.0.1 (2019-10-22)","text":"CRAN release: 2019-10-23 correction testing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-10-2019-10-16","dir":"Changelog","previous_headings":"","what":"ctrdata 1.0 (2019-10-16)","title":"ctrdata 1.0 (2019-10-16)","text":"CRAN release: 2019-10-16 switch nodbi::scr_{mongo,sqlite}() re-implementation functions switch testthat tinytest, users can check tinytest::test_package(“ctrdata”) improvements euctr trial import new function dfListExtractKey speed testing bash commands windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0182-2019-04-30","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18.2 (2019-04-30)","title":"ctrdata 0.18.2 (2019-04-30)","text":"CRAN release: 2019-05-01 extended compatibility cygwin Windows find use cygw* windows refactored escaping bash command called windows corrected typing date fields","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0181-2019-04-14","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18.1 (2019-04-14)","title":"ctrdata 0.18.1 (2019-04-14)","text":"simplified cygwin install updated documentation corrected inconsistent handling query terms added automated proxy handling","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-018-2019-04-11","dir":"Changelog","previous_headings":"","what":"ctrdata 0.18 (2019-04-11)","title":"ctrdata 0.18 (2019-04-11)","text":"CRAN release: 2019-04-11 release version bug fixes field typing move use remote mongodb server updated vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-017-2019-03-27","dir":"Changelog","previous_headings":"","what":"ctrdata 0.17 (2019-03-27)","title":"ctrdata 0.17 (2019-03-27)","text":"improve dbFindFields() formatting added parameter force running query added typing (numeric fields) improve cygwin install attempts information removed dependency local mongodb installation (major rewrite) improved support remote mongodb servers (note changes host / db / uri parameters) Important: Added checking SSL certificates EUCTR EUCTR server sending required intermediate root certificates, thus failing curl httr, see https://www.digicert.com/help/?host=www.clinicaltrialsregister.eu fixed EUCTR results retrieval (curl return value order predictable) removed second time adding metadata one function streamlined user information progress feedback","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0143-2019-03-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.3 (2019-03-12)","title":"ctrdata 0.14.3 (2019-03-12)","text":"turned error message new trials found prevent failing tests new trials found rss feed","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0142-2019-03-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.2 (2019-03-07)","title":"ctrdata 0.14.2 (2019-03-07)","text":"harmonise user information","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0141-2019-03-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14.1 (2019-03-07)","title":"ctrdata 0.14.1 (2019-03-07)","text":"CRAN release: 2019-03-12 replaced RCurl (failed register servers) httr curl create README.md README.Rmd","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-014-2019-03-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.14 (2019-03-06)","title":"ctrdata 0.14 (2019-03-06)","text":"intention submit CRAN, therefore changing several warnings messages, improve testing tool chain applications","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0133-2019-03-03","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.3 (2019-03-03)","title":"ctrdata 0.13.3 (2019-03-03)","text":"prettified dbFindFields() removing count symbols (XX.) paths improve converting invalid XML EUCTR result files JSON","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0132-2019-02-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.2 (2019-02-28)","title":"ctrdata 0.13.2 (2019-02-28)","text":"made EUCTR retrieval robust added marginal case url single trial EUCTR extended timeout checking online status EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0131-2019-02-24","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13.1 (2019-02-24)","title":"ctrdata 0.13.1 (2019-02-24)","text":"added typing dates logical fields using dbGetFieldsIntoDf()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-013-2019-01-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.13 (2019-01-06)","title":"ctrdata 0.13 (2019-01-06)","text":"dbGetVariablesIntoDf() deprecated, use dbGetFieldsIntoDf() instead dbFindVariable() deprecated, use dbFindFields() instead dbMergeTwoVariablesRelevel() parameter varnames deprecated, use colnames instead","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0121-2018-12-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.12.1 (2018-12-15)","title":"ctrdata 0.12.1 (2018-12-15)","text":"added function ctrFindActiveSubstanceSynonyms() obtain synonyms active substance added user information number trials CTGOV downloaded, limit 5000 per query corrected import EUCTR details = FALSE","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-012-2018-05-19","dir":"Changelog","previous_headings":"","what":"ctrdata 0.12 (2018-05-19)","title":"ctrdata 0.12 (2018-05-19)","text":"added possibility add user’s annotations records retrieved query (new option annotate.text)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0112-2018-04-22","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11.2 (2018-04-22)","title":"ctrdata 0.11.2 (2018-04-22)","text":"changed queryterm processing","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0111-2018-04-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11.1 (2018-04-07)","title":"ctrdata 0.11.1 (2018-04-07)","text":"improved installFindMongoBinaries(), now better detect mongo binary locations use example cron scripts, may access user’s path information","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-011-2018-01-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.11 (2018-01-28)","title":"ctrdata 0.11 (2018-01-28)","text":"newly retrieved: EUCTR results history, new fields “firstreceived_results_date” “version_results_history” adding feature per issue #8","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0104-2017-12-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.4 (2017-12-28)","title":"ctrdata 0.10.4 (2017-12-28)","text":"note compatibility mongoDB versions fixing issue #8 simplified license","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0-10-4","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.3 (2017-11-24)","title":"ctrdata 0.10.4 (2017-12-28)","text":"changed custom-built “x5_trial_status” “p_end_of_trial_status” provided EUCTR","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0102-2017-11-22","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.2 (2017-11-22)","title":"ctrdata 0.10.2 (2017-11-22)","text":"editorial project updates","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0101-2017-07-30","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.1 (2017-07-30)","title":"ctrdata 0.10.1 (2017-07-30)","text":"now loading results euctr available xml","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0100-2017-07-25","dir":"Changelog","previous_headings":"","what":"ctrdata 0.10.0 (2017-07-25)","title":"ctrdata 0.10.0 (2017-07-25)","text":"fully load results ctgov prepare loading results euctr","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0914-2017-06-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.14 (2017-06-28)","title":"ctrdata 0.9.14 (2017-06-28)","text":"refactored system calls windows now part continuous integration","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0913-2017-06-23","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.13 (2017-06-23)","title":"ctrdata 0.9.13 (2017-06-23)","text":"refactored ctrLoadQueryIntoDb","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0912-2017-06-18","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.12 (2017-06-18)","title":"ctrdata 0.9.12 (2017-06-18)","text":"Preparing new CTGOV interface Improved documentation Corrected ctrGetQueryUrlFromBrowser return value","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09111-2017-02-04","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.11.1 (2017-02-04)","title":"ctrdata 0.9.11.1 (2017-02-04)","text":"Improved documentation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0911-2017-01-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.11 (2017-01-15)","title":"ctrdata 0.9.11 (2017-01-15)","text":"Added functionality: EUCTR fallback import mechanism large JSON file fails import mongoDB (splitting importing one JSON file trial, tested several thousand trials)","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09101-2017-01-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.10.1 (2017-01-12)","title":"ctrdata 0.9.10.1 (2017-01-12)","text":"Fixes issues conversion EUCTR records details. Fixes issue placebo information converted IMP fields.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09100-2016-12-28","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.10.0 (2016-12-28)","title":"ctrdata 0.9.10.0 (2016-12-28)","text":"Added metadata attributes returned objects indicate database, query, timestamp etc.","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0995-2016-12-14","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.5 (2016-12-14)","title":"ctrdata 0.9.9.5 (2016-12-14)","text":"Added option ctrLoadQueryIntoDb(querytoupdate = “last”) re-download last query collection","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0994-2016-11-18","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.4 (2016-11-18)","title":"ctrdata 0.9.9.4 (2016-11-18)","text":"Added progress indicator ctrLoadQueryIntoDb() indicate network download traffic","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0993-2016-11-17","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.3 (2016-11-17)","title":"ctrdata 0.9.9.3 (2016-11-17)","text":"deduplication dbFindIdsUniqueTrials() optimised speed memory, added check ISRCTN","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0992-2016-11-13","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.2 (2016-11-13)","title":"ctrdata 0.9.9.2 (2016-11-13)","text":"corrected deduplication dbFindIdsUniqueTrials()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-0991-2016-11-12","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9.9.1 (2016-11-12)","title":"ctrdata 0.9.9.1 (2016-11-12)","text":"renamed ctrQueryHistoryInDb() dbQueryHistory() note: change json format query history, breaking compatibility refactored concerned functions use mongolite rmongodb supported","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-09-2016-10-17","dir":"Changelog","previous_headings":"","what":"ctrdata 0.9 (2016-10-17)","title":"ctrdata 0.9 (2016-10-17)","text":"changed implementation dbFindIdsUniqueTrials() editorial changes examples","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-081-2016-09-07","dir":"Changelog","previous_headings":"","what":"ctrdata 0.8.1 (2016-09-07)","title":"ctrdata 0.8.1 (2016-09-07)","text":"added field indicate source register improved ctrLoadQueryIntoDb() details = FALSE added example map plotting","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-08-2016-09-04","dir":"Changelog","previous_headings":"","what":"ctrdata 0.8 (2016-09-04)","title":"ctrdata 0.8 (2016-09-04)","text":"dbFindIdsUniqueTrials now encapsulates dfFindIdsUniqueEuctrRecord dfFindIdsUniqueEuctrRecords removed installation instructions updated recently rmongodb removed CRAN","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-07-2016-05-29","dir":"Changelog","previous_headings":"","what":"ctrdata 0.7 (2016-05-29)","title":"ctrdata 0.7 (2016-05-29)","text":"dbGetVariablesIntoDf changed concatenate values array objects completed test adaptation travis improving perl regex checking helper applications","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-062-2016-04-20","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6.2 (2016-04-20)","title":"ctrdata 0.6.2 (2016-04-20)","text":"add / update field “record_last_import” every imported / updated record","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-061-2016-04-02","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6.1 (2016-04-02)","title":"ctrdata 0.6.1 (2016-04-02)","text":"changed provide vignettes","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-06-2016-02-25","dir":"Changelog","previous_headings":"","what":"ctrdata 0.6 (2016-02-25)","title":"ctrdata 0.6 (2016-02-25)","text":"different update mechanism EUCTR implemented corrected function name db… dfFindUniqueEuctrRecord()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-059-2016-01-23","dir":"Changelog","previous_headings":"","what":"ctrdata 0.5.9 (2016-01-23)","title":"ctrdata 0.5.9 (2016-01-23)","text":"Corrected bugs Started preparation submission CRAN Preparing include package unit tests","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-05-2015-11-29","dir":"Changelog","previous_headings":"","what":"ctrdata 0.5 (2015-11-29)","title":"ctrdata 0.5 (2015-11-29)","text":"Published github Improved documentation","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-04-2015-10-08","dir":"Changelog","previous_headings":"","what":"ctrdata 0.4 (2015-10-08)","title":"ctrdata 0.4 (2015-10-08)","text":"Renamed functions consistency ease--use","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-03-2015-10-06","dir":"Changelog","previous_headings":"","what":"ctrdata 0.3 (2015-10-06)","title":"ctrdata 0.3 (2015-10-06)","text":"Added functionality download xml data CTGOV, includes data csv format","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-028","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.8","title":"ctrdata 0.2.8","text":"Changed extended history queries included database. New function dbCTRQueryHistory()","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-027","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.7","title":"ctrdata 0.2.7","text":"Added function merging variables different registers optionally merge values new values Note function findCTRkey renamed dbFindCTRkey acts database","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-025","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.5","title":"ctrdata 0.2.5","text":"Added function selecting preferred language versions trials EUCTR Improved use automatic proxy configuration script","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-022","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2.2","title":"ctrdata 0.2.2","text":"Added proxy function improved installation cygwin MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-02-2015-09-19","dir":"Changelog","previous_headings":"","what":"ctrdata 0.2 (2015-09-19)","title":"ctrdata 0.2 (2015-09-19)","text":"Now also working MS Windows","code":""},{"path":"https://rfhb.github.io/ctrdata/news/index.html","id":"ctrdata-01-2015-09-15","dir":"Changelog","previous_headings":"","what":"ctrdata 0.1 (2015-09-15)","title":"ctrdata 0.1 (2015-09-15)","text":"First version basic functionality Limited testing Works Mac OS X (10.10.x)","code":""}]