Indicadores TEA: Resumen, Trazabilidad, Seguimiento, Análisis de riesgo, periodicities
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component, computed, inject, input, resource } from '@angular/core';
|
||||
import { toSignal } from '@angular/core/rxjs-interop';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import type { Measure } from 'fhir/r4';
|
||||
import { DOMAINS } from '../app';
|
||||
@@ -38,8 +40,13 @@ import { TabTrazabilidad } from './tab-trazabilidad';
|
||||
} @else if (!measures.value()?.length) {
|
||||
<p class="muted empty">Este dominio todavía no tiene indicadores publicados.</p>
|
||||
} @else {
|
||||
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="center" animationDuration="0ms">
|
||||
<mat-tab label="Indicadores">
|
||||
<mat-tab-group
|
||||
mat-stretch-tabs="false"
|
||||
mat-align-tabs="center"
|
||||
animationDuration="0ms"
|
||||
[selectedIndex]="seguimiento() ? 2 : 0"
|
||||
>
|
||||
<mat-tab [label]="domain() === 'tea' ? 'Resumen' : 'Indicadores'">
|
||||
<app-tab-indicadores [domain]="domain()" [measures]="measures.value()!" />
|
||||
</mat-tab>
|
||||
<mat-tab label="Trazabilidad">
|
||||
@@ -47,7 +54,18 @@ import { TabTrazabilidad } from './tab-trazabilidad';
|
||||
<app-tab-trazabilidad [domain]="domain()" [measures]="measures.value()!" />
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
@if (domain() === 'cacu') {
|
||||
@if (domain() === 'tea') {
|
||||
<mat-tab label="Seguimiento">
|
||||
<ng-template matTabContent>
|
||||
<app-tab-seguimiento [domain]="domain()" [patientId]="seguimiento()" />
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Análisis de riesgo">
|
||||
<ng-template matTabContent>
|
||||
<app-tab-riesgos [domain]="domain()" />
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
} @else if (domain() === 'cacu') {
|
||||
<mat-tab label="Análisis de riesgos">
|
||||
<ng-template matTabContent>
|
||||
<app-tab-riesgos [domain]="domain()" />
|
||||
@@ -62,7 +80,7 @@ import { TabTrazabilidad } from './tab-trazabilidad';
|
||||
}
|
||||
<mat-tab label="Datos y definiciones">
|
||||
<ng-template matTabContent>
|
||||
<app-tab-definiciones [measures]="measures.value()!" />
|
||||
<app-tab-definiciones [domain]="domain()" [measures]="measures.value()!" />
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
@@ -97,6 +115,10 @@ import { TabTrazabilidad } from './tab-trazabilidad';
|
||||
export class Indicadores {
|
||||
private readonly fhir = inject(Fhir);
|
||||
readonly domain = input.required<string>();
|
||||
private readonly query = toSignal(inject(ActivatedRoute).queryParamMap);
|
||||
protected readonly seguimiento = computed(() =>
|
||||
this.domain() === 'tea' ? (this.query()?.get('seguimiento') ?? undefined) : undefined,
|
||||
);
|
||||
protected readonly title = computed(
|
||||
() => DOMAINS[this.domain() as keyof typeof DOMAINS] ?? this.domain(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user