78 lines
5.7 KiB
HTML
78 lines
5.7 KiB
HTML
<section class="confirmacion" aria-label="Confirmación histopatológica por resultado de la citología">
|
||
<p class="applied-summary">Filtro general aplicado: {{ appliedSummary }}</p>
|
||
<button mat-button type="button" class="methodology-toggle" [attr.aria-expanded]="helpOpen" (click)="toggleHelp()">Cómo leer</button>
|
||
@if (helpOpen) {
|
||
<div class="methodology">
|
||
@if (metadata) {
|
||
@for (guide of readingGuide; track guide.figura) {
|
||
<section class="reading-guide" [attr.aria-label]="'Cómo leer: ' + guide.nombre">
|
||
<h3>{{ guide.nombre }}</h3>
|
||
@if (guide.descripcion) { <p>{{ guide.descripcion }}</p> }
|
||
@if (guide.como_leer.length) { <ul>@for (line of guide.como_leer; track $index) { <li>{{ line }}</li> }</ul> }
|
||
</section>
|
||
} @empty { <p>El servicio no publica instrucciones de lectura para estas figuras.</p> }
|
||
} @else { <p>Metadatos publicados pendientes. Vuelve a abrir «Cómo leer» para reintentar su consulta.</p> }
|
||
</div>
|
||
}
|
||
@switch (status()) {
|
||
@case ('deferred') { <p role="status">La vista se cargará al acercarse a esta región.</p> }
|
||
@case ('loading') { <mat-progress-bar mode="indeterminate" aria-label="Cargando citologías y biopsias" /><p role="status">Cargando el mismo periodo para tasas y dona…</p> }
|
||
@case ('error') { <div role="alert"><p>{{ message }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
||
@case ('incompatible') { <div role="alert"><p>Respuesta incompatible: {{ message }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
||
}
|
||
@if (status() === 'ready' || status() === 'empty') {
|
||
@if (periods.length > 1) {
|
||
<nav class="periods" aria-label="Periodos de la confirmación histopatológica">
|
||
<button type="button" aria-label="Periodo anterior de la confirmación" [disabled]="periodIndex === 0" (click)="changePeriod(-1)">‹</button>
|
||
<span role="status">{{ periods[periodIndex] }}, {{ periodIndex + 1 }} de {{ periods.length }}</span>
|
||
<button type="button" aria-label="Periodo siguiente de la confirmación" [disabled]="periodIndex === periods.length - 1" (click)="changePeriod(1)">›</button>
|
||
</nav>
|
||
}
|
||
@if (model; as m) {
|
||
<p class="selection-status" role="status" aria-live="polite">{{ m.periodo }}, selección: {{ selectionLabel }}. {{ reading }}</p>
|
||
@if (status() === 'empty') { <p role="status">No hay citologías de alto grado publicadas para este periodo.</p> }
|
||
@else {
|
||
<div class="legend" role="group" aria-label="Seleccionar resultado de biopsia">
|
||
<button type="button" (click)="select('centro')" [disabled]="isBase" aria-label="Volver a la vista base de la confirmación">Volver</button>
|
||
<div class="keys" role="group" aria-label="Grupos del anillo interior">
|
||
@for (g of m.grupos; track g.id; let i = $index) {
|
||
<button type="button" [attr.aria-pressed]="!selection?.categoria && selection?.grupo === g.id" (click)="select('grupos', i)"><span class="swatch" [style.background]="g.color" aria-hidden="true"></span>{{ g.etiqueta }}</button>
|
||
}
|
||
</div>
|
||
<div class="keys" role="group" aria-label="Grados del anillo exterior">
|
||
@for (c of m.grados; track c.id; let i = $index) {
|
||
<button type="button" [attr.aria-pressed]="selection?.categoria === c.id" (click)="select('categorias', i)"><span class="swatch" [style.background]="c.color" aria-hidden="true"></span>{{ c.etiqueta }}</button>
|
||
}
|
||
</div>
|
||
</div>
|
||
<div class="figures">
|
||
<section class="figure rates"><h3>Por resultado de la citología, {{ m.periodo }}</h3>
|
||
@if (ratesFigure) {
|
||
<app-plotly-chart [figure]="ratesFigure" [showNotes]="false" [label]="'Confirmación, tasas por citología, ' + m.periodo + ', ' + selectionLabel" />
|
||
}
|
||
<ul class="rate-states">
|
||
@for (t of rates; track t.fila.id) { @if (t.k === null) { <li>{{ t.fila.etiqueta }}: {{ estadoTasa(t) }}</li> } }
|
||
</ul>
|
||
</section>
|
||
<section class="figure donut"><h3>Resultado de la biopsia, {{ m.periodo }}</h3>
|
||
@if (m.conBiopsia !== null && m.conBiopsia > 0 && donutFigure) {
|
||
<app-plotly-chart [figure]="donutFigure" [showNotes]="false" [label]="'Confirmación, dona de grados de biopsia, ' + m.periodo + ', ' + selectionLabel" (plotClick)="plotClicked($event)" />
|
||
} @else { <p role="status">{{ m.conBiopsia === null ? 'Dona no disponible: hay celdas suprimidas o datos incompletos. No se calcula un total parcial.' : 'Sin mujeres con biopsia en el periodo.' }}</p> }
|
||
</section>
|
||
</div>
|
||
}
|
||
@for (note of m.notas; track $index) { <p class="note">{{ note }}</p> }
|
||
<details class="published-values"><summary>Valores publicados</summary>
|
||
<div class="table-scroll" role="region" aria-label="Tabla de contingencia de citología y biopsia" tabindex="0">
|
||
<table><caption>Tabla de contingencia de mujeres, {{ m.periodo }}</caption>
|
||
<thead><tr><th scope="col">Citología</th>@for (g of m.grados; track g.id) { <th scope="col">{{ g.etiqueta }}</th> }<th scope="col">Con biopsia</th>@for (a of m.aparte; track a.id) { <th scope="col">{{ a.etiqueta }}</th> }</tr></thead>
|
||
<tbody>@for (fila of m.filas; track fila.id) {
|
||
<tr><th scope="row">{{ fila.etiqueta }}</th>@for (g of m.grados; track g.id) { <td>{{ cellText(fila.celdas[g.id]) }}</td> }<td>{{ denText(fila.den, fila.estado) }}</td>@for (a of m.aparte; track a.id) { <td>{{ cellText(fila.aparte[a.id]) }}</td> }</tr>
|
||
}</tbody>
|
||
</table>
|
||
</div>
|
||
</details>
|
||
}
|
||
}
|
||
</section>
|