CaCu's page by readings, screening stages, ages and exports

This commit is contained in:
Roberto Treviño
2026-11-30 23:31:58 -06:00
parent 053679c817
commit fe4dd55452
29 changed files with 1831 additions and 212 deletions
+11 -7
View File
@@ -17,7 +17,6 @@ import {
fill,
nestedDonut,
rateDots,
routeFigure,
scenarioBars,
shareDonut,
} from './figures';
@@ -38,6 +37,7 @@ import {
strataBars,
} from './measures';
import { Loading } from '../loading';
import { ReadingsSection, Source } from './section';
/** The period's indicators: the timeliness KPIs, the screening route, and a card per
* clinical measure with its figures. */
@@ -52,6 +52,7 @@ import { Loading } from '../loading';
MatCardModule,
MatSelectModule,
Plot,
ReadingsSection,
],
templateUrl: './tab-indicadores.html',
styleUrl: './tab-indicadores.scss',
@@ -264,12 +265,15 @@ export class TabIndicadores {
protected measureTitle(code: string | undefined): string {
return (code && this.byName().get(code)?.title) || '';
}
/** A clinical section's route or figures, drawn from the applied period's reports. */
protected routeOf(section: Section): Figure | undefined {
if (section.kind !== 'route') return undefined;
const steps = section.steps.map((s) => ({ label: s.label, r: this.rd(s.measure) }));
return steps.some((s) => s.r?.score !== undefined) ? routeFigure(steps) : undefined;
}
/** What a section of readings is drawn from. */
protected readonly of = computed<Source>(() => {
const found = this.loaded();
return {
loading: this.reports.isLoading(),
reading: (code) => found?.get(code),
measure: (code) => this.byName().get(code),
};
});
protected figureOf(spec: FigureSpec): Figure | undefined {
const r = this.rd(spec.measure);
if (!r || !(r.populations['initial-population'] ?? 0)) return undefined;