Skip to content
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

Ensure pagination is functioning in get_clinical_trials() #86

Closed
mcannon068nw opened this issue Nov 25, 2024 · 0 comments · Fixed by #89
Closed

Ensure pagination is functioning in get_clinical_trials() #86

mcannon068nw opened this issue Nov 25, 2024 · 0 comments · Fixed by #89
Assignees
Labels
bug Something isn't working priority:medium Medium priority

Comments

@mcannon068nw
Copy link
Contributor

Describe the bug

dgipy.get_clinical_trials() retrieves a max of 10 results no matter the search term

Steps to reproduce

>>> 
>>> import dgipy
>>> import pandas as pd
>>> pd.DataFrame(dgipy.get_clinical_trials(['IMATINIB'])
... )
  search_term  ...                                      interventions
0    IMATINIB  ...  {'armGroups': [{'label': 'Gleevec', 'type': 'E...
1    IMATINIB  ...  {'armGroups': [{'label': 'Antineoplastic Drugs...
2    IMATINIB  ...  {'armGroups': [{'label': 'Arm', 'type': 'OTHER...
3    IMATINIB  ...  {'armGroups': [{'label': 'imatinib mesylate', ...
4    IMATINIB  ...  {'armGroups': [{'label': 'Treatment', 'type': ...
5    IMATINIB  ...  {'armGroups': [{'label': 'CML patients with MM...
6    IMATINIB  ...  {'armGroups': [{'label': 'sunitinib', 'type': ...
7    IMATINIB  ...  {'armGroups': [{'label': 'Intervention', 'type...
8    IMATINIB  ...  {'interventions': [{'type': 'DRUG', 'name': 'e...
9    IMATINIB  ...  {'armGroups': [{'label': '1', 'type': 'EXPERIM...

[10 rows x 9 columns]
>>> pd.DataFrame(dgipy.get_clinical_trials(['ASPIRIN']))
  search_term  ...                                      interventions
0     ASPIRIN  ...  {'armGroups': [{'label': 'Medical Management',...
1     ASPIRIN  ...  {'armGroups': [{'label': 'Cloas', 'type': 'EXP...
2     ASPIRIN  ...  {'armGroups': [{'label': 'Group 1- PREloading ...
3     ASPIRIN  ...  {'armGroups': [{'label': 'A', 'type': 'NO_INTE...
4     ASPIRIN  ...  {'armGroups': [{'label': '1', 'type': 'EXPERIM...
5     ASPIRIN  ...  {'armGroups': [{'label': '1, POLYCAP', 'type':...
6     ASPIRIN  ...  {'armGroups': [{'label': 'A : Alteplase', 'typ...
7     ASPIRIN  ...  {'interventions': [{'type': 'DRUG', 'name': 'A...
8     ASPIRIN  ...  {'armGroups': [{'label': 'SR-ASA', 'type': 'EX...
9     ASPIRIN  ...  {'armGroups': [{'label': 'platelet administere...

[10 rows x 9 columns]
>>> 


Expected behavior

I would expect a dataframe of variable size, with drastically more results for both of these drugs:
Screenshot 2024-11-25 at 9 38 07 AM

Current behavior

10 results were shown when there should be drastically more data, see above.

Acceptance Criteria

We can figure out how to filter / add options for sorting retrieved data, but for now acceptance would be if results reasonably match up with what we can grab from the UI at https://clinicaltrials.gov/search?intr=Imatinib

Possible reason(s)

No response

Suggested fix

No response

Branch, commit, and/or version

Main: b9ece06

Screenshots

No response

Environment details

Pyenv python 3.11, Mac Sonoma 14.3

Additional details

No response

Contribution

Yes, I can create a PR for this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants