63 lines
2.2 KiB
TypeScript
63 lines
2.2 KiB
TypeScript
import { Component, input } from '@angular/core';
|
|
import { MatCardModule } from '@angular/material/card';
|
|
import { ANTECEDENTS } from './record-groups';
|
|
|
|
/** CaCu: what each cytology's form declares of her (the one she was opened at first), by day.
|
|
* Statements of the form, not confirmed diagnoses. */
|
|
@Component({
|
|
selector: 'app-antecedents',
|
|
imports: [MatCardModule],
|
|
template: `
|
|
<mat-card appearance="outlined" 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 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>
|
|
<h3>Citología cervical · toma {{ forms()[0].date }}</h3>
|
|
<dl class="facts">
|
|
@for (a of antecedents; track a.field) {
|
|
<div>
|
|
<dt>{{ a.title }}</dt>
|
|
<dd>{{ forms()[0].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>
|
|
`,
|
|
styleUrl: './paciente.scss',
|
|
})
|
|
export class Antecedents {
|
|
readonly forms = input.required<{ date: string; values: Record<string, string> }[]>();
|
|
protected readonly antecedents = ANTECEDENTS;
|
|
}
|