Mostrar solo el criterio de exclusión y anotar que el tamizaje es el actual

This commit is contained in:
2026-12-04 16:02:40 -06:00
parent f6dffb6dc2
commit c28cf31e2a
2 changed files with 67 additions and 58 deletions
+61 -58
View File
@@ -131,6 +131,9 @@
@if (saveError()) { @if (saveError()) {
<p class="muted" role="alert">{{ saveError() }}</p> <p class="muted" role="alert">{{ saveError() }}</p>
} }
<p class="muted route-note">
Los pasos muestran el tamizaje actual, en curso: el de la citología que se consulta.
</p>
<div data-section="etapas"> <div data-section="etapas">
<app-stages [stages]="s" [detail]="true" /> <app-stages [stages]="s" [detail]="true" />
</div> </div>
@@ -258,69 +261,69 @@
</mat-card> </mat-card>
} }
@if ( @if (excluded() || groups().length || domain() !== 'cacu' || riskModels().length) {
riskExclusion() || withheld() || groups().length || domain() !== 'cacu' || riskModels().length
) {
<mat-card appearance="outlined" class="wide" data-section="riesgos"> <mat-card appearance="outlined" class="wide" data-section="riesgos">
@if (excluded(); as reason) {
<mat-card-header>
<mat-card-title>Sin estimación de riesgo: criterio de exclusión</mat-card-title>
</mat-card-header>
}
<mat-card-content> <mat-card-content>
@if (withheld(); as why) { @if (excluded(); as reason) {
<p role="status" data-state="withheld">{{ why }}</p> <p role="status" data-state="excluded">{{ reason }}</p>
}
@if (riskExclusion(); as reason) {
<p role="status">{{ reason }}</p>
} @else { } @else {
<app-risk-scales [groups]="groups()" /> <app-risk-scales [groups]="groups()" />
} @if (riskModels().length) {
@if (riskModels().length) { <details data-section="modelos">
<details data-section="modelos"> <summary>Modelos y valores</summary>
<summary>Modelos y valores</summary> <table class="plain">
<table class="plain"> <thead>
<thead> <tr>
<tr> <th>Modelo</th>
<th>Modelo</th> <th>Fecha índice</th>
<th>Fecha índice</th> <th>Horizonte</th>
<th>Horizonte</th> <th>Probabilidad</th>
<th>Probabilidad</th> <th>IC 95 %</th>
<th>IC 95 %</th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> @for (m of riskModels(); track m.model) {
@for (m of riskModels(); track m.model) { @for (p of m.predictions; track p.years) {
@for (p of m.predictions; track p.years) { <tr>
<tr> <td>{{ $first ? m.text : '' }}</td>
<td>{{ $first ? m.text : '' }}</td> <td>{{ $first ? m.index : '' }}</td>
<td>{{ $first ? m.index : '' }}</td> <td>{{ p.years }} {{ p.years === 1 ? 'año' : 'años' }}</td>
<td>{{ p.years }} {{ p.years === 1 ? 'año' : 'años' }}</td> <td>{{ p.p * 100 | number: '1.1-2' }} %</td>
<td>{{ p.p * 100 | number: '1.1-2' }} %</td> <td>
<td> @if (p.low !== undefined) {
@if (p.low !== undefined) { {{ p.low * 100 | number: '1.1-2' }}–{{
{{ p.low * 100 | number: '1.1-2' }}–{{ p.high! * 100 | number: '1.1-2'
p.high! * 100 | number: '1.1-2' }}
}} %
% } @else {
} @else { —
— }
} </td>
</td> </tr>
</tr> }
} }
} </tbody>
</tbody> </table>
</table> </details>
</details> }
} @if (riskModels().length || hasCurves()) {
@if (!riskExclusion() && (riskModels().length || riskSeries.value()?.length)) { <details class="curves" open data-section="curvas">
<details class="curves" open data-section="curvas"> <summary>Curvas de probabilidad con su intervalo</summary>
<summary>Curvas de probabilidad con su intervalo</summary> @if (hasCurves()) {
@if (riskSeries.value()?.length) { <app-risk-series [series]="riskSeries.value()!" />
<app-risk-series [series]="riskSeries.value()!" /> } @else {
} @else { <app-plot [figure]="curve()" [height]="300" [toolbar]="false" />
<app-plot [figure]="curve()" [height]="300" [toolbar]="false" /> }
} </details>
</details> }
} @if (!riskModels().length) {
@if (!riskModels().length && !riskExclusion()) { <p class="muted">Sin evaluación de un modelo en producción.</p>
<p class="muted">Sin evaluación de un modelo en producción.</p> }
} }
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
+6
View File
@@ -202,6 +202,12 @@ export class Paciente {
const patient = this.patient(); const patient = this.patient();
return patient ? ext(patient, 'risk-withheld')?.valueString : undefined; return patient ? ext(patient, 'risk-withheld')?.valueString : undefined;
}); });
/** The one criterion she does not meet: nothing else of her risk is then shown. */
protected readonly excluded = computed(() => this.withheld() ?? this.riskExclusion());
/** Whether any published series has a point to draw. */
protected readonly hasCurves = computed(
() => this.riskSeries.value()?.some((s) => s.points.length > 0) ?? false,
);
/** CaCu: the route of the cytology she was opened at, else of her latest, by the cut-off. */ /** CaCu: the route of the cytology she was opened at, else of her latest, by the cut-off. */
protected readonly stages = computed(() => { protected readonly stages = computed(() => {
const cytologies = (this.data.value()?.reports ?? []).filter( const cytologies = (this.data.value()?.reports ?? []).filter(