Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVSU-2024] undetermined diagnosis field #361

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading