70 lines
7.9 KiB
HTML
70 lines
7.9 KiB
HTML
<section class="dashboard">
|
|
<header><h1>Trastorno del espectro autista</h1><p>Explora los indicadores de trastorno del espectro autista.</p></header>
|
|
<nav class="domain-nav" aria-label="Dominios de indicadores"><a routerLink="/indicadores/cacu">Cáncer cervicouterino</a><a routerLink="/indicadores/cama">Cáncer de mama</a><a routerLink="/indicadores/tea" aria-current="page">Trastorno del espectro autista</a></nav>
|
|
<nav class="tabs" aria-label="Secciones de trastorno del espectro autista">
|
|
<button type="button" [attr.aria-current]="section() === 'resumen' ? 'page' : null" (click)="changeSection('resumen')">Indicadores</button>
|
|
<button type="button" [attr.aria-current]="section() === 'historico' ? 'page' : null" (click)="changeSection('historico')">Trazabilidad</button>
|
|
<button type="button" [attr.aria-current]="section() === 'seguimiento' ? 'page' : null" (click)="changeSection('seguimiento')">Análisis de Riesgo</button>
|
|
</nav>
|
|
@if (section() !== 'seguimiento') {
|
|
<section aria-label="Consulta de indicadores">
|
|
<h2>{{ section() === 'resumen' ? 'Indicadores' : 'Trazabilidad' }}</h2>
|
|
<form (ngSubmit)="section() === 'resumen' ? loadSummary() : loadHistory()">
|
|
@if (section() === 'resumen') { <label>Periodo <input name="periodo" [(ngModel)]="periodo" required placeholder="2025-S1"></label> }
|
|
@else {
|
|
<label>Indicador <select name="measure" [(ngModel)]="measureId">@for (m of measures(); track m.id) { <option [value]="m.id">{{ m.title }}</option> }</select></label>
|
|
<label>Periodos separados por coma <input name="history" [(ngModel)]="historyPeriods" required></label>
|
|
}
|
|
<label>Corte de evento <input name="evento" type="date" [(ngModel)]="eventCutoff"></label>
|
|
<label>Corte de conocimiento <input name="conocimiento" type="datetime-local" [(ngModel)]="knowledgeCutoff"></label>
|
|
<button type="submit">Consultar</button>
|
|
</form>
|
|
@if (measureState() === 'cargando' || measureState() === 'inicial') { <p role="status">Consultando indicadores…</p> }
|
|
@if (measureState() === 'error') { <p role="alert">{{ measureError() }}</p> }
|
|
@if (measureState() === 'listo' && reports().length === 0) { <p>No hay indicadores para la selección.</p> }
|
|
@for (report of reports(); track $index) {
|
|
@if (measureState() === 'listo') { <article class="card"><h3>{{ title(report) }}</h3><p>{{ report.period?.start }} a {{ report.period?.end }}</p>
|
|
@if (rows(report).length === 0) { <p>Sin datos para el periodo.</p> }
|
|
@else { <dl>@for (row of rows(report); track $index) { <div><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div> }</dl> }
|
|
</article> }
|
|
}
|
|
</section>
|
|
}
|
|
<section [hidden]="section() !== 'seguimiento' || selected() !== null" aria-label="Análisis de Riesgo">
|
|
<h2>Análisis de Riesgo</h2><p>Consulte los episodios según la fecha de corte y los filtros seleccionados.</p>
|
|
<form (ngSubmit)="applyFilters()" class="filters">
|
|
<label>Desde <input type="date" name="desde" [(ngModel)]="filters.since"></label><label>Fecha de corte <input type="date" name="corte" [(ngModel)]="filters.cutoff"></label>
|
|
<label>Estado <select name="status" [(ngModel)]="filters.status"><option value="">Todos</option><option value="active">En seguimiento</option><option value="finished">Finalizado</option></select></label>
|
|
<label>Etapa <select name="stage" [(ngModel)]="filters.stage"><option value="">Todas</option><option value="SOLO_MCHAT">Solo M-CHAT</option><option value="PSICOLOGIA">Psicología</option><option value="NEUROPEDIATRIA">Neuropediatría</option><option value="EEG">EEG</option></select></label>
|
|
<label>Etapa desde <input type="date" name="stageFrom" [(ngModel)]="filters.stageFrom"></label><label>Etapa hasta <input type="date" name="stageTo" [(ngModel)]="filters.stageTo"></label>
|
|
<label>Edad al M-CHAT <select name="age" [(ngModel)]="filters.age"><option value="">Todas</option><option value="16_23">16 a 23 meses</option><option value="24_29">24 a 29 meses</option><option value="30_36">30 a 36 meses</option></select></label>
|
|
<label>M-CHAT mínimo <input type="number" name="mchatMin" [(ngModel)]="filters.mchatMin"></label><label>M-CHAT máximo <input type="number" name="mchatMax" [(ngModel)]="filters.mchatMax"></label>
|
|
<label>CSS mínimo <input type="number" name="cssMin" [(ngModel)]="filters.cssMin"></label><label>CSS máximo <input type="number" name="cssMax" [(ngModel)]="filters.cssMax"></label>
|
|
<label>Estatus de EEG <select name="eeg" [(ngModel)]="filters.eeg"><option value="">Todos</option>@if (alterationsAvailable()) { <option value="normal">Normal</option><option value="anormal">Anormal</option> } @else { <option value="valido">Con EEG válido</option> }<option value="sin-eeg-valido">Sin EEG válido</option></select></label>
|
|
@if (alterationsAvailable() && alterationTypes().length) { <label>Alteración <select name="alteration" [(ngModel)]="filters.alteration"><option value="">Todas</option>@for (item of alterationTypes(); track item.code) { <option [value]="item.code">{{ item.display }}</option> }</select></label> }
|
|
<button type="submit">Aplicar filtros</button>
|
|
</form>
|
|
@if (episodeState() === 'cargando') { <p role="status">Consultando seguimiento…</p> }
|
|
@if (episodeState() === 'error') { <p role="alert">{{ episodeError() }}</p> }
|
|
@if (episodeState() === 'listo') {
|
|
<p>{{ episodeTotal() }} episodios</p>
|
|
@if (episodes().length === 0) { <p>No hay episodios para la selección.</p> }
|
|
@else { <table><thead><tr><th>Paciente</th><th>Etapa</th><th>Fecha de etapa</th><th>Estado</th><th></th></tr></thead><tbody>
|
|
@for (e of episodes(); track e.id) { <tr><td>{{ patientId(e) }}</td><td>{{ stage(e) }}</td><td>{{ stageDate(e) }}</td><td>{{ e.status === 'finished' ? 'Finalizado' : 'En seguimiento' }}</td><td><button type="button" [attr.data-patient]="patientId(e)" (click)="openPatient(e)">Abrir ficha</button></td></tr> }
|
|
</tbody></table> }
|
|
<div class="paging"><button type="button" [disabled]="page === 0" (click)="page = page - 1; loadEpisodes()">Anterior</button><span>Página {{ page + 1 }}</span><button type="button" [disabled]="(page + 1) * pageSize >= episodeTotal()" (click)="page = page + 1; loadEpisodes()">Siguiente</button></div>
|
|
}
|
|
</section>
|
|
@if (section() === 'seguimiento' && selected()) {
|
|
<section aria-label="Ficha del paciente"><button type="button" (click)="back()">Volver a Análisis de Riesgo</button><h2>Ficha del paciente</h2><p>{{ selected() }}</p><p>La ficha muestra la información disponible a la fecha actual.</p>
|
|
@if (patientState() === 'cargando') { <p role="status">Consultando ficha…</p> }
|
|
@if (patientState() === 'error') { <p role="alert">{{ patientError() }}</p> }
|
|
@if (patientState() === 'listo') {
|
|
<article class="card"><h3>ADOS-2</h3>@if (ados(); as ados) { <p>Fecha: {{ ados.effectiveDateTime }}</p><dl>@for (c of ados.component; track $index) { <div><dt>{{ c.code.coding?.[0]?.display || c.code.coding?.[0]?.code }}</dt><dd>{{ componentValue(c) }}</dd></div> }</dl> } @else { <p>Sin información de ADOS-2.</p> }</article>
|
|
<article class="card"><h3>EEG del estudio</h3>@if (eeg(); as eeg) { <p>Fecha: {{ eeg.effectiveDateTime }}</p><p>Calidad: {{ eegQuality() }}</p><p>Duración: {{ eegExtension('duracion-min') }} minutos. Canales: {{ eegExtension('canales') }}.</p>@if (eeg.conclusion) { <p>{{ eeg.conclusion }}</p> }<dl>@for (o of quality(); track o.id) { <div><dt>{{ o.code.coding?.[0]?.display }}@if (electrode(o); as e) { · {{ e }} }</dt><dd>{{ observationValue(o) }} ({{ qualityStatus(o) }})</dd></div> }</dl> } @else { <p>Sin información de EEG.</p> }</article>
|
|
@if (alterationsAvailable() && alterations().length) { <article class="card"><h3>Métricas del EEG</h3><dl>@for (o of alterations(); track o.id) { <div><dt>{{ o.code.coding?.[0]?.display }}</dt><dd>{{ observationValue(o) }}</dd></div> }</dl></article> }
|
|
}
|
|
</section>
|
|
}
|
|
</section>
|