Skip to content

Commit

Permalink
Merge pull request #248 from KPMP/KPMP-5145_ChangeTerminology
Browse files Browse the repository at this point in the history
KPMP-5214: Chaning to enrollment category instead of tissue type or d…
  • Loading branch information
HaneenT authored Mar 14, 2024
2 parents 86e8a68 + b7e6cd8 commit 583e6a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/SpatialViewer/Facets/ParticipantFacet.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ParticipantFacet extends Component {
</AccordionItem>
<AccordionItem>
<AccordionHeader targetId="4">
Tissue Type
Enrollment Category
</AccordionHeader>
<AccordionBody accordionId="4">
<Row className="mb-2">
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/dataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ export const removeUUID = (text) => {
export const mapSummaryKeysToPresentationStyle = (data) => {
const result = {};
result['Participant ID'] = "";
result['Disease Type'] = "";
result['Enrollment Category'] = "";
if (!data || data === {}) {
return result;
}
if (data['redcapId']) {
result['Participant ID'] = data['redcapId'] ? data['redcapId'] : "";
}
if (data['tissueType']) {
result['Disease Type'] = data['tissueType'] ? data['tissueType'] : "";
result['Enrollment Category'] = data['tissueType'] ? data['tissueType'] : "";
}
return result;
};
Expand Down
12 changes: 6 additions & 6 deletions src/helpers/dataHelper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('dataHelper', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "test-redcapId",
'Disease Type': "test-tissueType"
' Enrollment Category': "test-tissueType"
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
Expand All @@ -22,7 +22,7 @@ describe('dataHelper', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "test-redcapId",
'Disease Type': ""
'Enrollment Category': ""
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
Expand All @@ -34,7 +34,7 @@ describe('dataHelper', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "",
'Disease Type': "test-tissueType"
'Enrollment Category': "test-tissueType"
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
Expand All @@ -43,7 +43,7 @@ describe('dataHelper', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "",
'Disease Type': ""
'Enrollment Category': ""
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
}),
Expand All @@ -52,15 +52,15 @@ describe('dataHelper', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle(summaryUnmapped);
let expectedSummaryMapping = {
'Participant ID': "",
'Disease Type': ""
'Enrollment Category': ""
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
});
it('should return empty values when no params given', () => {
let summaryMappingResult = mapSummaryKeysToPresentationStyle();
let expectedSummaryMapping = {
'Participant ID': "",
'Disease Type': ""
'Enrollment Category': ""
}
expect(summaryMappingResult).toEqual(expectedSummaryMapping);
});
Expand Down

0 comments on commit 583e6a3

Please sign in to comment.