Skip to content

Commit

Permalink
Merge pull request #361 from bcgsc/feat/DEVSU-2024-undetermined-diagn…
Browse files Browse the repository at this point in the history
…osis-field

[DEVSU-2024] undetermined diagnosis field
  • Loading branch information
kttkjl authored Oct 20, 2023
2 parents f33912f + 1f067ce commit a3690fc
Showing 1 changed file with 10 additions and 5 deletions.
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

0 comments on commit a3690fc

Please sign in to comment.