Skip to content

Commit

Permalink
fix submission of patient and sample ids
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman committed Jul 10, 2024
1 parent b14bcf0 commit c0196a9
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/pages/studyView/tabs/ClinicalDataTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,22 @@ export class ClinicalDataTab extends React.Component<

@computed
get clinicalDataSortAttributeId(): string | undefined {
return this.clinicalDataSortCriteria?.field
? this.props.store.clinicalAttributeDisplayNameToClinicalAttribute
.result![this.clinicalDataSortCriteria.field][
'clinicalAttributeId'
]
: undefined;
switch (this.clinicalDataSortCriteria?.field) {
// these first two are special cases where we are not filtering
// by an attribute
case 'Patient ID':
return 'patientId';
case 'Sample ID':
return 'sampleId';
default:
return this.clinicalDataSortCriteria?.field
? this.props.store
.clinicalAttributeDisplayNameToClinicalAttribute
.result![this.clinicalDataSortCriteria.field][
'clinicalAttributeId'
]
: undefined;
}
}

@computed
Expand All @@ -174,7 +184,6 @@ export class ClinicalDataTab extends React.Component<
if (this.props.store.selectedSamples.result.length === 0) {
return Promise.resolve({ totalItems: 0, data: [] });
}

const sampleClinicalData = await fetchClinicalDataForStudyViewClinicalDataTab(
this.props.store.filters,
this.props.store.sampleSetByKey.result!,
Expand Down

0 comments on commit c0196a9

Please sign in to comment.