Skip to content

Commit

Permalink
Merge pull request #55 from CanDIG/hotfix/page-size
Browse files Browse the repository at this point in the history
DIG-1803, DIG-1810: query fixes
  • Loading branch information
daisieh authored Oct 18, 2024
2 parents be3771b + ffdc3e9 commit 8cd3607
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions query_server/query_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ def query(treatment="", primary_site="", drug_name="", systemic_therapy_type="",
(systemic_therapy_type, "systemic_therapy_type"),
(exclude_cohorts, "exclude_cohorts")
]
params = {}
params = {
'page_size': PAGE_SIZE
}
for param in param_mapping:
if param[0] == "" or param[0] == []:
continue
Expand Down Expand Up @@ -430,7 +432,7 @@ def discovery_programs():
return fix_dicts(ret_val), 200

@app.route('/discovery/query')
def discovery_query(treatment="", primary_site="", systemic_therapy="", systemic_therapy_type="", chrom="", gene="", assembly="hg38", exclude_cohorts=[]):
def discovery_query(treatment="", primary_site="", drug_name="", chrom="", gene="", assembly="hg38", exclude_cohorts=[]):
url = f"{config.KATSU_URL}/v3/explorer/donors/"
headers = {}
for k in request.headers.keys():
Expand All @@ -440,11 +442,12 @@ def discovery_query(treatment="", primary_site="", systemic_therapy="", systemic
param_mapping = [
(treatment, "treatment_type"),
(primary_site, "primary_site"),
(systemic_therapy, "systemic_therapy_drug_name"),
(systemic_therapy_type, "systemic_therapy_type"),
(drug_name, "systemic_therapy_drug_name"),
(exclude_cohorts, "exclude_cohorts")
]
params = {}
params = {
"page_size": PAGE_SIZE
}
for param in param_mapping:
if param[0] == "" or param[0] == []:
continue
Expand Down

0 comments on commit 8cd3607

Please sign in to comment.