Port TEA and CaCu section 1 adjustments onto the Histórico integration

TEA: Indicadores tab, opportunity summary with real contract values, ordered
opportunity and clinical figures, «No aceptable» label for the EEG quality.
CaCu: renamed lab-result KPI, six time figures under «Tiempo de tamizaje a
diagnóstico», clinical figures with the pending «Progresión por grupo de riesgo».
CaCu's colposcopy and biopsy times use the measures the screening route
publishes and leave them to the route chart while it is shown.
This commit is contained in:
Angel Capetillo Zavala
2026-11-22 02:20:31 -06:00
parent 10773edcc1
commit e3c9849e29
23 changed files with 491 additions and 70 deletions
@@ -26,8 +26,13 @@ export function percentText(value: number | null | undefined, fallback = 'No dis
return typeof value === 'number' && Number.isFinite(value) ? `${percentNumber(value)} %` : fallback;
}
/** «12.3» from a count over its denominator. */
export function shareNumber(k: number, n: number): string {
const value = sharePercent(k, n);
return value > 0 && value < 0.1 ? String(value) : value.toFixed(1);
}
/** «12.3 %» from a count over its denominator. */
export function shareText(k: number, n: number): string {
const value = sharePercent(k, n);
return `${value > 0 && value < 0.1 ? String(value) : value.toFixed(1)} %`;
return `${shareNumber(k, n)} %`;
}