-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Clinical trials lookup function #52
Conversation
…ck for pediatric trials
|
||
for drug in terms: | ||
intr_url = f"&query.intr={drug}" | ||
full_uri = base_url + intr_url # TODO: + cond_url + term_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the story here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I wonder if we can reduce the size of the response with the fields
param in case there's anything that we aren't using
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://clinicaltrials.gov/data-api/api#:~:text=Studies-,Studies,-Returns%20data%20of
ClinicalTrials.gov api allows you to submit a bunch of different parameter types through the Studies API. For this implementation, I just had the Studies API as the base URL then wanted to leave room for constructing more specific queries if needed just by adding strings together basically. So intr_url corresponds to the query.intervention parameter, but I could also see a world where someone is also interested in supplying the query.condition parameter, or maybe just additional terms as a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, just have the intr_url working.
All this being said, if there is a better way to do this I am all open for it
) -> pd.DataFrame: # TODO: Better error handling for new_row?, use_pandas=False | ||
"""Perform a look up for clinical trials data for drug or drugs of interest | ||
|
||
:param terms: drug or drugs of interest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there any guarantees about what form a given term takes? are we hoping that the label provided by the normalizer is the term used by the trial? I just tried imatinib vs gleevec and I think they are both returning the same results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In its current state, yes just essentially hoping that the label the normalizer gives is the correct search term to use. I imagine whether or not it works on clinical trials end (i.e. imatinib vs gleevec) will be determined by how well the clinical trial entries themselves have been tagged/organized for the appropriate interventions? The imatinib and gleevec example I can see someone remembering to associate both of those names with any clinical trial just because its so well studied, but maybe this isn't always the case and maybe some aliases will differ in results.
|
||
for drug in terms: | ||
intr_url = f"&query.intr={drug}" | ||
full_uri = base_url + intr_url # TODO: + cond_url + term_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I wonder if we can reduce the size of the response with the fields
param in case there's anything that we aren't using
addresses #51
Grab clinical trials data for drugs of interest and return into nice dataframe.