@@ -717,7 +717,6 @@ def create_file_manifest(request, cohort=None):
717717 storage_bucket = '%s_bucket' % loc
718718 instructions = ""
719719 from_cart = bool (req .get ('from_cart' , "False" ).lower () == "true" )
720- cartlvl = req .get ('debug' ,'studylvl' );
721720 single_series = bool (req .get ("single_series" , "False" ).lower () == "true" )
722721
723722 # Fields we need to fetch
@@ -803,7 +802,7 @@ def create_file_manifest(request, cohort=None):
803802
804803 # All downloads from this segment onwards are sync
805804 if from_cart :
806- items = cart_manifest (filtergrp_list , partitions , mxstudies , field_list , MAX_FILE_LIST_ENTRIES , cartlvl )
805+ items = cart_manifest (filtergrp_list , partitions , mxstudies , field_list , MAX_FILE_LIST_ENTRIES )
807806 else :
808807 items = filter_manifest (filters , sources , versions , field_list , MAX_FILE_LIST_ENTRIES , with_size = True , series_only = single_series )
809808 if 'docs' in items :
@@ -1873,10 +1872,6 @@ def get_cart_data_studylvl(filtergrp_list, partitions, limit, offset, length, mx
18731872
18741873 field_list = ['collection_id' , 'PatientID' , 'StudyInstanceUID' , 'SeriesInstanceUID' , 'Modality' , 'instance_size' ,
18751874 'crdc_series_uuid' , 'aws_bucket' , 'gcs_bucket' ] if with_records else None
1876- # Do not pull the bucket from the study, as this will be an aggregated value over the Series and might differ
1877- # for each series
1878- field_list_study = ['collection_id' , 'PatientID' , 'StudyInstanceUID' , 'SeriesInstanceUID' , 'Modality' , 'instance_size' ,
1879- 'crdc_series_uuid' ] if with_records else None
18801875 sortStr = "collection_id asc, PatientID asc, StudyInstanceUID asc" if with_records else None
18811876 totals = ['SeriesInstanceUID' , 'StudyInstanceUID' , 'PatientID' , 'collection_id' ]
18821877 custom_facets = {
@@ -2215,26 +2210,12 @@ def create_cart_sql(partitions, filtergrp_lst, storage_loc, lvl="series"):
22152210 return {'sql_string' : cart_sql , 'params' :params }
22162211
22172212
2218- def cart_manifest (filtergrp_list , partitions , mxstudies , field_list , MAX_FILE_LIST_ENTRIES , cartlvl ):
2213+ def cart_manifest (filtergrp_list , partitions , mxstudies , field_list , MAX_FILE_LIST_ENTRIES ):
22192214 manifest = {}
22202215 manifest ['docs' ] = []
2221- if (cartlvl == 'studylvl' ):
2222- solr_result = get_cart_data_studylvl (filtergrp_list , partitions , MAX_FILE_LIST_ENTRIES , 0 , mxstudies , MAX_FILE_LIST_ENTRIES , results_lvl = 'SeriesInstanceUID' )
2223- for row in solr_result ['docs' ]:
2224- crdc_series_arr = row ['crdc_series_uuid' ]
2225- for id in crdc_series_arr :
2226- manifest_row = {
2227- 'crdc_series_uuid' : id ,
2228- 'aws_bucket' : row ['aws_bucket' ],
2229- 'gcs_bucket' : row ['gcs_bucket' ]
2230- }
2231- for field in field_list :
2232- if field not in ['crdc_series_uuid' , 'aws_bucket' , 'gcs_bucket' ]:
2233- manifest_row [field ] = row [field ]
2234- manifest ['docs' ].append (manifest_row )
2235- else :
2236- solr_result = get_cart_data_serieslvl (filtergrp_list , partitions , field_list , MAX_FILE_LIST_ENTRIES ,0 )
2237- manifest ['docs' ] = solr_result ['docs' ]
2216+
2217+ solr_result = get_cart_data_serieslvl (filtergrp_list , partitions , field_list , MAX_FILE_LIST_ENTRIES ,0 )
2218+ manifest ['docs' ] = solr_result ['docs' ]
22382219
22392220 if 'total_SeriesInstanceUID' in solr_result :
22402221 manifest ['total' ] = solr_result ['total_SeriesInstanceUID' ]
0 commit comments