Files
WebApp/src/app/indicadores/tab-riesgos.html
T
2026-11-25 16:17:23 -06:00

150 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<form class="filters card" (submit)="$event.preventDefault()">
<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</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</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>Horizonte</mat-label>
<mat-select [value]="horizon()" (selectionChange)="horizon.set($event.value)">
@for (h of [1, 2, 3, 4, 5]; track h) {
<mat-option [value]="h">{{ h }} {{ h === 1 ? 'año' : 'años' }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>Orden</mat-label>
<mat-select [value]="sort()" (selectionChange)="sort.set($event.value)">
<mat-option value="-recent">Estudio más reciente</mat-option>
<mat-option value="-risk-cin2">Mayor riesgo de LIEAG+</mat-option>
<mat-option value="-risk-cancer">Mayor riesgo de cáncer</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>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.</p>
}
<div class="table-wrap card">
<table class="plain worklist">
<thead>
<tr>
<th>Paciente</th>
<th>Grupo de edad</th>
<th>Estatus</th>
<th>Última citología</th>
<th>VPH</th>
<th>Biopsia</th>
<th>Riesgo LIEAG+ ({{ horizon() }} a)</th>
<th>Riesgo cáncer ({{ horizon() }} a)</th>
<th>Días toma → diagnóstico</th>
</tr>
</thead>
<tbody>
@for (row of rows(); track row.patient.id) {
<tr>
<td>
<a [routerLink]="['/indicadores', domain(), 'pacientes', row.patient.id]">{{
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.status) }}</td>
<td>
@if (row.cytology; as c) {
{{ c.date }} ·
{{
c.result
? name(c.result)
: c.adequacy === 'unsatisfactory'
? 'Insatisfactoria'
: 'Pendiente'
}}
} @else {
—
}
</td>
<td>
@if (row.hpv; as h) {
{{ h.positive ? 'Positivo' : 'Negativo' }}{{ h.types1618 ? ' (16/18)' : '' }}
} @else {
—
}
</td>
<td>
@if (row.biopsy; as b) {
{{ b.date }} · {{ name(b.histology ?? '') || 'Sin dato' }}
} @else {
—
}
</td>
<td class="num">
{{ row.risk.cin2 === undefined ? '—' : (row.risk.cin2 * 100 | number: '1.1-1') + ' %' }}
</td>
<td class="num">
{{
row.risk.cancer === undefined ? '—' : (row.risk.cancer * 100 | number: '1.1-1') + ' %'
}}
</td>
<td class="num">{{ row.daysToDiagnosis ?? '—' }}</td>
</tr>
} @empty {
<tr>
<td colspan="9" class="muted">
{{ page() ? 'Nadie en la lista con estos filtros.' : 'Cargando…' }}
</td>
</tr>
}
</tbody>
</table>
</div>
<div class="pager">
<span class="muted">
@if (page()?.total; as total) {
{{ offset() + 1 }}–{{ offset() + rows().length }} de {{ total }} pacientes · corte
{{ applied() }}
}
</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>