3154ba92df
- Prevalencia registrada (M31): the sex selector, its signal and the bar outline highlight are gone; the headline always shows the total rate and the bars keep one bar per sex - Indicadores de oportunidad: the box charts show Q3, Mediana and Q1 in the hover, formatted with the shared one-decimal hover format, instead of annotations - Porcentaje de confirmacion diagnostica (M24): the stacked bars, axis title, ticks, bar text and hover are in percent of the patients of each sex and age group - Porcentaje de pacientes con / sin EEG (M21, M22): bar text shows the percentage only - Headroom: the shared percent axis now ends at 110 with ticks every 20, and the shared plot builder never clips bar labels (cliponaxis false for every bar trace), so a 100 % bar keeps its label; the per-trace cliponaxis on the bar builders was removed - Indicadores clinicos: route, grid and figure-row charts all use one height (430 px, was 300/320/360) Choices: percent axis headroom lives in percentAxis, with rate dots keeping their own 0-100 range; the clinical height is a single component constant.
235 lines
9.1 KiB
HTML
235 lines
9.1 KiB
HTML
<div class="filters indicator-filters card">
|
|
<h2 class="filters-title">Filtros</h2>
|
|
<div class="field">
|
|
<span class="label">Intervalo de análisis</span>
|
|
<mat-button-toggle-group
|
|
[value]="type()"
|
|
(change)="setType($event.value)"
|
|
aria-label="Intervalo de análisis"
|
|
>
|
|
<mat-button-toggle value="month">Mensual</mat-button-toggle>
|
|
<mat-button-toggle value="semester">Semestral</mat-button-toggle>
|
|
</mat-button-toggle-group>
|
|
</div>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Periodo seleccionado</mat-label>
|
|
<mat-select [value]="chosen()" (selectionChange)="chosen.set($event.value)">
|
|
@for (p of options(); track p) {
|
|
<mat-option [value]="p">{{ p }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<button
|
|
mat-flat-button
|
|
(click)="applied.set(chosen())"
|
|
[disabled]="!chosen() || chosen() === applied()"
|
|
>
|
|
Aplicar
|
|
</button>
|
|
</div>
|
|
|
|
@if (reports.isLoading()) {
|
|
<app-loading what="los indicadores" text="Calculando los indicadores…" />
|
|
}
|
|
|
|
@if (reports.error()) {
|
|
<div class="load-error" role="alert">
|
|
<p>No se obtuvieron los indicadores del periodo.</p>
|
|
<button mat-stroked-button (click)="reports.reload()">Reintentar</button>
|
|
</div>
|
|
}
|
|
@if (page(); as pg) {
|
|
@if (applied(); as period) {
|
|
<section class="card opportunity" aria-labelledby="opportunity-title">
|
|
<div class="section-head">
|
|
<h2 id="opportunity-title">Indicadores de oportunidad</h2>
|
|
<span class="period">Periodo {{ period }}</span>
|
|
</div>
|
|
<div class="kpis">
|
|
@for (k of pg.kpis; track k.title) {
|
|
<mat-card appearance="outlined" class="kpi" [attr.data-measure]="k.measure ?? null">
|
|
<mat-card-content>
|
|
<h3 class="kpi-title">{{ k.title }}</h3>
|
|
@if (reports.isLoading() && k.measure) {
|
|
<app-loading [what]="k.title.toLowerCase()" />
|
|
} @else {
|
|
<div class="kpi-value" [class.pending]="!k.measure">
|
|
@let v = kpiParts(kpiValue(k));
|
|
{{ v[0] }}
|
|
@if (v[1]) {
|
|
<span class="kpi-qualifier">{{ v[1] }}</span>
|
|
}
|
|
</div>
|
|
<div class="kpi-detail">{{ kpiNote(k) }}</div>
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
</div>
|
|
@for (section of pg.opportunity ?? []; track $index) {
|
|
<ng-container
|
|
*ngTemplateOutlet="sectionView; context: { $implicit: section, period: period }"
|
|
/>
|
|
}
|
|
</section>
|
|
|
|
<section class="card clinical-page" aria-labelledby="clinical-title">
|
|
<h2 id="clinical-title">Indicadores clínicos</h2>
|
|
@for (section of pg.clinical; track $index) {
|
|
<ng-container
|
|
*ngTemplateOutlet="sectionView; context: { $implicit: section, period: period }"
|
|
/>
|
|
}
|
|
</section>
|
|
}
|
|
|
|
<ng-template #sectionView let-section let-period="period">
|
|
@switch (section.kind) {
|
|
@case ('route') {
|
|
<h3 class="route-title">{{ section.title }}</h3>
|
|
@if (reports.isLoading()) {
|
|
<app-loading what="los tiempos de la ruta" [figure]="true" />
|
|
} @else if (routeOf(section); as fig) {
|
|
<app-plot [figure]="fig" [height]="clinicalHeight" />
|
|
} @else {
|
|
<p class="state">Sin tiempos publicados en el periodo.</p>
|
|
}
|
|
}
|
|
@case ('tea-summary') {
|
|
@if (teaSummary(); as t) {
|
|
<mat-card appearance="outlined" class="summary">
|
|
<mat-card-content>
|
|
<h2 class="box-title">Resumen</h2>
|
|
<p>
|
|
Al cierre del periodo <mark>{{ period }}</mark>, se registraron en el tamizaje
|
|
<mark>{{ t.evaluated }}</mark> niños entre 16 y 36 meses;
|
|
<mark>{{ t.mchatOnly }}</mark> únicamente tienen M-CHAT,
|
|
<mark>{{ t.psychology }}</mark> hasta la evaluación psicológica y
|
|
<mark>{{ t.neuropediatrics }}</mark> presentan evaluación neuropediátrica. En este
|
|
periodo el <mark>{{ t.confirmed }}</mark> de los pacientes tiene diagnóstico
|
|
confirmado de TEA (CIE-10 F84.0). La mediana de la ventana de tiempo de tamizaje de
|
|
M-CHAT (psicología) a ADOS-2 es <mark>{{ t.toAdos }}</mark> y la mediana de ADOS-2 a
|
|
diagnóstico es <mark>{{ t.toDiagnosis }}</mark>. La mediana del tiempo de tamizaje
|
|
completo de M-CHAT a diagnóstico fue de <mark>{{ t.whole }}</mark>.
|
|
</p>
|
|
<p>
|
|
De los <mark>{{ t.diagnosed }}</mark> niños con diagnóstico confirmado en este
|
|
periodo, <mark>{{ t.eeg }}</mark> presentan estudio de EEG y faltan
|
|
<mark>{{ t.missing }}</mark> por realizarlo. <mark>{{ t.unusable }}</mark> estudios
|
|
de EEG no son aceptables para un análisis.
|
|
</p>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
} @else if (reports.isLoading()) {
|
|
<app-loading what="el resumen del periodo" />
|
|
}
|
|
}
|
|
@case ('grid') {
|
|
<div class="grid-figures">
|
|
@for (f of section.figures; track f.title) {
|
|
<mat-card
|
|
appearance="outlined"
|
|
class="figure-card"
|
|
[attr.data-figure]="f.kind"
|
|
[attr.data-measure]="f.measure"
|
|
>
|
|
<mat-card-content>
|
|
<h2 class="box-title">{{ f.title }}</h2>
|
|
<p class="state">Filtro general aplicado: {{ period }}</p>
|
|
@if (f.kind === 'sex-bars') {
|
|
@if (prevalenceOf(f); as p) {
|
|
<div class="kpi-value">
|
|
{{ p.value }}
|
|
<span class="kpi-qualifier">{{ p.detail }}</span>
|
|
</div>
|
|
}
|
|
}
|
|
@if (reports.isLoading()) {
|
|
<app-loading what="la figura" [figure]="true" />
|
|
} @else if (figureOf(f); as fig) {
|
|
<app-plot [figure]="fig" [height]="clinicalHeight" />
|
|
} @else {
|
|
<div class="empty-figure">Sin datos publicados</div>
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
</div>
|
|
}
|
|
@case ('boxes') {
|
|
@if (section.title) {
|
|
<h3 class="boxes-title">{{ section.title }}</h3>
|
|
}
|
|
<div class="box-grid" [class.standalone]="!section.title">
|
|
@for (b of section.cards; track b.title) {
|
|
<mat-card
|
|
appearance="outlined"
|
|
class="box-card"
|
|
[attr.data-measure]="b.measure ?? null"
|
|
>
|
|
<mat-card-content>
|
|
<h2 class="box-title">{{ b.title }}</h2>
|
|
@if (!b.measure) {
|
|
<p class="state">{{ pending }}</p>
|
|
<div class="empty-figure">Sin datos publicados</div>
|
|
} @else {
|
|
<p class="state">Filtro general aplicado: {{ period }}</p>
|
|
@if (section.subtitles) {
|
|
<h2 class="box-subtitle">{{ measureTitle(b.measure) }}</h2>
|
|
<p class="state">Figura: Caja de cuartiles</p>
|
|
}
|
|
@if (reports.isLoading()) {
|
|
<app-loading what="la figura" [figure]="true" />
|
|
} @else if (boxOf(b.measure); as fig) {
|
|
<app-plot [figure]="fig" [height]="320" />
|
|
} @else {
|
|
<div class="empty-figure">Sin datos publicados</div>
|
|
}
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
</div>
|
|
}
|
|
@case ('card') {
|
|
<mat-card appearance="outlined" class="kpi closing" [attr.data-measure]="section.measure">
|
|
<mat-card-content>
|
|
<h3 class="kpi-title">{{ section.title }}</h3>
|
|
<div class="kpi-value">
|
|
@let w = kpiParts(kpiValue(section));
|
|
{{ w[0] }}
|
|
@if (w[1]) {
|
|
<span class="kpi-qualifier">{{ w[1] }}</span>
|
|
}
|
|
</div>
|
|
<div class="kpi-detail">{{ kpiNote(section) }}</div>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
@default {
|
|
<mat-card appearance="outlined" class="figure-card">
|
|
<mat-card-content>
|
|
@if (section.title) {
|
|
<h2 class="figure-card-title">{{ section.title }}</h2>
|
|
}
|
|
<div class="figure-row">
|
|
@for (f of section.figures; track f.title) {
|
|
<div class="figure" [attr.data-figure]="f.kind">
|
|
<h3 [class.light]="f.kind === 'share-donut'">{{ titled(f.title) }}</h3>
|
|
@if (reports.isLoading()) {
|
|
<app-loading what="la figura" [figure]="true" />
|
|
} @else if (figureOf(f); as fig) {
|
|
<app-plot [figure]="fig" [height]="clinicalHeight" />
|
|
} @else {
|
|
<p class="state">Sin datos en el periodo.</p>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
}
|
|
</ng-template>
|
|
}
|