-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTGOV2 API call does not filter by study sponsor #32
Comments
Thanks for reporting, nice catch! Fix now available:
As an aside, if not yet known and in case the tibble has no particular need, this also works:
|
Thanks, and also for pointing out the shorter syntax, it's working now. For some companies, I see however differences in the number of returned results between both registers: ctrLoadQueryIntoDb(
queryterm = "spons=Janssen",
register = "CTGOV",
only.count = TRUE
)$n
# 2352
ctrLoadQueryIntoDb(
queryterm = "spons=Janssen",
register = "CTGOV2",
only.count = TRUE
)$n
# 2347 But I don't know if that's because the new API accesses the data differently from the CTGOV database, or if it's an issue with |
Thanks - you find the same numbers when opening this search query in the browser like below. I have no explanation for this and can only speculate that in the backend, different matching processes take place. Try modifying the sponsor name in the browser and see different expansions offered. ctrOpenSearchPagesInBrowser(url = "spons=Janssen", register = "CTGOV")
ctrOpenSearchPagesInBrowser(url = "spons=Janssen", register = "CTGOV2") Nevertheless, it is straightforward to generate a list of the set difference, as follows: dbc <- nodbi::src_sqlite(collection = "temp")
ctgovTrials <- ctrLoadQueryIntoDb(queryterm = "spons=Janssen", register = "CTGOV", con = dbc)
ctgov2Trials <- ctrLoadQueryIntoDb(queryterm = "spons=Janssen", register = "CTGOV2", con = dbc)
trialsSet <- dbGetFieldsIntoDf(c("sponsors.lead_sponsor.agency", "brief_title"), con = dbc)
trialsSet[trialsSet[["_id"]] %in% setdiff(ctgovTrials[["success"]], ctgov2Trials[["success"]]), ] which returns
There you have it, possibly CTGOV uses a partial string match, and CTGOV2 matches differently, see e.g. here https://clinicaltrials.gov/data-about-studies/search-areas#SponsorSearch |
Thanks for the clarification. Btw, I get an error with the latest devel build and your example: dbc <- nodbi::src_sqlite(collection = "temp")
ctgovTrials <- ctrLoadQueryIntoDb(queryterm = "spons=Janssen", register = "CTGOV", con = dbc) gives
The call to Should I open a separate issue for that? |
Thanks. Could you please update R package |
Somewhat unrelated, but I'll leave it here for future reference. Edit: Actually unrelated to curl update. Not sure why, but I'm getting this sometimes. |
Indeed completely unrelated to |
Consider the following example. With the old API, the filter is respected, whereas with the new one, all studies would be downloaded.
The text was updated successfully, but these errors were encountered: