File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/pages/studyView/resources Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,19 @@ class FilesLinksTableComponent extends LazyMobXTable<{
34
34
const RECORD_LIMIT = 500 ;
35
35
36
36
function getResourceDataOfEntireStudy ( studyIds : string [ ] ) {
37
- // Only handle the first studyId for now. Can be expanded to make a call per
38
- // studyId.
39
- const studyId = studyIds [ 0 ] ;
40
- const allResources = internalClient . getAllStudyResourceDataInStudyPatientSampleUsingGET (
41
- {
37
+ // Fetch resource data for each studyId, then return combined results
38
+ const allResources = studyIds . map ( studyId =>
39
+ internalClient . getAllStudyResourceDataInStudyPatientSampleUsingGET ( {
42
40
studyId : studyId ,
43
41
projection : 'DETAILED' ,
44
- }
42
+ } )
43
+ ) ;
44
+
45
+ return Promise . all ( allResources ) . then ( allResources =>
46
+ _ ( allResources )
47
+ . flatMap ( )
48
+ . value ( )
45
49
) ;
46
- return allResources ;
47
50
}
48
51
49
52
function getResourceDataOfPatients ( studyClinicalData : {
You can’t perform that action at this time.
0 commit comments