Files
WebApp/src/app/indicadores/tab-seguimiento.html
T

119 lines
3.8 KiB
HTML

<form class="filters card" (submit)="$event.preventDefault()">
<app-patient-search [(value)]="search" />
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>Fecha de corte</mat-label>
<input
matInput
type="date"
[ngModel]="cutoff() || applied()"
(ngModelChange)="cutoff.set($event)"
name="cutoff"
/>
</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 seguimiento</mat-label>
<mat-select [value]="status()" (selectionChange)="status.set($event.value)">
<mat-option value="">Todos</mat-option>
@for (s of statuses; track s) {
<mat-option [value]="s">{{ name(s) }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>Registros por página</mat-label>
<mat-select [value]="size()" (selectionChange)="size.set($event.value)">
@for (n of [20, 50, 100]; track n) {
<mat-option [value]="n">{{ n }}</mat-option>
}
</mat-select>
</mat-form-field>
</form>
@if (error()) {
<p class="muted" role="alert">
No se pudo leer la lista de seguimiento.
<button mat-button type="button" (click)="retry()">Reintentar seguimiento</button>
</p>
} @else if (!page() || loading()) {
<app-loading what="seguimiento" />
} @else if (applied()) {
<p class="muted window">Ventana consultada: {{ start() }} al {{ applied() }}.</p>
}
<div class="table-wrap card">
<table class="plain worklist">
<caption>
Resultados disponibles por paciente
</caption>
<thead>
<tr>
<th>Paciente</th>
<th>Grupo de edad</th>
<th>Última mastografía</th>
<th>Última biopsia</th>
<th>Estatus de seguimiento</th>
<th>Prioridad</th>
</tr>
</thead>
<tbody>
@for (row of rows(); track row.patient.id) {
<tr>
<td>
<a
[routerLink]="['/indicadores', domain(), 'pacientes', row.patient.id]"
[queryParams]="{ ventana: window(), corte: applied() }"
>{{ row.name ?? row.patient.id!.slice(0, 10) }}</a
>
@if (row.curp) {
<div class="muted curp">{{ row.curp }}</div>
}
</td>
<td>{{ row.ageGroup }}</td>
<td>
{{ name(row.mammogram.birads ?? '') || 'Sin dato' }}
<small>Fecha: {{ row.mammogram.date }}</small>
</td>
<td>
@if (row.biopsy; as b) {
{{ name(b.histology ?? '') || 'Sin resultado' }}
<small>Fecha: {{ b.date }}</small>
} @else {
No disponible
}
</td>
<td>{{ name(row.status) }}</td>
<td>{{ priority(row.priority) }}</td>
</tr>
} @empty {
@if (page() && !loading()) {
<tr>
<td colspan="6" class="muted">No hay registros para los filtros aplicados.</td>
</tr>
}
}
</tbody>
</table>
</div>
<div class="pager">
<span class="muted">
@if (page()?.total; as total) {
Página {{ pageNumber() }} de {{ pageCount() }}, {{ total }} registros
}
</span>
<button mat-stroked-button (click)="go('previous')" [disabled]="!has('previous') || loading()">
Anterior
</button>
<button mat-stroked-button (click)="go('next')" [disabled]="!has('next') || loading()">
Siguiente
</button>
</div>