Skip to content

Commit

Permalink
Merge branch 'develop' into feat/DEVSU-2094-rid-displayName-rapid
Browse files Browse the repository at this point in the history
  • Loading branch information
kttkjl authored Oct 20, 2023
2 parents a533add + 6a4b866 commit d5a8f75
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
3 changes: 3 additions & 0 deletions app/views/GermlineView/components/Report/columnDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ const columnDefs = [
hide: false,
},
{
headerName: 'dbSnpIds',
field: 'dbSnpIds',
hide: false,
},
{
headerName: 'clinvarIds',
field: 'clinvarIds',
minWidth: 80,
hide: false,
},
{
headerName: 'cosmicIds',
field: 'cosmicIds',
hide: false,
},
Expand Down
4 changes: 1 addition & 3 deletions app/views/GermlineView/components/Report/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import {
IconButton,
Menu,
MenuItem,
Button,
} from '@mui/material';
import { AgGridReact } from '@ag-grid-community/react';
import { ICellRendererParams } from '@ag-grid-community/core';
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
import useGrid from '@/hooks/useGrid';
import api from '@/services/api';
Expand Down Expand Up @@ -134,7 +132,7 @@ const GermlineReport = ({
.filter((col) => col.getColDef().headerName !== 'Actions' && col.getColDef().headerName)
.map((col) => col.getColId()),
fileName: `ipr_${report.patientId}_${report.ident}_germline_${date}.tsv`,
processCellCallback: (({ value }) => (typeof value === 'string' ? value?.replace(/,/g, '') : value)),
processCellCallback: (({ value }) => (typeof value === 'string' ? value?.replace(/[,\n]/g, ' ') : value)),
});
}, [colApi, gridApi, report]);

Expand Down
15 changes: 10 additions & 5 deletions app/views/PrintView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ const Print = (): JSX.Element => {
const printTitle = REPORT_TYPE_TO_TITLE[template.name];
const headerSubtitle = report.patientId;
const headerSubtitleSuffix = REPORT_TYPE_TO_SUFFIX[template.name];

let biopsyText = startCase(report?.biopsyName || 'No Biopsy Name');
if (report?.patientInformation?.diagnosis) {
biopsyText = biopsyText.concat(`- ${startCase(report.patientInformation.diagnosis)}`);
}
if (report?.patientInformation?.tumourSample && report?.patientInformation?.tumourSample.toLowerCase() !== 'undetermined') {
biopsyText = biopsyText.concat(`(${report.patientInformation.tumourSample})`);
}

return (
<div className="print__headers">
<div className="print__header-left">
Expand All @@ -163,11 +172,7 @@ const Print = (): JSX.Element => {
{`${headerSubtitle}${headerSubtitleSuffix ? ` - ${headerSubtitleSuffix}` : ''}`}
</Typography>
<Typography variant="h5">
{`${startCase(report.biopsyName || 'No Biopsy Name')} ${
report.patientInformation.diagnosis ? `- ${startCase(report.patientInformation.diagnosis)}` : ''
} ${
report.patientInformation.tumourSample ? `(${report.patientInformation.tumourSample})` : ''
}`}
{biopsyText}
</Typography>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion app/views/ReportView/components/RapidSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,15 @@ const RapidSummary = ({
return (
<Box display="flex" flexDirection="row" flexWrap="wrap" margin="1rem 0 1rem 0">
{
(unknownSignificanceResults).map((entry) => (
(unknownSignificanceResults).sort(({ displayName: displayNameA }, { displayName: displayNameB }) => {
if (displayNameA < displayNameB) {
return -1;
}
if (displayNameA > displayNameB) {
return 1;
}
return 0;
}).map((entry) => (
<Box
display="inline-block"
padding={1}
Expand Down
10 changes: 10 additions & 0 deletions app/views/ReportView/components/SmallMutations/columnDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ const columnDefs: ColDef[] = [{
colId: 'primarySiteFoldChange',
valueGetter: 'data.gene.expressionVariants.primarySiteFoldChange',
hide: true,
}, {
headerName: 'Primary Site Z-Score',
colId: 'primarySiteZScore',
valueGetter: 'data.gene.expressionVariants.primarySiteZScore',
hide: true,
}, {
headerName: 'Expression (TPM)',
colId: 'tpm',
Expand All @@ -93,6 +98,11 @@ const columnDefs: ColDef[] = [{
colId: 'diseasekIQR',
valueGetter: 'data.gene.expressionVariants.diseasekIQR',
hide: true,
}, {
headerName: 'Disease Z-score',
colId: 'diseaseZScore',
valueGetter: 'data.gene.expressionVariants.diseaseZScore',
hide: true,
}, {
headerName: 'Actions',
colId: 'actions',
Expand Down

0 comments on commit d5a8f75

Please sign in to comment.