|
|
|
@@ -29,13 +29,9 @@ const OUTCOME_TEXT: Record<string, string> = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const seriesName = (s: Series) => {
|
|
|
|
|
const outcome = OUTCOME_TEXT[s.outcome] ?? s.outcome;
|
|
|
|
|
if (s.source === 'NCI (tabla de ingreso)')
|
|
|
|
|
return `NCI, ingreso a ${outcome.replace(' (CIN2+)', '').replace(/^Cáncer$/, 'cáncer')}`;
|
|
|
|
|
// the platform's own models are the hospital's: its name, and the outcome without its synonym
|
|
|
|
|
return s.source === 'Institucional'
|
|
|
|
|
? `ISSSTELEON, ${outcome.replace(' (CIN2+)', '')}`
|
|
|
|
|
: `${s.source} · ${outcome}`;
|
|
|
|
|
const outcome = (OUTCOME_TEXT[s.outcome] ?? s.outcome).replace(' (CIN2+)', '');
|
|
|
|
|
// the platform's own models are the hospital's
|
|
|
|
|
return `${s.source === 'Institucional' ? 'ISSSTELEON' : s.source}, ${outcome}`;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** The series of the answer. A value absent from it stays absent. */
|
|
|
|
@@ -80,13 +76,13 @@ export function parseSeries(answer: Parameters): Series[] {
|
|
|
|
|
export class RiskSeries {
|
|
|
|
|
readonly series = input.required<Series[]>();
|
|
|
|
|
protected readonly available = computed(() => this.series().filter((s) => s.points.length));
|
|
|
|
|
/** the platform's own series and the NCI master table's are drawn until the user says
|
|
|
|
|
* otherwise */
|
|
|
|
|
/** the platform's own series and the NCI master table's CIN2+ and CIN3+ are drawn until the
|
|
|
|
|
* user says otherwise */
|
|
|
|
|
protected readonly choices = computed(() =>
|
|
|
|
|
this.available().map((s) => ({
|
|
|
|
|
id: s.id,
|
|
|
|
|
name: seriesName(s),
|
|
|
|
|
on: s.source === 'Institucional' || s.id === 'nci-master-CIN3+',
|
|
|
|
|
on: s.source === 'Institucional' || ['nci-master-CIN2+', 'nci-master-CIN3+'].includes(s.id),
|
|
|
|
|
})),
|
|
|
|
|
);
|
|
|
|
|
private readonly among = computed(() => {
|
|
|
|
|