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()) {
<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">
<app-stages [stages]="s" [detail]="true" />
</div>
@@ -258,69 +261,69 @@
</mat-card>
}
@if (
riskExclusion() || withheld() || groups().length || domain() !== 'cacu' || riskModels().length
) {
@if (excluded() || groups().length || domain() !== 'cacu' || riskModels().length) {
<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>
@if (withheld(); as why) {
<p role="status" data-state="withheld">{{ why }}</p>
}
@if (riskExclusion(); as reason) {
<p role="status">{{ reason }}</p>
@if (excluded(); as reason) {
<p role="status" data-state="excluded">{{ reason }}</p>
} @else {
<app-risk-scales [groups]="groups()" />
}
@if (riskModels().length) {
<details data-section="modelos">
<summary>Modelos y valores</summary>
<table class="plain">
<thead>
<tr>
<th>Modelo</th>
<th>Fecha índice</th>
<th>Horizonte</th>
<th>Probabilidad</th>
<th>IC 95 %</th>
</tr>
</thead>
<tbody>
@for (m of riskModels(); track m.model) {
@for (p of m.predictions; track p.years) {
<tr>
<td>{{ $first ? m.text : '' }}</td>
<td>{{ $first ? m.index : '' }}</td>
<td>{{ p.years }} {{ p.years === 1 ? 'año' : 'años' }}</td>
<td>{{ p.p * 100 | number: '1.1-2' }} %</td>
<td>
@if (p.low !== undefined) {
{{ p.low * 100 | number: '1.1-2' }}–{{
p.high! * 100 | number: '1.1-2'
}}
%
} @else {
—
}
</td>
</tr>
@if (riskModels().length) {
<details data-section="modelos">
<summary>Modelos y valores</summary>
<table class="plain">
<thead>
<tr>
<th>Modelo</th>
<th>Fecha índice</th>
<th>Horizonte</th>
<th>Probabilidad</th>
<th>IC 95 %</th>
</tr>
</thead>
<tbody>
@for (m of riskModels(); track m.model) {
@for (p of m.predictions; track p.years) {
<tr>
<td>{{ $first ? m.text : '' }}</td>
<td>{{ $first ? m.index : '' }}</td>
<td>{{ p.years }} {{ p.years === 1 ? 'año' : 'años' }}</td>
<td>{{ p.p * 100 | number: '1.1-2' }} %</td>
<td>
@if (p.low !== undefined) {
{{ p.low * 100 | number: '1.1-2' }}–{{
p.high! * 100 | number: '1.1-2'
}}
%
} @else {
—
}
</td>
</tr>
}
}
}
</tbody>
</table>
</details>
}
@if (!riskExclusion() && (riskModels().length || riskSeries.value()?.length)) {
<details class="curves" open data-section="curvas">
<summary>Curvas de probabilidad con su intervalo</summary>
@if (riskSeries.value()?.length) {
<app-risk-series [series]="riskSeries.value()!" />
} @else {
<app-plot [figure]="curve()" [height]="300" [toolbar]="false" />
}
</details>
}
@if (!riskModels().length && !riskExclusion()) {
<p class="muted">Sin evaluación de un modelo en producción.</p>
</tbody>
</table>
</details>
}
@if (riskModels().length || hasCurves()) {
<details class="curves" open data-section="curvas">
<summary>Curvas de probabilidad con su intervalo</summary>
@if (hasCurves()) {
<app-risk-series [series]="riskSeries.value()!" />
} @else {
<app-plot [figure]="curve()" [height]="300" [toolbar]="false" />
}
</details>
}
@if (!riskModels().length) {
<p class="muted">Sin evaluación de un modelo en producción.</p>
}
}
</mat-card-content>
</mat-card>
+6
View File
@@ -202,6 +202,12 @@ export class Paciente {
const patient = this.patient();
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. */
protected readonly stages = computed(() => {
const cytologies = (this.data.value()?.reports ?? []).filter(