Indicators: CaCu and CaMa pages read by rounds, genotypes and steps; history to a chosen period; NCI and indicator references; CaMa follow-up export; API client for eligibility and risk series
This commit is contained in:
+57
-10
@@ -15,20 +15,33 @@ test('indicadores cacu: its sections in order, each card read one mode at a time
|
||||
const headings = await tab
|
||||
.locator('h2, app-readings h3')
|
||||
.evaluateAll((els) => els.map((e) => (e as HTMLElement).innerText.trim()));
|
||||
expect(headings.slice(headings.indexOf('Indicadores de oportunidad'))).toEqual([
|
||||
'Indicadores de oportunidad',
|
||||
'Tiempos de la ruta del tamizaje',
|
||||
expect(headings.slice(headings.indexOf('Indicadores clínicos'))).toEqual([
|
||||
'Indicadores clínicos',
|
||||
'Resultados de citología, VPH y biopsia',
|
||||
'Distribución de resultados citológicos',
|
||||
'Resultados de VPH por genotipo',
|
||||
'Resultados de biopsia cervical',
|
||||
'Pacientes evaluadas por resultado de VPH',
|
||||
'Tasa de confirmación histopatológica',
|
||||
'Valor predictivo positivo de la colposcopía',
|
||||
'Tasa de confirmación histopatológica de referencia a colposcopía',
|
||||
'Indicadores de oportunidad',
|
||||
'Tiempos de tamizaje',
|
||||
]);
|
||||
const route = tab.locator('app-readings').first();
|
||||
for (const mode of ['Por pasos', 'Por CIE-10', 'Acumulado desde la toma']) {
|
||||
// one selector reads both the cytology and the HPV card by group
|
||||
await tab.getByRole('radio', { name: 'Por detección inicial y anterior' }).first().click();
|
||||
for (const card of ['Distribución de resultados citológicos', 'Resultados de VPH por genotipo'])
|
||||
await expect(
|
||||
tab
|
||||
.locator('app-readings', { has: page.getByRole('heading', { name: card }) })
|
||||
.locator('section.group')
|
||||
.first(),
|
||||
).toBeVisible();
|
||||
const route = tab.locator('app-readings').last();
|
||||
for (const mode of [
|
||||
'Por ventana de tiempo',
|
||||
'Diagnóstico precolposcópico',
|
||||
'Diagnóstico tras biopsia',
|
||||
'Acumulado desde la toma',
|
||||
]) {
|
||||
await route.getByRole('radio', { name: mode }).click();
|
||||
await expect(
|
||||
route.getByRole('table', { name: mode }).or(route.getByText('Sin datos en el periodo.')),
|
||||
@@ -36,14 +49,48 @@ test('indicadores cacu: its sections in order, each card read one mode at a time
|
||||
}
|
||||
await tab.getByRole('radio', { name: 'Biopsia', exact: true }).click();
|
||||
await expect(
|
||||
tab.getByRole('heading', { name: 'Valor predictivo positivo de la biopsia' }),
|
||||
tab.getByRole('heading', {
|
||||
name: 'Tasa de confirmación histopatológica de referencia a biopsia',
|
||||
}),
|
||||
).toBeVisible();
|
||||
await tab.getByRole('radio', { name: 'Solicitudes' }).click();
|
||||
});
|
||||
|
||||
test('indicadores cama: its sections in order, the route chained and the types by BI-RADS', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/indicadores/cama');
|
||||
const tab = page.locator('app-tab-indicadores');
|
||||
await expect(tab.getByRole('heading', { name: 'Indicadores clínicos' })).toBeVisible();
|
||||
await expect(tab.locator('app-loading')).toHaveCount(0, { timeout: 5 * 60_000 });
|
||||
const headings = await tab
|
||||
.locator('h2, h3')
|
||||
.evaluateAll((els) => els.map((e) => (e as HTMLElement).innerText.trim()));
|
||||
expect(headings.slice(headings.indexOf('Indicadores de oportunidad'))).toEqual([
|
||||
'Indicadores de oportunidad',
|
||||
'Pacientes evaluadas con BI-RADS 4, 5 o 6',
|
||||
'Tiempo de toma de mastografía a interpretación radiológica',
|
||||
'Tiempo de interpretación radiológica a diagnóstico',
|
||||
'Tiempo de interpretación radiológica a resultado de biopsia',
|
||||
'Tiempo de diagnóstico tras biopsia a tratamiento',
|
||||
'Tiempo de tamizaje a diagnóstico',
|
||||
'Tiempo de tamizaje a diagnóstico y tratamiento',
|
||||
'Indicadores clínicos',
|
||||
expect.stringMatching(/^Porcentaje de mastografías con resultado BI-RADS 4, 5 ó 6 en /),
|
||||
expect.stringMatching(/^Porcentaje de pacientes con resultados BI-RADS 4, 5 ó 6 en /),
|
||||
'Tipo histológico por categoría BI-RADS',
|
||||
'Confirmación histopatológica',
|
||||
]);
|
||||
const types = tab.locator('app-readings', {
|
||||
has: page.getByRole('heading', { name: 'Tipo histológico por categoría BI-RADS' }),
|
||||
});
|
||||
await expect(types.getByRole('columnheader', { name: '% maligno' })).toBeVisible();
|
||||
await tab.getByRole('radio', { name: 'Mastografías con biopsia' }).click();
|
||||
await expect(tab.getByRole('table', { name: 'Con y sin biopsia' })).toBeVisible();
|
||||
});
|
||||
|
||||
test('riesgos cacu: ages filter the whole list and a row opens its stages', async ({ page }) => {
|
||||
await page.goto('/indicadores/cacu');
|
||||
await page.getByRole('tab', { name: 'Análisis de riesgos' }).click();
|
||||
await page.getByRole('tab', { name: 'Análisis de Riesgo' }).click();
|
||||
const list = page.locator('table.worklist tbody tr');
|
||||
await expect(list.first().locator('app-stages li')).toHaveCount(5);
|
||||
await list.first().getByRole('button', { name: 'Detalle' }).click();
|
||||
|
||||
Reference in New Issue
Block a user