Git Product home page Git Product logo

Comments (9)

TWDGit avatar TWDGit commented on August 19, 2024 1

Thanks for checking into this, Ralf. l must have messed up a dependency somewhere. I force reinstalled the package from GitHub and completely rebooted my machine. That cleared out everything. All good now. Thanks, again.

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

Insert "classic." into search URLs, that is, change e.g.:

Then try the development version with these install steps; it should work with such URLs and with previously stored queries:

install.packages("devtools")

devtools::install_github("rfhb/ctrdata", build_vignettes = TRUE)

library(ctrdata)

q <- "https://classic.clinicaltrials.gov/ct2/results?cond=Neuroblastoma&term=&intr=Investigational+Agent"

dbc <- nodbi::src_sqlite(collection = "my_collection")

ctrLoadQueryIntoDb(q, con = dbc)

# * Found search query from CTGOV: cond=Neuroblastoma&intr=Investigational+Agent
# Checking helper binaries: . . . done
# (1/3) Checking trials in CTGOV:
# Retrieved overview, records of 272 trial(s) are to be downloaded (estimate: 2.2 MB)
# Download status: 1 done; 0 in progress. Total size: 1.85 Mb (100%)... done!             
# (2/3) Converting to JSON, 272 records converted
# (3/3) Importing JSON records into database...
# = Imported or updated 272 trial(s)                 
# No history found in expected format.
# Updated history ("meta-info" in "my_collection")
# $n
# [1] 272
# 
# $success
#  [1] "NCT00002825" "NCT00003119" "NCT00003191" "NCT00003234" "NCT00003425"

from ctrdata.

TWDGit avatar TWDGit commented on August 19, 2024

Confirmed. Tested 88 "results?spons=" queries and 23 "cond=xxxx&term=xxx" queries. Everything worked perfectly. Thanks for tackling this so quickly.

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

from ctrdata.

TWDGit avatar TWDGit commented on August 19, 2024

Ralf. I got the error below when trying the new package today. I tried tracing the process through the ctrGetQueryUrl function but could not find an issue. I assume you are already on this, but FYI. Thanks, as always, for your work with this package. It is a HUGE help.

ScreenURL <- paste0("https://classic.clinicaltrials.gov/ct2/results?spons=%22",CoStr,"%22")
ScreenURL
[1] "https://classic.clinicaltrials.gov/ct2/results?spons=%22ACADIA+Pharmaceuticals%22"
ResultsTable <- nodbi::src_sqlite(collection="Results")

Status <- try(ctrLoadQueryIntoDb(queryterm=ScreenURL, con=ResultsTable, verbose=FALSE))
Warning: ctrGetQueryUrl(): no clinical trial register search URL found in parameter 'url' or in clipboard.
Error : 'queryterm' does not seem to result from ctrQueryHistoryInDb() or ctrGetQueryUrl(): NULL

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

Thanks! Sorry, but I could not reproduce the error using the ScreenURL value that is above; here I found 42 records with this value using ctrLoadQueryIntoDb(ScreenURL, only.count = TRUE). Do these URLs have the search results you are interested in?

https://classic.clinicaltrials.gov/ct2/results?spons="ACADIA Pharmaceuticals"

https://classic.clinicaltrials.gov/ct2/results?spons=ACADIA+Pharmaceuticals

These work for me. For composing the string for parameter queryterm, no need to escape characters, it can be kept simple, e.g.

ScreenURL <- paste0('https://classic.clinicaltrials.gov/ct2/results?spons="', CoStr, '"')

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

Design considerations: create new ctrLoadQueryIntoDb() internal function for CTGOV API, using only JSON, based on experience with implementing this function for CTIS. Aspects for implementation:

Further questions:

  • Mapping of classic and new fields, for CTGOV or across registers, at least at top levels, targeting FHIR? (Consider recently refactored dfMergeVariables(), automated schema extraction, search for relevant mapping tools, review e.g. https://json-ld.org/ with https://www.w3.org/TR/json-ld-framing/, https://github.com/dvdln/jsonpath-object-transform)
  • Introduce an dbUpdate() function that iterates for identifiers and registers?
  • How to hand data for a trial having been loaded from both classic and new CTGOV?
  • Can ctrLoadQueryIntoDb() for EUCTR and ISRCTN also be changed to JSON?
  • Create roadmap in GitHub?

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

Check out the branch ctgov2023api for compatibility with CTGOV REST API 2.0.0-test and CTGOV Classic web interface. Install in R with

devtools::install_github(repo = "rfhb/ctrdata",  ref = "ctgov2023api", build_vignettes = TRUE)

Please report issues here.

from ctrdata.

rfhb avatar rfhb commented on August 19, 2024

Completed with release https://github.com/rfhb/ctrdata/releases/tag/v1.15.0

from ctrdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.