ISSSTELEON WebApp
This commit is contained in:
@@ -0,0 +1,276 @@
|
||||
<div class="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]="300" />
|
||||
} @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 evaluaron
|
||||
<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). Las ventanas de tiempo<sup>*</sup> de tamizaje
|
||||
son: <mark>{{ t.toAdos }}</mark> de M-CHAT (psicología) a ADOS-2,
|
||||
<mark>{{ t.toDiagnosis }}</mark> de ADOS-2 a diagnóstico. El tiempo<sup>*</sup> 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>
|
||||
<p class="state">*tomando la mediana de los tiempos</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">
|
||||
<mat-card-content>
|
||||
<h2 class="box-title">{{ f.title }}</h2>
|
||||
<p class="state">Filtro general aplicado: {{ period }}</p>
|
||||
@if (reports.isLoading()) {
|
||||
<app-loading what="la figura" [figure]="true" />
|
||||
} @else if (figureOf(f); as fig) {
|
||||
<app-plot [figure]="fig" [height]="320" />
|
||||
} @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]="360" />
|
||||
} @else {
|
||||
<p class="state">Sin datos en el periodo.</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
}
|
||||
}
|
||||
</ng-template>
|
||||
} @else {
|
||||
@if (kpis().length) {
|
||||
<h2>Indicadores de oportunidad</h2>
|
||||
<div class="kpis">
|
||||
@for (m of kpis(); track m.id) {
|
||||
<mat-card appearance="outlined" class="kpi" [attr.data-measure]="m.name">
|
||||
<mat-card-content>
|
||||
<div class="kpi-title">{{ m.title }}</div>
|
||||
<div class="kpi-value">{{ score(m) }}</div>
|
||||
<div class="kpi-detail muted">{{ detail(m) }}</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (layout().route.length) {
|
||||
<mat-card appearance="outlined" class="route">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Ruta del tamizaje</mat-card-title>
|
||||
<mat-button-toggle-group
|
||||
[value]="routeView()"
|
||||
(change)="routeView.set($event.value)"
|
||||
class="route-toggle"
|
||||
>
|
||||
<mat-button-toggle value="sample">Acumulado desde la toma</mat-button-toggle>
|
||||
<mat-button-toggle value="step">Por pasos</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<app-plot [figure]="route()" [height]="260" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<h2>Indicadores clínicos</h2>
|
||||
<div class="clinical">
|
||||
@for (m of clinical(); track m.id) {
|
||||
<mat-card appearance="outlined" class="clinical-card" [attr.data-measure]="m.name">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ m.title }}</mat-card-title>
|
||||
<mat-card-subtitle>{{ score(m) }} · {{ detail(m) }}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
@for (f of figureSets().get(m.name!) ?? []; track f.title) {
|
||||
<h3 class="figure-title">{{ f.title }}</h3>
|
||||
<app-plot [figure]="f.figure" [height]="260" />
|
||||
} @empty {
|
||||
<p class="muted">Sin datos en el periodo.</p>
|
||||
}
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user