89 lines
6.3 KiB
HTML
89 lines
6.3 KiB
HTML
<section class="confirmacion histo" aria-label="Resultado histopatológico por categoría BI-RADS">
|
||
<div class="histo-meta">
|
||
<p class="view-context">
|
||
<span>{{ intervalLabel }}</span>
|
||
@if (contextPeriod) { <span>Periodo {{ contextPeriod }}</span> }
|
||
</p>
|
||
<div class="help" (mouseenter)="showHelp()" (mouseleave)="hideHelp()" (focusin)="showHelp()" (focusout)="onHelpFocusOut($event)">
|
||
<button type="button" class="methodology-toggle" aria-label="Cómo leer" [attr.aria-expanded]="helpOpen" [attr.aria-describedby]="helpOpen ? 'histo-como-leer' : null" (click)="toggleHelp()"><span aria-hidden="true">!</span></button>
|
||
@if (helpOpen) {
|
||
<div class="methodology" id="histo-como-leer" role="tooltip">
|
||
<p>Cada punto es el porcentaje de pacientes de esa categoría BI-RADS cuyo resultado de biopsia pertenece a la selección, entre las que tienen resultado; la línea es su intervalo de confianza de 95 %. «Sin biopsia reportada» y «Sin dato» no entran en el denominador y se muestran aparte, en la tabla de valores publicados.</p>
|
||
@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>
|
||
}
|
||
}
|
||
</div>
|
||
}
|
||
</div>
|
||
</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 la histopatología por BI-RADS" /><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 histopatología por BI-RADS">
|
||
<button type="button" aria-label="Periodo anterior de la histopatología" [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 histopatología" [disabled]="periodIndex === periods.length - 1" (click)="changePeriod(1)">›</button>
|
||
</nav>
|
||
}
|
||
@if (model; as m) {
|
||
@if (status() === 'empty') { <p role="status">No hay pacientes con resultado de mastografía BI-RADS 4, 5 o 6 publicadas para este periodo.</p> }
|
||
@else {
|
||
<div class="legend">
|
||
<div class="tab-bar">
|
||
<div class="tabs" role="tablist" aria-label="Seleccionar resultado de biopsia">
|
||
@for (g of m.grupos; track g.id; let gi = $index) {
|
||
<button type="button" role="tab" class="tab" [id]="'histo-tab-' + g.id" [style.--swatch]="g.color" [attr.aria-selected]="selection?.grupo === g.id" [attr.aria-controls]="'histo-panel-' + g.id" (click)="select('grupos', gi)"><span class="swatch" aria-hidden="true"></span>{{ g.etiqueta }}</button>
|
||
}
|
||
</div>
|
||
</div>
|
||
<div class="child-groups">
|
||
@for (g of m.grupos; track g.id) {
|
||
<div class="tab-panel" role="group" [id]="'histo-panel-' + g.id" [attr.aria-labelledby]="'histo-tab-' + g.id">
|
||
@for (c of m.categorias; track c.id; let ci = $index) {
|
||
@if (c.grupo === g.id) {
|
||
<button type="button" class="child" [style.--swatch]="c.color" [attr.aria-pressed]="selection?.categoria === c.id" (click)="select('categorias', ci)"><span class="swatch" aria-hidden="true"></span>{{ c.etiqueta }}</button>
|
||
}
|
||
}
|
||
</div>
|
||
}
|
||
</div>
|
||
</div>
|
||
<div class="figures">
|
||
<section class="figure rates"><h3>Por categoría BI-RADS, {{ m.periodo }}</h3>
|
||
@if (ratesFigure) {
|
||
<app-plotly-chart [figure]="ratesFigure" [showNotes]="false" [label]="'Histopatología, tasas por categoría BI-RADS, ' + m.periodo + ', ' + selectionLabel" />
|
||
}
|
||
</section>
|
||
<section class="figure donut"><h3>Resultado de la biopsia, {{ m.periodo }}</h3>
|
||
@if (m.conResultado !== null && m.conResultado > 0 && donutFigure) {
|
||
<app-plotly-chart [figure]="donutFigure" [animated]="true" [showNotes]="false" [label]="'Histopatología, dona de resultados de la biopsia, ' + m.periodo + ', ' + selectionLabel" (plotClick)="plotClicked($event)" />
|
||
} @else { <p role="status">{{ m.conResultado === null ? 'Dona no disponible: hay celdas suprimidas o datos incompletos. No se calcula un total parcial.' : 'Sin pacientes con resultado de 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 pacientes por categoría BI-RADS y resultado de biopsia" tabindex="0">
|
||
<table><caption>Pacientes por categoría BI-RADS y resultado de la biopsia, {{ m.periodo }}</caption>
|
||
<thead><tr><th scope="col">Categoría BI-RADS</th>@for (c of m.categorias; track c.id) { <th scope="col">{{ c.etiqueta }}</th> }<th scope="col">Con resultado</th>@for (a of m.aparte; track a.id) { <th scope="col">{{ a.etiqueta }}</th> }<th scope="col">Total de pacientes</th></tr></thead>
|
||
<tbody>@for (fila of m.filas; track fila.id) {
|
||
<tr><th scope="row">{{ fila.etiqueta }}</th>@for (c of m.categorias; track c.id) { <td>{{ cellText(fila.celdas[c.id]) }}</td> }<td>{{ denText(fila.den, fila.estado) }}</td>@for (a of m.aparte; track a.id) { <td>{{ cellText(fila.aparte[a.id]) }}</td> }<td>{{ cellText(fila.total) }}</td></tr>
|
||
}</tbody>
|
||
</table>
|
||
</div>
|
||
</details>
|
||
}
|
||
}
|
||
</section>
|