171 lines
6.1 KiB
HTML
171 lines
6.1 KiB
HTML
<section class="card risk-tea" aria-labelledby="tea-risk-title">
|
|
<h2 id="tea-risk-title" class="risk-title">Alteraciones de EEG relacionadas al TEA</h2>
|
|
<div class="filters">
|
|
<app-patient-search [(value)]="search" (searched)="pageIndex.set(0)" />
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Fecha de corte</mat-label>
|
|
<input matInput type="date" [ngModel]="cutoff()" (ngModelChange)="cutoff.set($event)" />
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Ventana de meses</mat-label>
|
|
<mat-select [value]="window()" (selectionChange)="window.set($event.value)">
|
|
@for (m of [1, 3, 6, 12]; track m) {
|
|
<mat-option [value]="m">{{ m }} {{ m === 1 ? 'mes' : 'meses' }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Estatus de EEG</mat-label>
|
|
<mat-select [value]="eeg()" (selectionChange)="setFilter(eeg.set.bind(eeg), $event.value)">
|
|
<mat-option value="">Todos</mat-option>
|
|
@for (s of eegStatuses | keyvalue; track s.key) {
|
|
<mat-option [value]="s.key">{{ s.value }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Grupo de edad</mat-label>
|
|
<mat-select [value]="age()" (selectionChange)="setFilter(age.set.bind(age), $event.value)">
|
|
<mat-option value="">Todos</mat-option>
|
|
@for (a of ages(); track a) {
|
|
<mat-option [value]="a">{{ ageLabel(a) }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Puntaje M-CHAT</mat-label>
|
|
<mat-select
|
|
[value]="mchat()"
|
|
(selectionChange)="setFilter(mchat.set.bind(mchat), $event.value)"
|
|
>
|
|
<mat-option value="">Todos</mat-option>
|
|
@for (b of mchatBands; track b.id) {
|
|
<mat-option [value]="b.id">{{ b.label }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>CSS ADOS-2</mat-label>
|
|
<mat-select [value]="css()" (selectionChange)="setFilter(css.set.bind(css), $event.value)">
|
|
<mat-option value="">Todos</mat-option>
|
|
@for (l of cssLevels; track l.id) {
|
|
<mat-option [value]="l.id">{{ l.label }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Estado del caso</mat-label>
|
|
<mat-select
|
|
[value]="caseState()"
|
|
(selectionChange)="setFilter(caseState.set.bind(caseState), $event.value)"
|
|
>
|
|
<mat-option value="">Todos</mat-option>
|
|
@for (c of cases | keyvalue; track c.key) {
|
|
<mat-option [value]="c.key">{{ c.value }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Tipo de alteración</mat-label>
|
|
<mat-select
|
|
[value]="altered()"
|
|
(selectionChange)="setFilter(altered.set.bind(altered), $event.value)"
|
|
>
|
|
<mat-option value="">Todas</mat-option>
|
|
@for (a of alterations(); track a) {
|
|
<mat-option [value]="a">{{ alteration(a) }}</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic" class="narrow">
|
|
<mat-label>Registros por página</mat-label>
|
|
<input
|
|
matInput
|
|
type="number"
|
|
min="10"
|
|
max="200"
|
|
[ngModel]="size()"
|
|
(ngModelChange)="size.set(+$event || 50); pageIndex.set(0)"
|
|
/>
|
|
</mat-form-field>
|
|
<button mat-stroked-button (click)="consult()">Consultar</button>
|
|
</div>
|
|
|
|
@if (loading()) {
|
|
<app-loading what="el seguimiento" />
|
|
} @else {
|
|
@let s = summary();
|
|
<div class="eeg-summary" aria-label="EEG de los pacientes filtrados">
|
|
<h3>EEG de los pacientes filtrados</h3>
|
|
<div class="counts">
|
|
<span
|
|
><strong>{{ s.normal }}</strong> Normales</span
|
|
>
|
|
<span
|
|
><strong>{{ s.abnormal }}</strong> Anormales</span
|
|
>
|
|
<span
|
|
><strong>{{ s.none }}</strong> Sin EEG válido</span
|
|
>
|
|
</div>
|
|
@if (s.alterations.length) {
|
|
<ul class="by-alteration">
|
|
@for (a of s.alterations; track a[0]) {
|
|
<li>
|
|
{{ alteration(a[0]) }}: <strong>{{ a[1] }}</strong>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
|
|
<table class="worklist">
|
|
<thead>
|
|
<tr>
|
|
<th>Paciente</th>
|
|
<th>Grupo de edad</th>
|
|
<th>Estado del caso</th>
|
|
<th>Último EEG</th>
|
|
<th class="num">Puntaje M-CHAT</th>
|
|
<th class="num">CSS ADOS-2</th>
|
|
<th>Estatus de EEG</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@for (r of shown(); track r.patient.id) {
|
|
<tr>
|
|
<td>
|
|
<a [routerLink]="['/indicadores', domain(), 'pacientes', r.patient.id]">{{
|
|
r.name
|
|
}}</a>
|
|
</td>
|
|
<td>{{ r.ageGroup ? ageLabel(r.ageGroup) : 'Sin dato' }}</td>
|
|
<td>{{ cases[r.case] ?? r.case }}</td>
|
|
<td>{{ r.lastEeg ?? '—' }}</td>
|
|
<td class="num">{{ r.mchat ?? '—' }}</td>
|
|
<td class="num">{{ r.css ?? '—' }}</td>
|
|
<td>{{ eegStatuses[r.eegStatus] ?? r.eegStatus }}</td>
|
|
</tr>
|
|
} @empty {
|
|
<tr>
|
|
<td colspan="7" class="muted">No hay registros para los filtros aplicados.</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
<div class="pager">
|
|
<button mat-button [disabled]="pageIndex() === 0" (click)="pageIndex.set(pageIndex() - 1)">
|
|
Anterior
|
|
</button>
|
|
<span>Página {{ pageIndex() + 1 }} de {{ pages() }} · {{ filtered().length }} pacientes</span>
|
|
<button
|
|
mat-button
|
|
[disabled]="pageIndex() + 1 >= pages()"
|
|
(click)="pageIndex.set(pageIndex() + 1)"
|
|
>
|
|
Siguiente
|
|
</button>
|
|
</div>
|
|
}
|
|
</section>
|