Skip to content

Commit

Permalink
Merge pull request #274 from KPMP/KPMP-5366_replace_tissue_type
Browse files Browse the repository at this point in the history
Kpmp 5366 replace tissue type
  • Loading branch information
rlreamy authored Nov 4, 2024
2 parents 67b29e5 + c6ec11c commit a6551c8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ const connector = new AppSearchAPIConnector({
const searchConfig = {
apiConnector: connector,
searchQuery: {
disjunctiveFacets: ["sex", "age", "redcapid", "tissuetype", "imagetype", "datatype", "configtype", "level", "releaseversion"],
disjunctiveFacets: ["sex", "age", "redcapid", "enrollmentcategory", "imagetype", "datatype", "configtype", "level", "releaseversion"],
facets: {
sex: { type: "value", size: 100},
age: { type: "value", size: 100},
redcapid: { type: "value", size: 500 },
tissuetype: { type: "value", size: 100},
enrollmentcategory: { type: "value", size: 100},
imagetype: { type: "value", size: 100},
datatype: { type: "value", size: 100 },
configtype: { type: "value", size: 100},
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpatialViewer/Facets/AllFacets.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AllFacets extends Component {
<AccordionBody accordionId="6">
<Row className="mb-2">
<Col>
<Facet field="tissuetype" label="" filterType="any" show="10" view={MultiCheckboxFacet}/>
<Facet field="enrollmentcategory" label="" filterType="any" show="10" view={MultiCheckboxFacet}/>
</Col>
</Row>
</AccordionBody>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpatialViewer/SpatialViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SpatialViewer extends Component {
<Col xs='8'>
<h5>
{`${this.props.selectedImageDataset["datatype"]}
for ${this.props.selectedImageDataset["tissuetype"]}
for ${this.props.selectedImageDataset["enrollmentcategory"]}
sample ${this.props.selectedImageDataset["spectracksampleid"]}
(participant `}
<button
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/ApolloClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const typePolicies = {
participantClinicalDataset: {
keyFields: [
"redcap_id",
"tissue_type",
"enrollment_category",
]
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/dataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const mapSummaryKeysToPresentationStyle = (data) => {
if (data['redcapId']) {
result['Participant ID'] = data['redcapId'] ? data['redcapId'] : "";
}
if (data['tissueType']) {
result['Enrollment Category'] = data['tissueType'] ? data['tissueType'] : "";
if (data['enrollmentCategory']) {
result['Enrollment Category'] = data['enrollmentCategory'] ? data['enrollmentCategory'] : "";
}
return result;
};
Expand Down
10 changes: 5 additions & 5 deletions src/helpers/dataHelper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ describe('dataHelper', () => {
it('should return remapped values when object params given', () => {
let summaryUnmapped = {
redcapId: "test-redcapId",
tissueType: "test-tissueType"
enrollmentCategory: "test-enrollmentCategory"
};
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "test-redcapId",
'Enrollment Category': "test-tissueType"
'Enrollment Category': "test-enrollmentCategory"
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
it('should return remapped values when some values from object params given', () => {
let summaryUnmapped = {
redcapId: "test-redcapId",
tissueType: ""
enrollmentCategory: ""
};
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
Expand All @@ -29,12 +29,12 @@ describe('dataHelper', () => {
it('should return remapped values when some values from object params given', () => {
let summaryUnmapped = {
redcapId: "",
tissueType: "test-tissueType"
enrollmentCategory: "test-enrollmentCategory"
};
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "",
'Enrollment Category': "test-tissueType"
'Enrollment Category': "test-enrollmentCategory"
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
Expand Down
4 changes: 2 additions & 2 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ th[title='Pixels Type'], th[title='Pixels Type'] + td {
max-width: 155px;
}

.tissue-type {
.enrollment-category {
min-width: 100px;
width: 100px;
max-width: 100px;
Expand Down Expand Up @@ -260,7 +260,7 @@ th[title='Pixels Type'], th[title='Pixels Type'] + td {
max-width: 200px;
}

.tissue-type {
.enrollment-category {
min-width: 100px;
width: 100px;
max-width: 100px;
Expand Down

0 comments on commit a6551c8

Please sign in to comment.