260 lines
9.1 KiB
HTML
260 lines
9.1 KiB
HTML
<section class="page">
|
||
<a mat-button [routerLink]="['/indicadores', domain()]"
|
||
><mat-icon>arrow_back</mat-icon> Regresar</a
|
||
>
|
||
@if (error()) {
|
||
<p class="muted" role="alert">No se encontró la paciente.</p>
|
||
} @else if (patient(); as p) {
|
||
<h1>
|
||
{{ identity().name ?? 'Paciente' }} <code class="muted">{{ p.id!.slice(0, 10) }}</code>
|
||
</h1>
|
||
<dl class="summary">
|
||
<div>
|
||
<dt>CURP</dt>
|
||
<dd>{{ identity().curp ?? 'Sin dato' }}</dd>
|
||
</div>
|
||
<div>
|
||
<dt>Expedientes</dt>
|
||
<dd>{{ identity().numbers.join(', ') || 'Sin dato' }}</dd>
|
||
</div>
|
||
<div>
|
||
<dt>Fecha de nacimiento</dt>
|
||
<dd>{{ p.birthDate ?? 'Sin dato' }}</dd>
|
||
</div>
|
||
<div>
|
||
<dt>Sexo</dt>
|
||
<dd>
|
||
{{ p.gender === 'female' ? 'Femenino' : p.gender === 'male' ? 'Masculino' : 'Sin dato' }}
|
||
</dd>
|
||
</div>
|
||
<div>
|
||
<dt>Estatus de seguimiento</dt>
|
||
<dd>{{ status() }}</dd>
|
||
</div>
|
||
@if (p.deceasedDateTime) {
|
||
<div>
|
||
<dt>Defunción</dt>
|
||
<dd>{{ p.deceasedDateTime }}</dd>
|
||
</div>
|
||
}
|
||
</dl>
|
||
|
||
<div class="cards">
|
||
<mat-card appearance="outlined">
|
||
<mat-card-header><mat-card-title>Historial médico</mat-card-title></mat-card-header>
|
||
<mat-card-content>
|
||
<table class="plain">
|
||
<thead>
|
||
<tr>
|
||
<th>Fecha</th>
|
||
<th>Tipo</th>
|
||
<th>Detalle</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@for (h of history(); track $index) {
|
||
<tr>
|
||
<td class="nowrap">{{ h.date }}</td>
|
||
<td>{{ h.kind }}</td>
|
||
<td>
|
||
{{ h.text }}
|
||
@if (h.code && h.code !== h.text) {
|
||
<span class="muted">({{ h.code }})</span>
|
||
}
|
||
</td>
|
||
</tr>
|
||
} @empty {
|
||
<tr>
|
||
<td colspan="3" class="muted">Sin registros.</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</mat-card-content>
|
||
</mat-card>
|
||
|
||
<mat-card appearance="outlined">
|
||
<mat-card-header><mat-card-title>Pruebas y resultados</mat-card-title></mat-card-header>
|
||
<mat-card-content>
|
||
<table class="plain">
|
||
<thead>
|
||
<tr>
|
||
<th>Toma</th>
|
||
<th>Estudio</th>
|
||
<th>Reporte</th>
|
||
<th>Resultados</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@for (t of tests(); track $index) {
|
||
<tr>
|
||
<td class="nowrap">{{ t.date }}</td>
|
||
<td>{{ t.kind }}</td>
|
||
<td class="nowrap">{{ t.reported ?? 'Pendiente' }}</td>
|
||
<td>{{ t.results.join(' · ') || '—' }}</td>
|
||
</tr>
|
||
} @empty {
|
||
<tr>
|
||
<td colspan="4" class="muted">Sin estudios.</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</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>
|
||
@if (models().length) {
|
||
<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 models(); 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>
|
||
<app-plot [figure]="curve()" [height]="300" />
|
||
} @else {
|
||
<p class="muted">Ningún modelo vigente la ha evaluado.</p>
|
||
}
|
||
</mat-card-content>
|
||
</mat-card>
|
||
|
||
@if (domain() === 'tea') {
|
||
<mat-card appearance="outlined" class="wide" data-section="tea">
|
||
<mat-card-header><mat-card-title>ADOS-2</mat-card-title></mat-card-header>
|
||
<mat-card-content>
|
||
@if (ados2(); as a) {
|
||
<h3>Puntajes por reactivo · {{ a.date }}</h3>
|
||
<app-plot [figure]="a.figure" [height]="a.height" />
|
||
<p class="totals">
|
||
@for (t of a.totals; track t.label) {
|
||
<span
|
||
>{{ t.label }}: <strong>{{ t.value }}</strong></span
|
||
>
|
||
}
|
||
</p>
|
||
} @else {
|
||
<p class="muted">Sin evaluación ADOS-2.</p>
|
||
}
|
||
</mat-card-content>
|
||
</mat-card>
|
||
|
||
<mat-card appearance="outlined" class="wide" data-section="eeg">
|
||
<mat-card-header><mat-card-title>EEG</mat-card-title></mat-card-header>
|
||
<mat-card-content>
|
||
@if (eeg.isLoading()) {
|
||
<app-loading what="el EEG" />
|
||
} @else if (eeg.value()?.study; as st) {
|
||
<h3>Calidad del EEG</h3>
|
||
<p>
|
||
Estudio del {{ st.study_date }}:
|
||
<strong>{{ st.valid ? 'aceptable para el análisis' : 'no aceptable' }}</strong>
|
||
@if (st.level) {
|
||
({{ st.level }})
|
||
}
|
||
</p>
|
||
<h3>Alteraciones del EEG</h3>
|
||
@if (!st.valid) {
|
||
<p class="muted">Un EEG no aceptable no se compara con la norma por edad.</p>
|
||
} @else if (!scored()) {
|
||
<p class="muted">
|
||
Ninguna curva por edad vigente ha evaluado este EEG (se promueven en Gobernanza).
|
||
</p>
|
||
} @else if (alterations().length) {
|
||
<table class="plain">
|
||
<thead>
|
||
<tr>
|
||
<th>Métrica</th>
|
||
<th>Valor</th>
|
||
<th>Norma por edad (P5–P95)</th>
|
||
<th>Mediana</th>
|
||
<th>Desviación (z)</th>
|
||
<th>Detalle</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@for (m of alterations(); track m.code) {
|
||
<tr>
|
||
<td>{{ m.code }}</td>
|
||
<td>{{ m.value | number: '1.0-3' }}</td>
|
||
<td>{{ m.p5 | number: '1.0-3' }} – {{ m.p95 | number: '1.0-3' }}</td>
|
||
<td>{{ m.median | number: '1.0-3' }}</td>
|
||
<td>{{ m.z | number: '1.1-2' }}</td>
|
||
<td>{{ m.outside! > 0 ? 'Aumentado' : 'Disminuido' }}</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
} @else {
|
||
<p>Sin alteraciones: todas sus métricas están dentro de la norma por edad.</p>
|
||
}
|
||
} @else {
|
||
<p class="muted">Sin EEG analizado.</p>
|
||
}
|
||
</mat-card-content>
|
||
</mat-card>
|
||
}
|
||
|
||
@if (models().some((m) => m.scenarios.length)) {
|
||
<mat-card appearance="outlined" class="wide" data-section="supervivencia">
|
||
<mat-card-header
|
||
><mat-card-title>Análisis de supervivencia</mat-card-title></mat-card-header
|
||
>
|
||
<mat-card-content>
|
||
@if (survival.isLoading()) {
|
||
<app-loading what="las curvas de supervivencia" [figure]="true" />
|
||
} @else if (survival.value(); as s) {
|
||
<h3>Escenario clínico de la paciente</h3>
|
||
<ul class="scenarios">
|
||
@for (name of s.scenarios; track name) {
|
||
<li>{{ name }}</li>
|
||
}
|
||
</ul>
|
||
@for (f of s.figures; track f.title) {
|
||
<h4>{{ f.title }}</h4>
|
||
<app-plot [figure]="f.figure" [height]="340" />
|
||
} @empty {
|
||
<p class="muted">
|
||
Sus escenarios tienen menos fallecimientos de los necesarios para trazar curvas.
|
||
</p>
|
||
}
|
||
} @else if (survival.error()) {
|
||
<p class="muted" role="alert">No se pudo leer el informe del modelo.</p>
|
||
}
|
||
</mat-card-content>
|
||
</mat-card>
|
||
}
|
||
</div>
|
||
} @else if (loading()) {
|
||
<app-loading what="el expediente" />
|
||
}
|
||
</section>
|