CaCu's page by readings, screening stages, ages and exports

This commit is contained in:
Roberto Treviño
2026-11-30 23:31:58 -06:00
parent 053679c817
commit fe4dd55452
29 changed files with 1831 additions and 212 deletions
+72 -13
View File
@@ -10,6 +10,30 @@
name="cutoff"
/>
</mat-form-field>
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>Edad mínima</mat-label>
<input
matInput
type="number"
min="0"
max="120"
[ngModel]="ageFrom()"
(ngModelChange)="setAge(ageFrom, $event)"
name="ageFrom"
/>
</mat-form-field>
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label>Edad máxima</mat-label>
<input
matInput
type="number"
min="0"
max="120"
[ngModel]="ageTo()"
(ngModelChange)="setAge(ageTo, $event)"
name="ageTo"
/>
</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)">
@@ -51,7 +75,26 @@
}
</mat-select>
</mat-form-field>
<button
mat-stroked-button
type="button"
[disabled]="saving() || !applied()"
(click)="save('xlsx')"
>
Exportar Excel
</button>
<button
mat-stroked-button
type="button"
[disabled]="saving() || !applied()"
(click)="save('pdf')"
>
Exportar PDF
</button>
</form>
@if (saveError()) {
<p class="muted" role="alert">{{ saveError() }}</p>
}
@if (error()) {
<p class="muted" role="alert">
@@ -72,8 +115,9 @@
<thead>
<tr>
<th>Paciente</th>
<th>Grupo de edad</th>
<th>Edad</th>
<th>Estatus de seguimiento</th>
<th>Etapas</th>
<th>Última citología</th>
<th>Último resultado de VPH</th>
<th>Última biopsia</th>
@@ -87,24 +131,34 @@
@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>
<a
[routerLink]="['/indicadores', domain(), 'pacientes', row.patient.id]"
[queryParams]="{ corte: applied(), citologia: row.cytology?.date }"
>{{ 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>
{{ row.age ?? 'No disponible' }}
<small>Grupo: {{ row.ageGroup }}</small>
</td>
<td>{{ name(row.status) }}</td>
<td>
<app-stages [stages]="row.stages" />
<button
mat-button
type="button"
[attr.aria-expanded]="opened() === row.patient.id"
(click)="toggle(row)"
>
Detalle
</button>
</td>
<td>
@if (row.cytology; as c) {
{{
c.result
? name(c.result)
: c.adequacy === 'unsatisfactory'
? 'Insatisfactoria'
: 'Pendiente'
}}
{{ result(c) }}
<small>Fecha: {{ c.date }}</small>
<small>Calidad: {{ c.adequacy ? name(c.adequacy) : '—' }}</small>
} @else {
@@ -154,10 +208,15 @@
<td>{{ latest(row) ?? 'No disponible' }}</td>
<td class="num">{{ row.daysToDiagnosis ?? 'No disponible' }}</td>
</tr>
@if (opened() === row.patient.id) {
<tr class="stage-detail">
<td colspan="11"><app-stages [stages]="row.stages" [detail]="true" /></td>
</tr>
}
} @empty {
@if (page() && !loading()) {
<tr>
<td colspan="10" class="muted">No hay registros para los filtros aplicados.</td>
<td colspan="11" class="muted">No hay registros para los filtros aplicados.</td>
</tr>
}
}