diff --git a/src/app/paciente/risk-series.ts b/src/app/paciente/risk-series.ts index 6895d7b..9085c96 100644 --- a/src/app/paciente/risk-series.ts +++ b/src/app/paciente/risk-series.ts @@ -75,10 +75,8 @@ export function parseSeries(answer: Parameters): Series[] { } @if (selected().length) { - @for (s of selected(); track s.id) { - @for (assumption of s.assumptions; track assumption) { -

{{ name(s) }}: {{ assumption }}

- } + @for (assumption of assumptions(); track assumption) { +

{{ assumption }}

} } @@ -115,6 +113,10 @@ export class RiskSeries { protected readonly selected = computed(() => this.available().filter((s) => this.chosen().has(s.id)), ); + /** what the chosen series assume, each said once */ + protected readonly assumptions = computed(() => [ + ...new Set(this.selected().flatMap((s) => s.assumptions)), + ]); protected readonly figure = computed(() => { const shown = this.selected().map((s) => ({ model: s.id,