CaCu record: stages with states and sources, segmented risk scales, antecedents and collapsible findings

This commit is contained in:
Angel Capetillo Zavala
2026-12-01 17:15:10 -06:00
parent e1e8da6093
commit 8fc06038fb
12 changed files with 1519 additions and 108 deletions
+85 -16
View File
@@ -107,23 +107,29 @@
</mat-card-content>
</mat-card>
}
@if (stages(); as s) {
<mat-card appearance="outlined" class="wide" data-section="etapas">
<mat-card-header><mat-card-title>Etapas del tamizaje</mat-card-title></mat-card-header>
<mat-card-content>
<app-stages [stages]="s" [detail]="true" />
<button mat-stroked-button type="button" [disabled]="saving()" (click)="save()">
Exportar PDF
</button>
@if (saveError()) {
<p class="muted" role="alert">{{ saveError() }}</p>
}
</mat-card-content>
</mat-card>
}
<mat-card appearance="outlined">
<mat-card-header><mat-card-title>Historial médico</mat-card-title></mat-card-header>
<mat-card-content>
@if (stages(); as s) {
<div class="export-actions">
<button mat-stroked-button type="button" [disabled]="saving()" (click)="save()">
Exportar PDF
</button>
</div>
@if (saveError()) {
<p class="muted" role="alert">{{ saveError() }}</p>
}
<div data-section="etapas">
<app-stages [stages]="s" [detail]="true" />
<p class="muted route-note">
Etapas de la citología{{ s[0].day ? ' del ' + s[0].day : '' }} a la fecha de corte
{{ cutoff() }}. «Inferida por fechas» es una asociación por cercanía de fechas, no
un vínculo clínico confirmado; un intervalo «(inferido)» depende de una etapa
inferida; «Pendiente» es una biopsia solicitada sin reporte a la fecha de corte;
«Sin dato» indica que no hay dato.
</p>
</div>
}
<table class="plain">
<thead>
<tr>
@@ -172,7 +178,19 @@
<td class="nowrap">{{ t.date }}</td>
<td>{{ t.kind }}</td>
<td class="nowrap">{{ t.reported ?? 'Pendiente' }}</td>
<td>{{ t.results.join(' · ') || '—' }}</td>
<td>
{{ t.results.join(' · ') || '—' }}
@if (t.findings.length) {
<details class="findings">
<summary>Hallazgos ({{ t.findings.length }})</summary>
<ul>
@for (f of t.findings; track $index) {
<li>{{ f }}</li>
}
</ul>
</details>
}
</td>
</tr>
} @empty {
<tr>
@@ -184,12 +202,63 @@
</mat-card-content>
</mat-card>
@if (forms().length) {
<mat-card appearance="outlined" class="wide" data-section="antecedentes">
<mat-card-header
><mat-card-title
>Antecedentes y evaluación ginecológica</mat-card-title
></mat-card-header
>
<mat-card-content>
<p class="muted route-note">
Datos declarados en el formulario de la citología: no son diagnósticos confirmados.
Cada dato pertenece al formulario de la toma que se indica.
</p>
@let f = forms()[0];
<h3>Citología cervical · toma {{ f.date }}</h3>
<dl class="facts">
@for (a of antecedents; track a.field) {
<div>
<dt>{{ a.title }}</dt>
<dd>{{ f.values[a.field] ?? 'No documentado' }}</dd>
</div>
}
</dl>
@if (forms().length > 1) {
<details class="findings">
<summary>Formularios anteriores ({{ forms().length - 1 }})</summary>
<table class="plain">
<thead>
<tr>
<th>Toma</th>
@for (a of antecedents; track a.field) {
<th>{{ a.title }}</th>
}
</tr>
</thead>
<tbody>
@for (o of forms().slice(1); track o.date) {
<tr>
<td class="nowrap">{{ o.date }}</td>
@for (a of antecedents; track a.field) {
<td>{{ o.values[a.field] ?? 'No documentado' }}</td>
}
</tr>
}
</tbody>
</table>
</details>
}
</mat-card-content>
</mat-card>
}
<mat-card appearance="outlined" class="wide">
<mat-card-header
><mat-card-title>Riesgos y recomendaciones</mat-card-title></mat-card-header
>
<mat-card-content>
<app-risk-scales [scales]="scales()" />
<app-risk-scales [groups]="groups()" />
@if (models().length) {
<table class="plain">
<thead>