CaCu patient record and indicators: risk by follow-up status, screening route reading note, history panels #26
@@ -53,14 +53,11 @@ describe('Indicadores de CaCu: tiempos de oportunidad y figuras clínicas', () =
|
|||||||
'catalog-card: Tiempo de toma de muestra a diagnóstico']);
|
'catalog-card: Tiempo de toma de muestra a diagnóstico']);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('con la ruta del tamizaje la gráfica dibuja colposcopía y biopsia y no hay una segunda tarjeta ni una pendiente', () => {
|
it('con la ruta del tamizaje no hay subsección «Tiempo de tamizaje a diagnóstico»: la gráfica dibuja los tiempos', () => {
|
||||||
// Fails if the measures only the route chart draws get a card (or a «pendiente» slot) next to it, which the route
|
// Fails if the times the route chart draws also get a figure or a «pendiente» slot of their own next to it.
|
||||||
// chart's own page spec forbids.
|
|
||||||
abrir([...CACU, ...RUTA]);
|
abrir([...CACU, ...RUTA]);
|
||||||
expect(titulos('.kpi-section .catalog-grid')).toEqual([
|
expect(root().querySelector('.subsection-title')).toBeNull();
|
||||||
'catalog-card: Tiempo de toma de muestra a resultado de citología',
|
expect(titulos('.kpi-section .catalog-grid')).toEqual([]);
|
||||||
'figura-pendiente: Tiempo de toma de muestra a resultado de VPH',
|
|
||||||
'catalog-card: Tiempo de toma de muestra a diagnóstico']);
|
|
||||||
expect(root().querySelector('app-indicador-screening-route')).not.toBeNull();
|
expect(root().querySelector('app-indicador-screening-route')).not.toBeNull();
|
||||||
expect(titulos('.graphic-section .catalog-grid')).toEqual([
|
expect(titulos('.graphic-section .catalog-grid')).toEqual([
|
||||||
'catalog-card: Distribución de resultados citológicos', 'catalog-card: Tasa de confirmación histopatológica',
|
'catalog-card: Distribución de resultados citológicos', 'catalog-card: Tasa de confirmación histopatológica',
|
||||||
|
|||||||
@@ -400,8 +400,9 @@ export class IndicadoresPage {
|
|||||||
const selected = new Set(this.selectedIndicators());
|
const selected = new Set(this.selectedIndicators());
|
||||||
return { items: this.catalogOrder().filter(item => selected.has(item.id)) };
|
return { items: this.catalogOrder().filter(item => selected.has(item.id)) };
|
||||||
});
|
});
|
||||||
// The figures of «Indicadores de oportunidad»: TEA's time figures under its summary, and CaCu's five times, each a
|
// The figures of «Indicadores de oportunidad»: TEA's time figures under its summary and CaMa's times, each a pending
|
||||||
// pending slot while the catalog does not publish its indicator. The rest are the clinical ones.
|
// slot while the catalog does not publish its indicator; CaCu's, only when its screening route chart isn't shown. The
|
||||||
|
// rest are the clinical ones.
|
||||||
// The domain is not a signal: each result reads the items first, so a new catalog recomputes it whichever domain it was last for.
|
// The domain is not a signal: each result reads the items first, so a new catalog recomputes it whichever domain it was last for.
|
||||||
readonly oportunidadSlots = computed((): { item?: Indicador; titulo: string }[] => {
|
readonly oportunidadSlots = computed((): { item?: Indicador; titulo: string }[] => {
|
||||||
const items = this.searchResults().items;
|
const items = this.searchResults().items;
|
||||||
@@ -416,11 +417,10 @@ export class IndicadoresPage {
|
|||||||
return item ? { item: { ...item, titulo: figura.titulo }, titulo: figura.titulo } : { titulo: figura.titulo };
|
return item ? { item: { ...item, titulo: figura.titulo }, titulo: figura.titulo } : { titulo: figura.titulo };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.dominio !== 'cacu' || !this.catalog().length) return [];
|
// With the screening route chart, CaCu has no separate time figures: the chart shows every time from the sample to
|
||||||
// The screening route chart draws the measures only it uses (ROUTE_ONLY_IDS) and they get no card of their own while
|
// each event. Without it (the catalog lacks one of its measures) the times keep their figures.
|
||||||
// it is shown, so those slots are left to the chart instead of drawn twice or as pending.
|
if (this.dominio !== 'cacu' || !this.catalog().length || this.screeningRouteAvailable) return [];
|
||||||
const delaRuta = this.screeningRouteAvailable ? ROUTE_ONLY_IDS : [];
|
return CACU_FIGURAS_OPORTUNIDAD.map(figura => {
|
||||||
return CACU_FIGURAS_OPORTUNIDAD.filter(figura => !figura.id || !delaRuta.includes(figura.id)).map(figura => {
|
|
||||||
const item = figura.id ? items.find(candidate => candidate.id === figura.id) : undefined;
|
const item = figura.id ? items.find(candidate => candidate.id === figura.id) : undefined;
|
||||||
return item ? { item, titulo: item.titulo } : { titulo: figura.titulo };
|
return item ? { item, titulo: item.titulo } : { titulo: figura.titulo };
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ describe('Ruta del tamizaje: página de CaCu', () => {
|
|||||||
const ruta = () => fixture.nativeElement.querySelector('app-indicador-screening-route');
|
const ruta = () => fixture.nativeElement.querySelector('app-indicador-screening-route');
|
||||||
const tarjetas = () => fixture.debugElement.queryAll(By.directive(IndicadorCatalogCard)).map(d => (d.componentInstance as IndicadorCatalogCard).indicador.id);
|
const tarjetas = () => fixture.debugElement.queryAll(By.directive(IndicadorCatalogCard)).map(d => (d.componentInstance as IndicadorCatalogCard).indicador.id);
|
||||||
|
|
||||||
it('con las siete medidas publicadas aparece la gráfica y sus medidas exclusivas no tienen tarjeta', () => {
|
it('con las siete medidas publicadas aparece la gráfica y ninguna de sus medidas tiene tarjeta', () => {
|
||||||
// Pins down: the chart replaces the cards of the five measures only it draws, while the cytology's and the diagnosis'
|
// Pins down: the chart replaces the cards of every time it draws, the cytology's and the diagnosis' included (the
|
||||||
// keep theirs. Fails if the chart stops appearing, or a measure it draws also shows as a card.
|
// «Tiempo de tamizaje a diagnóstico» figures). Fails if the chart stops appearing, or a time it draws also shows as
|
||||||
|
// a card.
|
||||||
abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.map(id => item(id))]);
|
abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.map(id => item(id))]);
|
||||||
expect(ruta()).not.toBeNull();
|
expect(ruta()).not.toBeNull();
|
||||||
const ids = tarjetas();
|
const ids = tarjetas();
|
||||||
for (const id of ROUTE_ONLY_IDS) expect(ids).not.toContain(id);
|
for (const id of ROUTE_IDS) expect(ids).not.toContain(id);
|
||||||
expect(ids).toContain('cacu_eu_tiempo_reporte');
|
|
||||||
expect(ids).toContain('cacu_eu7');
|
expect(ids).toContain('cacu_eu7');
|
||||||
});
|
});
|
||||||
it('si el catálogo no publica alguna de las siete, no hay gráfica y las medidas conservan sus tarjetas', () => {
|
it('si el catálogo no publica alguna de las siete, no hay gráfica y las medidas conservan sus tarjetas', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user