Commit fc3d2b0b authored by Guillaume Jimenez's avatar Guillaume Jimenez
Browse files

Handles where there are more than 10 tier 3 in the report.

parent 42253e7f
......@@ -409,6 +409,9 @@ Vue.component('existing-reports', {
// return false;
},
finalizeButtonDisabled(report) {
if (this.readonly) {
return true;
}
var currentReportLoaded = report._id['$oid'] == this.currentReportId;
if (!currentReportLoaded) {
return true;
......
......@@ -458,9 +458,30 @@ public class FinalReportPDFTemplate {
// vusRow.setLabel(vusGenes);
// sortedValues.add(vusRow);
// }
//count and extract Tier 3 if too many
long tier3Count = sortedValues.stream()
.filter(r -> r.getUnknownClinicalSignificanceCount() > 0
&& r.getIndicatedTherapyCount() == 0)
.collect(Collectors.counting());
List<ReportNavigationRow> sortedValuesFiltered = new ArrayList<ReportNavigationRow>();
if (tier3Count > 10) {
//remove all tier 3 and replace with a single row
for (ReportNavigationRow navigationRow : sortedValues) {
if (navigationRow.getUnknownClinicalSignificanceCount() == 0
|| navigationRow.getIndicatedTherapyCount() > 0) {
sortedValuesFiltered.add(navigationRow);
}
}
ReportNavigationRow tier3Row = new ReportNavigationRow(tier3Count + " Additional Mutated Genes", tier3Count + " Additional Mutated Genes");
tier3Row.setUnknownClinicalSignificanceCount((int) tier3Count);
sortedValuesFiltered.add(tier3Row);
}
else {
sortedValuesFiltered = sortedValues;
}
for (ReportNavigationRow navigationRow : sortedValues) {
for (ReportNavigationRow navigationRow : sortedValuesFiltered) {
String gene = navigationRow.getLabel();
Color defaultColor = Color.WHITE;
if (grayBackground) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment