Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62cdb252ca | |||
| 8f2906fe6f | |||
| e8628508d8 | |||
| f4d2a3e85f | |||
| 8c63ed83ac | |||
| e6e6fb7210 | |||
| 82efba35cb | |||
| 26fe1ccbb3 | |||
| 94c63c460c | |||
| 05a9967906 | |||
| 1c0bdf6184 | |||
| 51517ddf61 | |||
| 70aa739f97 | |||
| 394f2c626b | |||
| 644803cf21 | |||
| 8e9a40dec4 | |||
| 1bdec1b838 | |||
| 220d5b9d26 | |||
| fbfd97ec31 | |||
| 18692acc88 | |||
| 6c84dab730 | |||
| 12ce93f58c | |||
| dcaf1a8832 | |||
| 04d529392e | |||
| 6f3e7e22f9 | |||
| 12a0398903 | |||
| 03e51c07cc | |||
| e6be341ad9 | |||
| 85ec11ab0f | |||
| db9ab0d1a7 | |||
| af70d6f378 | |||
| 1940f4fa47 | |||
| ec406d5d2d | |||
| 7b82427713 | |||
| ec642df834 | |||
| 540506bde0 | |||
| d9245fe9b7 | |||
| 14fd765122 | |||
| 9639423a32 | |||
| 1fe88dfb45 | |||
| a30dbbb102 | |||
| 9cc67c0ef2 | |||
| 1eda9eea29 | |||
| 2cf3a5a40d | |||
| 30946823c4 | |||
| d946228319 | |||
| 8cb3c97b80 | |||
| 1fc23bd0bd | |||
| 11337679dc | |||
| 4685a91a7c | |||
| 69afcc7fdb | |||
| 9fcc65d84f | |||
| c4faa7d9f6 | |||
| 98d0614d80 | |||
| 35e1bc33d3 | |||
| f96fe97ed6 | |||
| fe9442237b | |||
| 61cdf5b72e | |||
| 37c4eacf84 | |||
| 41be0c343f | |||
| ecf2778f1a | |||
| 9c012e9bb4 | |||
| 91832cc6ff | |||
| ea91b31b17 | |||
| ae5e4c5db5 | |||
| b1c4b78f32 | |||
| a66205b725 | |||
| b0608fdc70 | |||
| 473a269bed | |||
| 3605d23fc0 |
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules/
|
||||||
dist
|
dist/
|
||||||
.angular
|
.angular/
|
||||||
|
.git/
|
||||||
|
|||||||
@@ -42,7 +42,3 @@ __screenshots__/
|
|||||||
# System files
|
# System files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
# Playwright
|
|
||||||
/test-results/
|
|
||||||
/playwright-report/
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
src/app/api/
|
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
|
||||||
|
"recommendations": ["angular.ng-template"]
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "ng serve",
|
||||||
|
"type": "chrome",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "npm: start",
|
||||||
|
"url": "http://localhost:4200/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ng test",
|
||||||
|
"type": "chrome",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "npm: test",
|
||||||
|
"url": "http://localhost:9876/debug.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+42
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "start",
|
||||||
|
"isBackground": true,
|
||||||
|
"problemMatcher": {
|
||||||
|
"owner": "typescript",
|
||||||
|
"pattern": "$tsc",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": true,
|
||||||
|
"beginsPattern": {
|
||||||
|
"regexp": "Changes detected"
|
||||||
|
},
|
||||||
|
"endsPattern": {
|
||||||
|
"regexp": "bundle generation (complete|failed)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "test",
|
||||||
|
"isBackground": true,
|
||||||
|
"problemMatcher": {
|
||||||
|
"owner": "typescript",
|
||||||
|
"pattern": "$tsc",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": true,
|
||||||
|
"beginsPattern": {
|
||||||
|
"regexp": "Changes detected"
|
||||||
|
},
|
||||||
|
"endsPattern": {
|
||||||
|
"regexp": "bundle generation (complete|failed)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+6
-4
@@ -1,10 +1,12 @@
|
|||||||
FROM node:24-alpine AS build
|
# Production image: the Angular build served by nginx, which proxies the API paths to `webapi`.
|
||||||
|
FROM node:22-slim AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npx ng build
|
RUN npx ng build --configuration production
|
||||||
|
|
||||||
FROM nginx:1.29-alpine
|
FROM nginx:1.27-alpine
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY --from=build /app/dist/webapp/browser /usr/share/nginx/html
|
COPY --from=build /app/dist/WebApp/browser /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# WebApp
|
||||||
|
|
||||||
|
Interfaz de ISSSTELEON en Angular y Angular Material: conexión e importación de
|
||||||
|
datos (`/conectar`), bitácora de cargas (`/bitacora`), gobernanza y tablero de
|
||||||
|
indicadores (`/indicadores`).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm ci
|
||||||
|
npx ng serve # http://localhost:4200
|
||||||
|
npx ng test --watch=false # pruebas unitarias (Vitest)
|
||||||
|
npx ng build # compilación de producción en dist/WebApp
|
||||||
|
```
|
||||||
|
|
||||||
|
`ng serve` envía las rutas de la API a WebApi en `localhost:5050`
|
||||||
|
(`proxy.conf.json`). La imagen de Docker (`Dockerfile`) sirve la compilación con
|
||||||
|
nginx (`nginx.conf`), que reenvía esas mismas rutas al servicio `webapi`.
|
||||||
+23
-18
@@ -2,11 +2,12 @@
|
|||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"cli": {
|
"cli": {
|
||||||
"packageManager": "npm"
|
"packageManager": "npm",
|
||||||
|
"analytics": false
|
||||||
},
|
},
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"webapp": {
|
"WebApp": {
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
@@ -30,17 +31,15 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"@fontsource/roboto/300.css",
|
"node_modules/@fontsource/roboto/300.css",
|
||||||
"@fontsource/roboto/400.css",
|
"node_modules/@fontsource/roboto/400.css",
|
||||||
"@fontsource/roboto/500.css",
|
"node_modules/@fontsource/roboto/500.css",
|
||||||
"@fontsource/roboto/700.css",
|
"node_modules/@fontsource/rajdhani/600.css",
|
||||||
"@fontsource/rajdhani/500.css",
|
"node_modules/@fontsource/rajdhani/700.css",
|
||||||
"@fontsource/rajdhani/600.css",
|
"node_modules/@fontsource/roboto-mono/400.css",
|
||||||
"material-symbols/outlined.css",
|
"node_modules/@fontsource/roboto-mono/600.css",
|
||||||
|
"node_modules/material-icons/iconfont/filled.css",
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
|
||||||
"allowedCommonJsDependencies": [
|
|
||||||
"plotly.js-cartesian-dist-min"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -48,13 +47,13 @@
|
|||||||
"budgets": [
|
"budgets": [
|
||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "600kB",
|
"maximumWarning": "500kB",
|
||||||
"maximumError": "1MB"
|
"maximumError": "1MB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
"maximumWarning": "4kB",
|
"maximumWarning": "6kB",
|
||||||
"maximumError": "8kB"
|
"maximumError": "10kB"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputHashing": "all"
|
"outputHashing": "all"
|
||||||
@@ -69,18 +68,24 @@
|
|||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular/build:dev-server",
|
"builder": "@angular/build:dev-server",
|
||||||
|
"options": {
|
||||||
|
"proxyConfig": "proxy.conf.json"
|
||||||
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"buildTarget": "webapp:build:production"
|
"buildTarget": "WebApp:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"buildTarget": "webapp:build:development"
|
"buildTarget": "WebApp:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"builder": "@angular/build:unit-test"
|
"builder": "@angular/build:unit-test",
|
||||||
|
"options": {
|
||||||
|
"isolate": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,338 +0,0 @@
|
|||||||
import { expect, type Locator, type Page, test } from '@playwright/test';
|
|
||||||
import { layoutProblems } from './layout';
|
|
||||||
import { type Simulation, simulateRounds } from './simulated-rounds';
|
|
||||||
|
|
||||||
test.beforeEach(async ({ page }) => {
|
|
||||||
const form = { username: 'admin@isssteleon.mx', password: 'solo-para-pruebas' };
|
|
||||||
expect((await page.request.post('/api/auth/login', { form })).status()).toBe(204);
|
|
||||||
});
|
|
||||||
|
|
||||||
const ROUND = { name: 'Por detección inicial y subsecuente' };
|
|
||||||
const VIEWS_LABEL = 'Lectura de la distribución citológica y del VPH por genotipo';
|
|
||||||
const VIEWS = ['General', 'Por grupo de edad', 'Por estatus de seguimiento', ROUND.name];
|
|
||||||
const TITLES = {
|
|
||||||
cytology: 'Distribución de resultados citológicos',
|
|
||||||
genotype: 'Resultados de VPH por genotipo',
|
|
||||||
biopsy: 'Resultados de biopsia cervical',
|
|
||||||
colposcopy: 'Valor predictivo positivo de la colposcopía',
|
|
||||||
ppvBiopsy: 'Valor predictivo positivo de la biopsia',
|
|
||||||
};
|
|
||||||
|
|
||||||
test('indicadores cacu: its sections in order, each card read one mode at a time', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
await page.goto('/indicadores/cacu');
|
|
||||||
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, 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',
|
|
||||||
'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',
|
|
||||||
'Tasa de confirmación histopatológica',
|
|
||||||
'Valor predictivo positivo de la colposcopía',
|
|
||||||
]);
|
|
||||||
const route = tab.locator('app-readings').first();
|
|
||||||
for (const mode of ['Por pasos', 'Por CIE-10', '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.')),
|
|
||||||
).toBeVisible();
|
|
||||||
}
|
|
||||||
// one selector for the cytology distribution and the HPV by genotype; the biopsy card is apart
|
|
||||||
await expect(
|
|
||||||
tab.locator('app-readings', {
|
|
||||||
has: page.getByRole('heading', { name: 'Pacientes evaluadas por resultado de VPH' }),
|
|
||||||
}),
|
|
||||||
).toHaveCount(0);
|
|
||||||
const views = tab.getByRole('radiogroup', { name: VIEWS_LABEL });
|
|
||||||
await expect(views.getByRole('radio')).toHaveText(VIEWS);
|
|
||||||
await expect(views.getByRole('radio', { name: 'General' })).toBeChecked();
|
|
||||||
await expect(tab.getByRole('radio', { name: 'Por escenario clínico' })).toHaveCount(0);
|
|
||||||
for (const view of VIEWS.slice(1)) {
|
|
||||||
await views.getByRole('radio', { name: view }).click();
|
|
||||||
for (const card of [TITLES.cytology, TITLES.genotype]) {
|
|
||||||
const readings = tab.locator('app-readings', {
|
|
||||||
has: page.getByRole('heading', { name: card }),
|
|
||||||
});
|
|
||||||
// each card has no toggle of its own: the selector drives both
|
|
||||||
await expect(readings.getByRole('radio')).toHaveCount(0);
|
|
||||||
await expect(
|
|
||||||
readings
|
|
||||||
.locator('.group')
|
|
||||||
.first()
|
|
||||||
.or(readings.getByText(/No disponible|Sin datos en el periodo/)),
|
|
||||||
).toBeVisible();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const biopsyCard = tab.locator('app-readings', {
|
|
||||||
has: page.getByRole('heading', { name: TITLES.biopsy }),
|
|
||||||
});
|
|
||||||
await expect(biopsyCard.getByRole('radio')).toHaveCount(0);
|
|
||||||
await views.getByRole('radio', { name: 'General' }).click();
|
|
||||||
await expect(
|
|
||||||
tab
|
|
||||||
.locator('app-readings', { has: page.getByRole('heading', { name: TITLES.cytology }) })
|
|
||||||
.getByRole('table'),
|
|
||||||
).toBeVisible();
|
|
||||||
// the PPV cards keep their round tab, in the same words and order
|
|
||||||
await tab.getByRole('radio', { name: 'Colposcopía', exact: true }).click();
|
|
||||||
const colposcopy = tab.locator('app-readings', {
|
|
||||||
has: page.getByRole('heading', { name: TITLES.colposcopy }),
|
|
||||||
});
|
|
||||||
await colposcopy.getByRole('radio', ROUND).click();
|
|
||||||
await expect(
|
|
||||||
colposcopy
|
|
||||||
.getByRole('table', ROUND)
|
|
||||||
.or(colposcopy.getByText(/No disponible|Sin datos en el periodo/)),
|
|
||||||
).toBeVisible();
|
|
||||||
await tab.getByRole('radio', { name: 'Biopsia', exact: true }).click();
|
|
||||||
await tab
|
|
||||||
.locator('app-readings', {
|
|
||||||
has: page.getByRole('heading', { name: TITLES.ppvBiopsy }),
|
|
||||||
})
|
|
||||||
.getByRole('radio', ROUND)
|
|
||||||
.click();
|
|
||||||
await expect(
|
|
||||||
tab.getByRole('heading', { name: 'Valor predictivo positivo de la biopsia' }),
|
|
||||||
).toBeVisible();
|
|
||||||
await tab.getByRole('radio', { name: 'Solicitudes' }).click();
|
|
||||||
});
|
|
||||||
|
|
||||||
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();
|
|
||||||
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();
|
|
||||||
await expect(page.locator('tr.stage-detail')).toContainText('Toma de muestra');
|
|
||||||
const answer = page.waitForResponse((r) => r.url().includes('birthdate=le'));
|
|
||||||
await page.getByLabel('Edad mínima').fill('45');
|
|
||||||
expect((await answer).ok()).toBe(true);
|
|
||||||
for (const age of await list.locator('td:nth-child(2)').allInnerTexts())
|
|
||||||
expect(parseInt(age)).toBeGreaterThanOrEqual(45);
|
|
||||||
for (const [button, file] of [
|
|
||||||
['Exportar Excel', 'seguimiento-cacu.xlsx'],
|
|
||||||
['Exportar PDF', 'seguimiento-cacu.pdf'],
|
|
||||||
]) {
|
|
||||||
const saved = page.waitForEvent('download');
|
|
||||||
await page.getByRole('button', { name: button }).click();
|
|
||||||
expect((await saved).suggestedFilename()).toBe(file);
|
|
||||||
}
|
|
||||||
await list.first().locator('a').first().click();
|
|
||||||
await expect(page.locator('[data-section=etapas]')).toContainText('Reporte de biopsia');
|
|
||||||
const record = page.waitForEvent('download');
|
|
||||||
await page.getByRole('button', { name: 'Exportar PDF' }).click();
|
|
||||||
expect((await record).suggestedFilename()).toBe('expediente-cacu.pdf');
|
|
||||||
});
|
|
||||||
|
|
||||||
// ---- Screening rounds on SIMULATED answers (see simulated-rounds.ts): the groups the contract of
|
|
||||||
// `rebuild` allows, tried on top of the API's own answers. They show how the page draws them, not the
|
|
||||||
// backend. The shared selector drives the cytology and the HPV-by-genotype cards; the PPV cards keep a tab.
|
|
||||||
const BAR = {
|
|
||||||
initial: 'rgb(95, 127, 154)',
|
|
||||||
subsequent: 'rgb(143, 167, 187)',
|
|
||||||
no_data: 'rgb(201, 205, 210)',
|
|
||||||
};
|
|
||||||
const GENOTYPE_COLOURS = {
|
|
||||||
Negativo: '#42A77E',
|
|
||||||
'VPH 16': '#DF8640',
|
|
||||||
'VPH 18': '#C29C42',
|
|
||||||
'VPH 16 y 18': '#C24269',
|
|
||||||
Positivo: '#A8C243',
|
|
||||||
};
|
|
||||||
const CYTOLOGY_COLOURS = {
|
|
||||||
Normal: '#408651',
|
|
||||||
'ASC-US': '#2778B8',
|
|
||||||
LIEBG: '#B19525',
|
|
||||||
'ASC-H': '#7955B1',
|
|
||||||
LIEAG: '#CE4778',
|
|
||||||
'Carcinoma in situ': '#AA394D',
|
|
||||||
};
|
|
||||||
|
|
||||||
async function withRounds(page: Page, how: Simulation) {
|
|
||||||
await simulateRounds(page, how);
|
|
||||||
await page.goto('/indicadores/cacu');
|
|
||||||
const tab = page.locator('app-tab-indicadores');
|
|
||||||
await expect(tab.getByRole('heading', { name: 'Indicadores clínicos' })).toBeVisible({
|
|
||||||
timeout: 3 * 60_000,
|
|
||||||
});
|
|
||||||
await expect(tab.locator('app-loading')).toHaveCount(0, { timeout: 5 * 60_000 });
|
|
||||||
const card = (title: string) =>
|
|
||||||
tab.locator('app-readings', { has: page.getByRole('heading', { name: title }) }).first();
|
|
||||||
const view = async (name: string) => {
|
|
||||||
await tab.getByRole('radiogroup', { name: VIEWS_LABEL }).getByRole('radio', { name }).click();
|
|
||||||
};
|
|
||||||
/** A PPV card on its round tab. */
|
|
||||||
const ppv = async (key: 'colposcopy' | 'ppvBiopsy') => {
|
|
||||||
await tab
|
|
||||||
.getByRole('radio', { name: key === 'colposcopy' ? 'Colposcopía' : 'Biopsia', exact: true })
|
|
||||||
.click();
|
|
||||||
const readings = card(TITLES[key]);
|
|
||||||
await readings.getByRole('radio', ROUND).click();
|
|
||||||
return readings;
|
|
||||||
};
|
|
||||||
return { tab, card, view, ppv };
|
|
||||||
}
|
|
||||||
/** The first group of independent bars of a card (the cytology and genotype breakdowns). */
|
|
||||||
const plotOf = (readings: Locator) => readings.locator('.group').first();
|
|
||||||
/** The groups of a card as the page draws them: "label<br>n = N", the width of the first bar and the colour of
|
|
||||||
* each category (the first group's rows), in hex. */
|
|
||||||
const traces = (readings: Locator) =>
|
|
||||||
readings.evaluate((el) => {
|
|
||||||
const hex = (rgb: string) =>
|
|
||||||
'#' +
|
|
||||||
(rgb.match(/\d+/g) ?? [])
|
|
||||||
.slice(0, 3)
|
|
||||||
.map((n) => Number(n).toString(16).padStart(2, '0'))
|
|
||||||
.join('')
|
|
||||||
.toUpperCase();
|
|
||||||
const groups = [...el.querySelectorAll('.group')];
|
|
||||||
return {
|
|
||||||
y: groups.map(
|
|
||||||
(g) =>
|
|
||||||
`${g.querySelector('h4')!.childNodes[0].textContent!.trim()}<br>n = ${g.querySelector('.n')!.textContent!.replace('n = ', '').trim()}`,
|
|
||||||
),
|
|
||||||
x: groups.map((g) => parseFloat((g.querySelector('.fill') as HTMLElement).style.width)),
|
|
||||||
colours: Object.fromEntries(
|
|
||||||
[...groups[0].querySelectorAll('.row')].map((r) => [
|
|
||||||
r.querySelector('.name')!.textContent!.trim(),
|
|
||||||
hex(getComputedStyle(r.querySelector('.fill')!).backgroundColor),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const key of ['colposcopy', 'ppvBiopsy'] as const) {
|
|
||||||
test(`rondas (simulado) ${key}: three groups in order, each with its own colour`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { ppv } = await withRounds(page, 'as-is');
|
|
||||||
const readings = await ppv(key);
|
|
||||||
const rows = readings.getByRole('row').filter({ has: page.getByRole('rowheader') });
|
|
||||||
await expect(rows).toHaveCount(3);
|
|
||||||
const names = await readings.getByRole('rowheader').allInnerTexts();
|
|
||||||
expect(names.map((n) => n.trim().split(/\s*\n\s*/)[0])).toEqual([
|
|
||||||
'Detección inicial',
|
|
||||||
'Detección subsecuente',
|
|
||||||
'Sin dato',
|
|
||||||
]);
|
|
||||||
const colours = await readings
|
|
||||||
.locator('tbody .bar')
|
|
||||||
.evaluateAll((els) => els.map((e) => getComputedStyle(e).backgroundColor));
|
|
||||||
expect(colours).toEqual([BAR.initial, BAR.subsequent, BAR.no_data]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test(`rondas (simulado) ${key}: an empty initial group is zero patients, not hidden`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { ppv } = await withRounds(page, 'no-initial');
|
|
||||||
const readings = await ppv(key);
|
|
||||||
const initial = readings.getByRole('row').filter({ hasText: 'Detección inicial' });
|
|
||||||
await expect(initial).toContainText('Sin pacientes en el periodo');
|
|
||||||
await expect(initial).toContainText('0/0');
|
|
||||||
});
|
|
||||||
|
|
||||||
test(`rondas (simulado) ${key}: without the stratum the card says it is not available`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { ppv } = await withRounds(page, 'unpublished');
|
|
||||||
const readings = await ppv(key);
|
|
||||||
await expect(readings).toContainText('No disponible');
|
|
||||||
await expect(readings.getByRole('table', ROUND)).toHaveCount(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const card of ['cytology', 'genotype'] as const) {
|
|
||||||
test(`rondas (simulado) ${card}: the selector draws the rounds in order, with the category colours`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { card: of, view } = await withRounds(page, 'as-is');
|
|
||||||
await view(ROUND.name);
|
|
||||||
const readings = of(TITLES[card]);
|
|
||||||
await expect(plotOf(readings)).toBeVisible();
|
|
||||||
const found = await traces(readings);
|
|
||||||
expect(found.y.map((l) => l.split('<br>')[0])).toEqual([
|
|
||||||
'Detección inicial',
|
|
||||||
'Detección subsecuente',
|
|
||||||
'Sin dato',
|
|
||||||
]);
|
|
||||||
expect(found.colours).toMatchObject(card === 'cytology' ? CYTOLOGY_COLOURS : GENOTYPE_COLOURS);
|
|
||||||
});
|
|
||||||
|
|
||||||
test(`rondas (simulado) ${card}: an empty initial group is an empty bar with its zero`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { card: of, view } = await withRounds(page, 'no-initial');
|
|
||||||
await view(ROUND.name);
|
|
||||||
const found = await traces(of(TITLES[card]));
|
|
||||||
expect(found.y[0]).toBe('Detección inicial<br>n = 0');
|
|
||||||
expect(found.x[0]).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test(`rondas (simulado) ${card}: without the stratum the selector says it is not available`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { card: of, view } = await withRounds(page, 'unpublished');
|
|
||||||
await view(ROUND.name);
|
|
||||||
await expect(of(TITLES[card])).toContainText('No disponible');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
test('rondas (simulado): the genotype card never shows the incomplete positives, and says where they went', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { card, view } = await withRounds(page, 'as-is');
|
|
||||||
const readings = card(TITLES.genotype);
|
|
||||||
await expect(readings).toContainText('«Positivo»');
|
|
||||||
await expect(readings.getByRole('rowheader')).not.toContainText([
|
|
||||||
'Otro de alto riesgo',
|
|
||||||
'incompleto',
|
|
||||||
]);
|
|
||||||
const labels = await readings.getByRole('rowheader').allInnerTexts();
|
|
||||||
expect(labels.map((l) => l.trim())).toEqual([
|
|
||||||
'Negativo',
|
|
||||||
'VPH 16',
|
|
||||||
'VPH 18',
|
|
||||||
'VPH 16 y 18',
|
|
||||||
'Positivo',
|
|
||||||
]);
|
|
||||||
for (const name of VIEWS.slice(1)) {
|
|
||||||
await view(name);
|
|
||||||
const found = await traces(readings);
|
|
||||||
expect(Object.keys(found.colours)).toEqual(Object.keys(GENOTYPE_COLOURS));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const width of [1440, 480]) {
|
|
||||||
test(`rondas (simulado) at ${width} px: the shared selector on each view lays out cleanly`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
await page.setViewportSize({ width, height: 1000 });
|
|
||||||
const { view, ppv } = await withRounds(page, 'as-is');
|
|
||||||
for (const name of VIEWS) {
|
|
||||||
await view(name);
|
|
||||||
await page.waitForTimeout(1200);
|
|
||||||
// every option of the selector is inside the window (it wraps on a narrow screen)
|
|
||||||
for (const box of await page
|
|
||||||
.getByRole('radiogroup', { name: VIEWS_LABEL })
|
|
||||||
.getByRole('radio')
|
|
||||||
.evaluateAll((els) =>
|
|
||||||
els.map((e) => e.closest('mat-button-toggle')!.getBoundingClientRect().right),
|
|
||||||
))
|
|
||||||
expect(box).toBeLessThanOrEqual(width);
|
|
||||||
expect(await layoutProblems(page), name).toEqual([]);
|
|
||||||
}
|
|
||||||
await ppv('colposcopy');
|
|
||||||
await ppv('ppvBiopsy');
|
|
||||||
await page.waitForTimeout(1200);
|
|
||||||
expect(await layoutProblems(page)).toEqual([]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,974 +0,0 @@
|
|||||||
import { expect, type Locator, type Page, test } from '@playwright/test';
|
|
||||||
import { layoutProblems } from './layout';
|
|
||||||
|
|
||||||
// The individual record of CaCu: the stages inside "Historial médico" and the risk scales.
|
|
||||||
// "(simulado)" tests rewrite the API's answers in the browser to cover what the synthetic data
|
|
||||||
// do not hold (every stage state, every risk value); they show how the page draws them, not the backend.
|
|
||||||
|
|
||||||
const EXT = 'https://isssteleon.org/fhir/StructureDefinition/';
|
|
||||||
test.beforeEach(async ({ page }) => {
|
|
||||||
const form = { username: 'admin@isssteleon.mx', password: 'solo-para-pruebas' };
|
|
||||||
expect((await page.request.post('/api/auth/login', { form })).status()).toBe(204);
|
|
||||||
});
|
|
||||||
|
|
||||||
/** The record of the first patient of the risk list, as an address. */
|
|
||||||
async function firstRecord(page: Page): Promise<{ url: string; sample: string }> {
|
|
||||||
await page.goto('/indicadores/cacu');
|
|
||||||
await page.getByRole('tab', { name: 'Análisis de riesgos' }).click();
|
|
||||||
const link = page.locator('table.worklist tbody tr a').first();
|
|
||||||
await link.waitFor({ timeout: 120_000 });
|
|
||||||
const url = (await link.getAttribute('href'))!;
|
|
||||||
return { url, sample: new URL(url, 'http://x').searchParams.get('citologia')! };
|
|
||||||
}
|
|
||||||
const plus = (day: string, days: number) =>
|
|
||||||
new Date(Date.parse(day) + days * 86_400_000).toISOString().slice(0, 10);
|
|
||||||
|
|
||||||
type Route = Partial<
|
|
||||||
Record<'report' | 'colposcopy' | 'request' | 'biopsy' | 'diagnosis', number>
|
|
||||||
> & {
|
|
||||||
link?: 'recorded';
|
|
||||||
/** more extensions on the report, as the backend would publish them (stage states and sources) */
|
|
||||||
extra?: object[];
|
|
||||||
};
|
|
||||||
/** The shown cytology's report carries these dates (days after its sample). */
|
|
||||||
async function withRoute(page: Page, sample: string, days: Route) {
|
|
||||||
await page.route('**/api/cacu/fhir/DiagnosticReport**', async (route) => {
|
|
||||||
const response = await route.fetch();
|
|
||||||
const body = await response.json();
|
|
||||||
for (const { resource: r } of body.entry ?? []) {
|
|
||||||
if (r.code?.coding?.[0]?.code !== 'cervical_cytology' || r.effectiveDateTime !== sample)
|
|
||||||
continue;
|
|
||||||
const names = {
|
|
||||||
report: 'report-date',
|
|
||||||
colposcopy: 'colposcopy-date',
|
|
||||||
request: 'biopsy-request-date',
|
|
||||||
biopsy: 'biopsy-date',
|
|
||||||
diagnosis: 'diagnosis-date',
|
|
||||||
} as const;
|
|
||||||
r.extension = (r.extension ?? []).filter(
|
|
||||||
(e: any) =>
|
|
||||||
!Object.values(names).some((n) => e.url === EXT + n) && e.url !== EXT + 'biopsy-link',
|
|
||||||
);
|
|
||||||
for (const [key, name] of Object.entries(names)) {
|
|
||||||
const d = days[key as keyof typeof names];
|
|
||||||
if (d !== undefined) r.extension.push({ url: EXT + name, valueDate: plus(sample, d) });
|
|
||||||
}
|
|
||||||
if (days.link) r.extension.push({ url: EXT + 'biopsy-link', valueCode: days.link });
|
|
||||||
r.extension.push(...(days.extra ?? []));
|
|
||||||
}
|
|
||||||
await route.fulfill({
|
|
||||||
response,
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
contentType: 'application/fhir+json',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
type Prediction = [years: number, p: number, low?: number, high?: number];
|
|
||||||
const risk = (
|
|
||||||
id: string,
|
|
||||||
text: string,
|
|
||||||
model: string,
|
|
||||||
index: string,
|
|
||||||
predictions: Prediction[],
|
|
||||||
) => ({
|
|
||||||
resourceType: 'RiskAssessment',
|
|
||||||
id,
|
|
||||||
status: 'final',
|
|
||||||
method: { text, coding: [{ code: model }] },
|
|
||||||
occurrenceDateTime: index,
|
|
||||||
prediction: predictions.map(([years, p, low, high]) => ({
|
|
||||||
whenRange: { high: { value: years, unit: 'a', code: 'a' } },
|
|
||||||
probabilityDecimal: p,
|
|
||||||
extension:
|
|
||||||
low === undefined
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
{ url: EXT + 'ic-bajo', valueDecimal: low },
|
|
||||||
{ url: EXT + 'ic-alto', valueDecimal: high },
|
|
||||||
],
|
|
||||||
})),
|
|
||||||
});
|
|
||||||
/** The patient has these risk assessments. */
|
|
||||||
async function withRisks(page: Page, assessments: object[]) {
|
|
||||||
await page.route('**/api/cacu/fhir/RiskAssessment**', (route) =>
|
|
||||||
route.fulfill({
|
|
||||||
contentType: 'application/fhir+json',
|
|
||||||
body: JSON.stringify({
|
|
||||||
resourceType: 'Bundle',
|
|
||||||
type: 'searchset',
|
|
||||||
entry: assessments.map((resource) => ({ resource })),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const historial = (page: Page) =>
|
|
||||||
page.locator('mat-card', {
|
|
||||||
has: page.locator('mat-card-title', { hasText: 'Historial médico' }),
|
|
||||||
});
|
|
||||||
const scale = (page: Page, label: string, nth = 0) =>
|
|
||||||
page.locator(`.risk-scale[data-scale="${label}"]`).nth(nth);
|
|
||||||
const IMMEDIATE = 'Riesgo inmediato (al índice)';
|
|
||||||
const FIVE = 'Riesgo a 5 años';
|
|
||||||
|
|
||||||
async function open(page: Page, url: string) {
|
|
||||||
await page.goto(url);
|
|
||||||
await expect(historial(page)).toBeVisible({ timeout: 120_000 });
|
|
||||||
await expect(page.locator('app-loading')).toHaveCount(0, { timeout: 60_000 });
|
|
||||||
}
|
|
||||||
/** Where a scale draws its marker, in % of the bar, and the figure it prints. */
|
|
||||||
async function drawn(scaleBox: Locator) {
|
|
||||||
const marker = scaleBox.locator('.risk-marker');
|
|
||||||
return {
|
|
||||||
markers: await marker.count(),
|
|
||||||
left: (await marker.count())
|
|
||||||
? await marker.evaluate((e) => (e as HTMLElement).style.left)
|
|
||||||
: undefined,
|
|
||||||
value: (await scaleBox.locator('.risk-value').count())
|
|
||||||
? (await scaleBox.locator('.risk-value').innerText()).trim()
|
|
||||||
: undefined,
|
|
||||||
grey: await scaleBox.locator('.risk-plot.unavailable').count(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
test('ficha: the five stages are a line of nodes inside "Historial médico", with the export button', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await open(page, url);
|
|
||||||
await expect(page.locator('mat-card-title', { hasText: 'Etapas del tamizaje' })).toHaveCount(0);
|
|
||||||
const stages = historial(page).locator('[data-section=etapas] app-stages li');
|
|
||||||
await expect(stages).toHaveCount(5);
|
|
||||||
// one row: the five nodes are level
|
|
||||||
const tops = await stages
|
|
||||||
.locator('.node')
|
|
||||||
.evaluateAll((els) => els.map((e) => Math.round(e.getBoundingClientRect().top)));
|
|
||||||
expect(new Set(tops).size).toBe(1);
|
|
||||||
// each stage says its name, state, day and both intervals, centred
|
|
||||||
const first = stages.first();
|
|
||||||
await expect(first).toContainText('Toma de muestra');
|
|
||||||
await expect(first).toContainText('Registrada');
|
|
||||||
await expect(first).toContainText('Desde anterior: —');
|
|
||||||
await expect(first).toContainText('Desde toma: 0 días');
|
|
||||||
expect(
|
|
||||||
await first.locator('.info').evaluate((e) => getComputedStyle(e.parentElement!).textAlign),
|
|
||||||
).toBe('center');
|
|
||||||
await expect(historial(page)).toContainText('a la fecha de corte');
|
|
||||||
await expect(historial(page).getByRole('button', { name: 'Exportar PDF' })).toBeVisible();
|
|
||||||
// history and tests keep their tables
|
|
||||||
await expect(historial(page).getByRole('table')).toBeVisible();
|
|
||||||
await expect(page.locator('mat-card-title', { hasText: 'Pruebas y resultados' })).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha: the export of the record still downloads its PDF', async ({ page }) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await open(page, url);
|
|
||||||
const saved = page.waitForEvent('download');
|
|
||||||
await historial(page).getByRole('button', { name: 'Exportar PDF' }).click();
|
|
||||||
expect((await saved).suggestedFilename()).toBe('expediente-cacu.pdf');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha: with no model both horizons are drawn grey, not available, without a marker', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await open(page, url);
|
|
||||||
for (const label of [IMMEDIATE, FIVE]) {
|
|
||||||
const box = scale(page, label);
|
|
||||||
await expect(box).toContainText('No disponible');
|
|
||||||
expect(await drawn(box)).toMatchObject({ markers: 0, grey: 1 });
|
|
||||||
await expect(box.locator('.risk-labels span')).toHaveText([
|
|
||||||
'0 %',
|
|
||||||
'25 %',
|
|
||||||
'50 %',
|
|
||||||
'75 %',
|
|
||||||
'100 %',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
await expect(
|
|
||||||
page.getByText('Divisiones numéricas descriptivas; no representan umbrales clínicos.'),
|
|
||||||
).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): every state of a stage, its dates and its intervals', async ({ page }) => {
|
|
||||||
const { url, sample } = await firstRecord(page);
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
biopsy: 50,
|
|
||||||
diagnosis: 70,
|
|
||||||
link: 'recorded',
|
|
||||||
});
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, 200)}&citologia=${sample}`);
|
|
||||||
const stages = historial(page).locator('app-stages li');
|
|
||||||
const text = async (n: number) => (await stages.nth(n).innerText()).replace(/\s+/g, ' ');
|
|
||||||
expect(await text(0)).toContain(`Registrada ${sample}`);
|
|
||||||
expect(await text(1)).toContain(
|
|
||||||
`Registrada ${plus(sample, 14)} Procedencia: Formulario de citología Desde anterior: 14 días Desde toma: 14 días`,
|
|
||||||
);
|
|
||||||
// colposcopy and diagnosis are inferred from dates: their intervals say so
|
|
||||||
expect(await text(2)).toContain(
|
|
||||||
`Inferida por fechas ${plus(sample, 30)} Desde anterior: 16 días (inferido) Desde toma: 30 días (inferido)`,
|
|
||||||
);
|
|
||||||
// a recorded biopsy link is recorded; the interval since an inferred stage is still inferred
|
|
||||||
expect(await text(3)).toContain(
|
|
||||||
`Registrada ${plus(sample, 50)} Desde anterior: 20 días (inferido) Desde toma: 50 días`,
|
|
||||||
);
|
|
||||||
expect(await text(4)).toContain(
|
|
||||||
`Inferida por fechas ${plus(sample, 70)} Desde anterior: 20 días (inferido)`,
|
|
||||||
);
|
|
||||||
const state = (n: number) =>
|
|
||||||
stages
|
|
||||||
.nth(n)
|
|
||||||
.locator('.node')
|
|
||||||
.evaluate(
|
|
||||||
(e) => getComputedStyle(e).backgroundColor + '|' + getComputedStyle(e).borderTopStyle,
|
|
||||||
);
|
|
||||||
expect(await state(0)).toBe('rgb(56, 123, 102)|solid'); // recorded
|
|
||||||
expect(await state(2)).toBe('rgb(66, 105, 160)|double'); // inferred
|
|
||||||
// an inferred biopsy link: inferred as well
|
|
||||||
await page.unroute('**/api/cacu/fhir/DiagnosticReport**');
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
biopsy: 50,
|
|
||||||
diagnosis: 70,
|
|
||||||
});
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, 200)}&citologia=${sample}`);
|
|
||||||
expect(await text(3)).toContain('Inferida por fechas');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): the cut-off hides what is dated after it; a biopsy asked and not reported is pending', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url, sample } = await firstRecord(page);
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
biopsy: 50,
|
|
||||||
diagnosis: 70,
|
|
||||||
});
|
|
||||||
const cutoff = plus(sample, 45); // after the request, before the report
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${cutoff}&citologia=${sample}`);
|
|
||||||
const stages = historial(page).locator('app-stages li');
|
|
||||||
const states = await stages.locator('.info span:nth-child(2)').allInnerTexts();
|
|
||||||
expect(states.map((s) => s.trim())).toEqual([
|
|
||||||
'Registrada',
|
|
||||||
'Registrada',
|
|
||||||
'Inferida por fechas',
|
|
||||||
'Pendiente',
|
|
||||||
'Sin dato',
|
|
||||||
]);
|
|
||||||
await expect(historial(page)).toContainText(`a la fecha de corte ${cutoff}`);
|
|
||||||
const pending = await stages
|
|
||||||
.nth(3)
|
|
||||||
.locator('.node')
|
|
||||||
.evaluate((e) => getComputedStyle(e).backgroundColor);
|
|
||||||
expect(pending).toBe('rgb(255, 241, 201)');
|
|
||||||
const unknown = await stages
|
|
||||||
.nth(4)
|
|
||||||
.locator('.node')
|
|
||||||
.evaluate((e) => getComputedStyle(e).borderTopStyle);
|
|
||||||
expect(unknown).toBe('dashed');
|
|
||||||
await expect(stages.nth(4)).toContainText('Sin fecha');
|
|
||||||
await expect(stages.nth(4)).toContainText('Desde toma: —');
|
|
||||||
// a cut-off before the sample: nothing is known
|
|
||||||
await page.unroute('**/api/cacu/fhir/DiagnosticReport**');
|
|
||||||
await withRoute(page, sample, { report: 14 });
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, -1)}&citologia=${sample}`);
|
|
||||||
expect(
|
|
||||||
await historial(page).locator('app-stages li .info span:nth-child(2)').allInnerTexts(),
|
|
||||||
).toEqual(Array(5).fill('Sin dato'));
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): the scales draw 0, 2, 50, 98 and 100 % in place, and tell zero from absent', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await withRisks(page, [
|
|
||||||
risk('a', 'Supervivencia v3', 'cacu.survival', '2026-02-01', [
|
|
||||||
[0, 0],
|
|
||||||
[5, 0.5, 0.4, 0.6],
|
|
||||||
]),
|
|
||||||
risk('b', 'Recurrencia v2', 'cacu.recurrence', '2026-03-01', [
|
|
||||||
[0, 0.02, 0.01, 0.03],
|
|
||||||
[5, 0.98, 0.95, 1],
|
|
||||||
]),
|
|
||||||
risk('c', 'Otro modelo v1', 'cacu.other', '2026-04-01', [[5, 1]]), // no immediate horizon
|
|
||||||
risk('d', 'Parcial v1', 'cacu.partial', '2026-05-01', [[0, 0.5]]), // no five-year horizon
|
|
||||||
]);
|
|
||||||
await open(page, url);
|
|
||||||
await expect(
|
|
||||||
page.getByRole('heading', { name: 'Supervivencia v3 · fecha índice 2026-02-01' }),
|
|
||||||
).toBeVisible();
|
|
||||||
await expect(
|
|
||||||
page.getByRole('heading', { name: 'Recurrencia v2 · fecha índice 2026-03-01' }),
|
|
||||||
).toBeVisible();
|
|
||||||
const at = async (label: string, nth: number) => drawn(scale(page, label, nth));
|
|
||||||
// group order follows the page's models: survival, recurrence, other, partial
|
|
||||||
const groups = await page.locator('.risk-scale').count();
|
|
||||||
expect(groups).toBe(8); // both horizons of four models
|
|
||||||
const model = async (n: number) => [await at(IMMEDIATE, n), await at(FIVE, n)];
|
|
||||||
const [survival, recurrence, other, partial] = [
|
|
||||||
await model(0),
|
|
||||||
await model(1),
|
|
||||||
await model(2),
|
|
||||||
await model(3),
|
|
||||||
];
|
|
||||||
expect(survival[0]).toMatchObject({ markers: 1, left: '0%', value: '0.0 %', grey: 0 }); // a real zero
|
|
||||||
expect(survival[1]).toMatchObject({ left: '50%', value: '50.0 %' });
|
|
||||||
expect(recurrence[0]).toMatchObject({ left: '2%', value: '2.0 %' });
|
|
||||||
expect(recurrence[1]).toMatchObject({ left: '98%', value: '98.0 %' });
|
|
||||||
expect(other[0]).toMatchObject({ markers: 0, grey: 1 }); // absent, not zero
|
|
||||||
expect(other[1]).toMatchObject({ left: '100%', value: '100.0 %' });
|
|
||||||
expect(partial[0]).toMatchObject({ left: '50%' });
|
|
||||||
expect(partial[1]).toMatchObject({ markers: 0, grey: 1 });
|
|
||||||
await expect(scale(page, IMMEDIATE, 2)).toContainText('No disponible');
|
|
||||||
await expect(scale(page, FIVE, 3)).toContainText('No disponible');
|
|
||||||
await expect(scale(page, FIVE, 0)).toContainText('IC 95 %: 40.0–60.0 %');
|
|
||||||
await expect(scale(page, FIVE, 1)).toContainText('IC 95 %: 95.0–100.0 %');
|
|
||||||
await expect(scale(page, IMMEDIATE, 0)).not.toContainText('IC 95 %'); // none published, none invented
|
|
||||||
// the descriptive note stays, and the model table and curve of rebuild are still there
|
|
||||||
await expect(page.getByText('no representan umbrales clínicos')).toBeVisible();
|
|
||||||
await expect(page.getByRole('columnheader', { name: 'Probabilidad', exact: true })).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): the scale is drawn in four equal segments with the numeric divisions', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await withRisks(page, [
|
|
||||||
risk('a', 'Supervivencia v3', 'cacu.survival', '2026-02-01', [[5, 0.5, 0.4, 0.6]]),
|
|
||||||
]);
|
|
||||||
await open(page, url);
|
|
||||||
const box = scale(page, FIVE);
|
|
||||||
await expect(box.locator('.risk-labels span')).toHaveText([
|
|
||||||
'0 %',
|
|
||||||
'25 %',
|
|
||||||
'50 %',
|
|
||||||
'75 %',
|
|
||||||
'100 %',
|
|
||||||
]);
|
|
||||||
const line = await box.locator('.risk-line').evaluate((e) => getComputedStyle(e).backgroundImage);
|
|
||||||
for (const colour of [
|
|
||||||
'rgb(66, 167, 126)',
|
|
||||||
'rgb(168, 194, 67)',
|
|
||||||
'rgb(223, 134, 64)',
|
|
||||||
'rgb(194, 66, 105)',
|
|
||||||
])
|
|
||||||
expect(line).toContain(colour);
|
|
||||||
// the marker sits at 50 % of the bar
|
|
||||||
const [bar, mark] = await Promise.all([
|
|
||||||
box.locator('.risk-plot').boundingBox(),
|
|
||||||
box.locator('.risk-marker').boundingBox(),
|
|
||||||
]);
|
|
||||||
expect(Math.abs(mark!.x + mark!.width / 2 - (bar!.x + bar!.width / 2))).toBeLessThan(3);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const width of [1440, 480]) {
|
|
||||||
test(`ficha (simulado) at ${width} px: the stages and the scales lay out cleanly`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
await page.setViewportSize({ width, height: 1000 });
|
|
||||||
const { url, sample } = await firstRecord(page);
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
biopsy: 50,
|
|
||||||
diagnosis: 70,
|
|
||||||
link: 'recorded',
|
|
||||||
});
|
|
||||||
await withRisks(page, [
|
|
||||||
risk('a', 'Supervivencia v3', 'cacu.survival', '2026-02-01', [
|
|
||||||
[0, 0],
|
|
||||||
[5, 0.98, 0.95, 1],
|
|
||||||
]),
|
|
||||||
risk('b', 'Otro modelo v1', 'cacu.other', '2026-04-01', [[5, 1]]),
|
|
||||||
]);
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, 200)}&citologia=${sample}`);
|
|
||||||
await page.waitForTimeout(800);
|
|
||||||
expect(await layoutProblems(page)).toEqual([]);
|
|
||||||
const tops = await historial(page)
|
|
||||||
.locator('app-stages li .node')
|
|
||||||
.evaluateAll((els) => els.map((e) => Math.round(e.getBoundingClientRect().top)));
|
|
||||||
// wide: one row of nodes; narrow: a column (each below the previous)
|
|
||||||
if (width > 700) expect(new Set(tops).size).toBe(1);
|
|
||||||
else {
|
|
||||||
expect(tops).toEqual([...tops].sort((a, b) => a - b));
|
|
||||||
expect(new Set(tops).size).toBe(5);
|
|
||||||
}
|
|
||||||
expect(
|
|
||||||
await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1),
|
|
||||||
).toBe(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const code = (name: string, valueCode: string) => ({ url: EXT + name, valueCode });
|
|
||||||
const nodeOf = (page: Page, n: number) => historial(page).locator('app-stages li').nth(n);
|
|
||||||
|
|
||||||
/** A record, by the API, whose cytology (the latest of the first patients) satisfies `wanted`. */
|
|
||||||
async function recordWhere(page: Page, wanted: (report: any) => boolean) {
|
|
||||||
const patients = await (await page.request.get('/api/cacu/fhir/Patient?_count=100')).json();
|
|
||||||
const ids: string[] = patients.entry.map((e: any) => e.resource.id);
|
|
||||||
for (let i = 0; i < ids.length; i += 25) {
|
|
||||||
const subject = ids
|
|
||||||
.slice(i, i + 25)
|
|
||||||
.map((p) => 'Patient/' + p)
|
|
||||||
.join(',');
|
|
||||||
const found = await (
|
|
||||||
await page.request.get(`/api/cacu/fhir/DiagnosticReport?_count=200&subject=${subject}`)
|
|
||||||
).json();
|
|
||||||
for (const { resource: r } of found.entry ?? [])
|
|
||||||
if (r.code?.coding?.[0]?.code === 'cervical_cytology' && wanted(r))
|
|
||||||
return {
|
|
||||||
id: r.subject.reference.split('/')[1] as string,
|
|
||||||
sample: r.effectiveDateTime as string,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
throw new Error('no record with those stages in the first patients');
|
|
||||||
}
|
|
||||||
const has = (r: any, name: string) => (r.extension ?? []).some((e: any) => e.url === EXT + name);
|
|
||||||
|
|
||||||
test('ficha: the stages say what the backend demonstrates, with their sources', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { id, sample } = await recordWhere(
|
|
||||||
page,
|
|
||||||
(r) => has(r, 'stage-colposcopy-state') && has(r, 'stage-biopsy-state'),
|
|
||||||
);
|
|
||||||
await open(page, `/indicadores/cacu/pacientes/${id}?corte=2026-12-31&citologia=${sample}`);
|
|
||||||
const states = await historial(page)
|
|
||||||
.locator('app-stages li .info span:nth-child(2)')
|
|
||||||
.allInnerTexts();
|
|
||||||
expect(states[0]).toBe('Registrada');
|
|
||||||
expect(states[2]).toBe('Inferida por fechas'); // colposcopy is always inferred
|
|
||||||
expect(['Inferida por fechas', 'Registrada']).toContain(states[3]);
|
|
||||||
const colposcopy = (await nodeOf(page, 2).innerText()).replace(/\s+/g, ' ');
|
|
||||||
expect(colposcopy).toMatch(/Procedencia: (Nota clínica|Orden de biopsia)/);
|
|
||||||
expect(colposcopy).toContain('Desde anterior:');
|
|
||||||
expect((await nodeOf(page, 3).innerText()).replace(/\s+/g, ' ')).toMatch(
|
|
||||||
/Procedencia: (Asociación por fechas|Registro de la biopsia)/,
|
|
||||||
);
|
|
||||||
// the first two stages come from the form
|
|
||||||
expect(await nodeOf(page, 0).innerText()).toContain('Procedencia: Formulario de citología');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): a stage the backend flags as ambiguous is drawn so, with no interval resting on it', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url, sample } = await firstRecord(page);
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
biopsy: 50,
|
|
||||||
diagnosis: 70,
|
|
||||||
extra: [
|
|
||||||
code('stage-biopsy-state', 'ambiguous'),
|
|
||||||
code('stage-biopsy-source', 'date-association'),
|
|
||||||
code('stage-colposcopy-state', 'inferred'),
|
|
||||||
code('stage-colposcopy-source', 'clinical-note'),
|
|
||||||
code('stage-colposcopy-source', 'biopsy-order'),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, 200)}&citologia=${sample}`);
|
|
||||||
const biopsy = (await nodeOf(page, 3).innerText()).replace(/\s+/g, ' ');
|
|
||||||
expect(biopsy).toContain(`Ambigua ${plus(sample, 50)}`);
|
|
||||||
expect(biopsy).toContain('Procedencia: Asociación por fechas');
|
|
||||||
expect(biopsy).toContain('Desde anterior: — Desde toma: —');
|
|
||||||
expect(
|
|
||||||
await nodeOf(page, 3)
|
|
||||||
.locator('.node')
|
|
||||||
.evaluate((e) => getComputedStyle(e).borderTopStyle),
|
|
||||||
).toBe('double');
|
|
||||||
// no interval rests on the ambiguous day, so the next stage has none from the previous one either
|
|
||||||
expect((await nodeOf(page, 4).innerText()).replace(/\s+/g, ' ')).toContain('Desde anterior: —');
|
|
||||||
// a colposcopy dated by a note and a biopsy order lists both sources
|
|
||||||
expect(await nodeOf(page, 2).innerText()).toContain(
|
|
||||||
'Procedencia: Nota clínica · Orden de biopsia',
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): a biopsy the backend says is pending shows its request, not a day', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url, sample } = await firstRecord(page);
|
|
||||||
await withRoute(page, sample, {
|
|
||||||
report: 14,
|
|
||||||
colposcopy: 30,
|
|
||||||
request: 40,
|
|
||||||
extra: [
|
|
||||||
code('stage-biopsy-state', 'pending'),
|
|
||||||
code('stage-biopsy-source', 'date-association'),
|
|
||||||
code('biopsy-link', 'inferred'),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
await open(page, `${url.split('?')[0]}?corte=${plus(sample, 200)}&citologia=${sample}`);
|
|
||||||
const biopsy = (await nodeOf(page, 3).innerText()).replace(/\s+/g, ' ');
|
|
||||||
expect(biopsy).toContain('Pendiente');
|
|
||||||
expect(biopsy).toContain(`Solicitada el ${plus(sample, 40)}`);
|
|
||||||
expect(biopsy).toContain('Desde toma: —');
|
|
||||||
// colposcopy and diagnosis are never pending: no request is known for them
|
|
||||||
expect(
|
|
||||||
await historial(page).locator('app-stages li .info span:nth-child(2)').allInnerTexts(),
|
|
||||||
).not.toContain('Pendiente' + 'x');
|
|
||||||
const states = (
|
|
||||||
await historial(page).locator('app-stages li .info span:nth-child(2)').allInnerTexts()
|
|
||||||
).map((t) => t.trim());
|
|
||||||
expect(states.filter((t) => t === 'Pendiente')).toHaveLength(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
// ---- the record's tests and its antecedents
|
|
||||||
const antecedents = (page: Page) => page.locator('[data-section=antecedentes]');
|
|
||||||
const tests = (page: Page) =>
|
|
||||||
page.locator('mat-card', {
|
|
||||||
has: page.locator('mat-card-title', { hasText: 'Pruebas y resultados' }),
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha: antecedents and gynecologic evaluation have their own section; tests keep their results', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { id, sample } = await recordWhere(page, (r) => (r.result ?? []).length > 8);
|
|
||||||
await open(page, `/indicadores/cacu/pacientes/${id}?corte=2026-12-31&citologia=${sample}`);
|
|
||||||
const card = antecedents(page);
|
|
||||||
await expect(card).toBeVisible();
|
|
||||||
await expect(card).toContainText('no son diagnósticos confirmados');
|
|
||||||
await expect(card).toContainText(`Citología cervical · toma ${sample}`);
|
|
||||||
for (const title of [
|
|
||||||
'Detección de cáncer de cérvix',
|
|
||||||
'Condición ginecoobstétrica a la detección',
|
|
||||||
'Actualmente presenta',
|
|
||||||
'A la exploración se observa',
|
|
||||||
])
|
|
||||||
await expect(card.locator('dl.facts dt', { hasText: title })).toBeVisible();
|
|
||||||
// the earlier forms are collapsed, each with its own day
|
|
||||||
const earlier = card.locator('details.findings');
|
|
||||||
if (await earlier.count()) {
|
|
||||||
expect(await earlier.getAttribute('open')).toBeNull();
|
|
||||||
await earlier.locator('summary').click();
|
|
||||||
await expect(earlier.locator('tbody tr').first().locator('td').first()).toHaveText(
|
|
||||||
/\d{4}-\d{2}-\d{2}/,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// the tests keep date, study, report and the results of the study, without the form's antecedents
|
|
||||||
const table = tests(page);
|
|
||||||
await expect(table.getByRole('columnheader')).toHaveText([
|
|
||||||
'Toma',
|
|
||||||
'Estudio',
|
|
||||||
'Reporte',
|
|
||||||
'Resultados',
|
|
||||||
]);
|
|
||||||
const text = await table.innerText();
|
|
||||||
expect(text).toContain('Resultado (Bethesda)');
|
|
||||||
expect(text).not.toContain('Detección de cáncer de cérvix');
|
|
||||||
expect(text).not.toContain('A la exploración se observa');
|
|
||||||
// the extra findings are collapsed under their report
|
|
||||||
const findings = table.locator('details.findings').first();
|
|
||||||
await expect(findings.locator('summary')).toContainText('Hallazgos (');
|
|
||||||
expect(await findings.getAttribute('open')).toBeNull();
|
|
||||||
expect((await findings.locator('li').first().textContent())!.trim().length).toBeGreaterThan(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha (simulado): a missing antecedent says it is not documented; with none, no section', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
const strip = (keep: string[]) =>
|
|
||||||
page.route('**/api/cacu/fhir/Observation**', async (route) => {
|
|
||||||
const response = await route.fetch();
|
|
||||||
const body = await response.json();
|
|
||||||
body.entry = (body.entry ?? []).filter((e: any) => {
|
|
||||||
const field = (e.resource.code?.coding?.[0]?.code ?? '').split('.').pop();
|
|
||||||
const antecedent = [
|
|
||||||
'screening_history',
|
|
||||||
'gynecologic_condition',
|
|
||||||
'presenting_symptom',
|
|
||||||
'cervix_appearance',
|
|
||||||
].includes(field);
|
|
||||||
return !antecedent || keep.includes(field);
|
|
||||||
});
|
|
||||||
await route.fulfill({
|
|
||||||
response,
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
contentType: 'application/fhir+json',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
await strip(['screening_history']);
|
|
||||||
await open(page, url);
|
|
||||||
const card = antecedents(page);
|
|
||||||
await expect(card.locator('dl.facts dd').first()).not.toHaveText('No documentado');
|
|
||||||
await expect(card.locator('dl.facts dd', { hasText: 'No documentado' })).toHaveCount(3);
|
|
||||||
await page.unroute('**/api/cacu/fhir/Observation**');
|
|
||||||
await strip([]);
|
|
||||||
await open(page, url);
|
|
||||||
await expect(antecedents(page)).toHaveCount(0);
|
|
||||||
// the record's tests are still there without them
|
|
||||||
await expect(tests(page).getByRole('table')).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('ficha: the PDF keeps the stages, antecedents, tests and risks', async ({ page }) => {
|
|
||||||
const { id, sample } = await recordWhere(page, (r) => (r.result ?? []).length > 8);
|
|
||||||
await open(page, `/indicadores/cacu/pacientes/${id}?corte=2026-12-31&citologia=${sample}`);
|
|
||||||
const saved = page.waitForEvent('download');
|
|
||||||
await historial(page).getByRole('button', { name: 'Exportar PDF' }).click();
|
|
||||||
const download = await saved;
|
|
||||||
expect(download.suggestedFilename()).toBe('expediente-cacu.pdf');
|
|
||||||
const file = await download.path();
|
|
||||||
expect(file).toBeTruthy();
|
|
||||||
const { readFileSync } = await import('node:fs');
|
|
||||||
const bytes = readFileSync(file!);
|
|
||||||
expect(bytes.subarray(0, 4).toString()).toBe('%PDF');
|
|
||||||
expect(bytes.length).toBeGreaterThan(5_000);
|
|
||||||
});
|
|
||||||
|
|
||||||
// ---- the NCI reference comparison (experimental) and the institutional curves ---------------------
|
|
||||||
|
|
||||||
const REFERENCE = '**/api/cacu/fhir/Patient/*/$reference-risk*';
|
|
||||||
const section = (page: Page) => page.locator('[data-section=referencia-nci]');
|
|
||||||
const value = (p: any) =>
|
|
||||||
p.valueCode ?? p.valueString ?? p.valueDate ?? p.valueInteger ?? p.valueDecimal ?? p.valueBoolean;
|
|
||||||
|
|
||||||
/** The first patients' answers of the API, to find one with a given state (the data is synthetic). */
|
|
||||||
async function referenceWhere(page: Page, status: string) {
|
|
||||||
const patients = await (await page.request.get('/api/cacu/fhir/Patient?_count=100')).json();
|
|
||||||
for (const { resource } of patients.entry) {
|
|
||||||
const answer = await page.request.get(`/api/cacu/fhir/Patient/${resource.id}/$reference-risk`);
|
|
||||||
if (!answer.ok()) throw new Error(`the reference operation answered ${answer.status()}`);
|
|
||||||
const body = await answer.json();
|
|
||||||
if (value(body.parameter.find((p: any) => p.name === 'status')) === status)
|
|
||||||
return { id: resource.id as string, body };
|
|
||||||
}
|
|
||||||
throw new Error(`no patient with the state ${status}`);
|
|
||||||
}
|
|
||||||
const part = (name: string, extra: object) => ({ name, ...extra });
|
|
||||||
const answerOf = (...parameter: object[]) => ({ resourceType: 'Parameters', parameter });
|
|
||||||
/** A resolved answer for fixtures, with the given horizons and comparisons. */
|
|
||||||
function fixture(
|
|
||||||
horizons: { years: number; reference?: number; comparison?: object[] }[],
|
|
||||||
more: object[] = [],
|
|
||||||
) {
|
|
||||||
return answerOf(
|
|
||||||
part('status', { valueCode: 'resolved' }),
|
|
||||||
part('experimental', { valueBoolean: true }),
|
|
||||||
part('cutoff', { valueDate: '2026-11-30' }),
|
|
||||||
part('scenario', {
|
|
||||||
part: [
|
|
||||||
part('table', { valueCode: 'screening' }),
|
|
||||||
part('label', { valueString: 'Tamizaje' }),
|
|
||||||
part('key', {
|
|
||||||
part: [
|
|
||||||
part('name', { valueCode: 'history' }),
|
|
||||||
part('value', { valueString: 'Cotest-negative' }),
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
part('source', {
|
|
||||||
part: [
|
|
||||||
part('id', { valueString: 'fixture-table' }),
|
|
||||||
part('file', { valueString: 'fixture.xlsx' }),
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
...more,
|
|
||||||
...horizons.map((h) =>
|
|
||||||
part('horizon', {
|
|
||||||
part: [
|
|
||||||
part('years', { valueInteger: h.years }),
|
|
||||||
part('published', { valueBoolean: h.reference !== undefined }),
|
|
||||||
...(h.reference !== undefined ? [part('reference', { valueDecimal: h.reference })] : []),
|
|
||||||
...(h.comparison ?? []),
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const comparison = (status: string, reasons: string[], extra: object[] = []) =>
|
|
||||||
part('comparison', {
|
|
||||||
part: [
|
|
||||||
part('model', { valueCode: 'fixture.model' }),
|
|
||||||
part('title', { valueString: 'Modelo de prueba' }),
|
|
||||||
part('outcome', { valueString: 'CIN3+' }),
|
|
||||||
...extra,
|
|
||||||
part('status', { valueCode: status }),
|
|
||||||
...reasons.map((r) => part('reason', { valueCode: r })),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
const answerWith = (page: Page, body: object, status = 200) =>
|
|
||||||
page.route(REFERENCE, (route) =>
|
|
||||||
route.fulfill({ status, contentType: 'application/fhir+json', body: JSON.stringify(body) }),
|
|
||||||
);
|
|
||||||
|
|
||||||
test('referencia NCI: a resolved cytology shows its reference with scenario, source and no institutional model', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { id, body } = await referenceWhere(page, 'resolved');
|
|
||||||
await open(page, `/indicadores/cacu/pacientes/${id}`);
|
|
||||||
const box = section(page);
|
|
||||||
await expect(box).toBeVisible();
|
|
||||||
await expect(box.locator('dd[data-status=resolved]')).toHaveText('Referencia disponible');
|
|
||||||
await expect(box).toContainText('Tamizaje');
|
|
||||||
await expect(box).toContainText('CIN3 o más grave (CIN3+)');
|
|
||||||
await expect(box).toContainText('Master_NCI_Risk_Table.xlsx');
|
|
||||||
const rows = box.locator('tbody tr');
|
|
||||||
await expect(rows).toHaveCount(2);
|
|
||||||
await expect(rows.first()).toContainText('Inmediato (al índice)');
|
|
||||||
await expect(rows.nth(1)).toContainText('5 años');
|
|
||||||
// the figures are the API's: percent with two decimals, and no institutional model is made up
|
|
||||||
const expected = body.parameter
|
|
||||||
.filter((p: any) => p.name === 'horizon')
|
|
||||||
.map((h: any) =>
|
|
||||||
(h.part.find((x: any) => x.name === 'reference').valueDecimal * 100).toFixed(2),
|
|
||||||
);
|
|
||||||
for (const [i, pct] of expected.entries())
|
|
||||||
await expect(rows.nth(i).locator('td').nth(2)).toContainText(`${pct} %`);
|
|
||||||
await expect(rows.first().locator('td').nth(1)).toContainText('No disponible');
|
|
||||||
await expect(rows.first().locator('td').nth(3)).toContainText('No comparable');
|
|
||||||
await expect(rows.first().locator('td').nth(3)).toContainText('Ningún modelo institucional');
|
|
||||||
// the antecedents used are collapsed
|
|
||||||
const used = box.locator('details.used');
|
|
||||||
expect(await used.getAttribute('open')).toBeNull();
|
|
||||||
await used.locator('summary').click();
|
|
||||||
await expect(used).toContainText('Fila de origen');
|
|
||||||
await expect(used).toContainText('Citología evaluada');
|
|
||||||
// the other risk displays of the record are still there, and the reference is below the scales
|
|
||||||
await expect(scale(page, FIVE)).toBeVisible();
|
|
||||||
const [scales, reference] = await Promise.all([
|
|
||||||
scale(page, FIVE).boundingBox(),
|
|
||||||
box.boundingBox(),
|
|
||||||
]);
|
|
||||||
expect(reference!.y).toBeGreaterThan(scales!.y);
|
|
||||||
await expect(
|
|
||||||
page.locator('mat-card-title', { hasText: 'Riesgos y recomendaciones' }),
|
|
||||||
).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('referencia NCI: a cytology the tables cannot resolve says the state and why, with no figure', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { id } = await referenceWhere(page, 'unverifiable_correspondence');
|
|
||||||
await open(page, `/indicadores/cacu/pacientes/${id}`);
|
|
||||||
const box = section(page);
|
|
||||||
await expect(box.locator('dd[data-status=unverifiable_correspondence]')).toHaveText(
|
|
||||||
'Correspondencia no verificable',
|
|
||||||
);
|
|
||||||
await expect(box.locator('ul.why li').first()).not.toBeEmpty();
|
|
||||||
await expect(box.locator('table')).toHaveCount(0);
|
|
||||||
await expect(box).not.toContainText('%');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('referencia NCI: with the feature off (404) the section is not there and the record is whole', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(
|
|
||||||
page,
|
|
||||||
{ resourceType: 'OperationOutcome', issue: [{ severity: 'error', code: 'not-found' }] },
|
|
||||||
404,
|
|
||||||
);
|
|
||||||
await open(page, url);
|
|
||||||
await expect(section(page)).toHaveCount(0);
|
|
||||||
await expect(scale(page, FIVE)).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('referencia NCI (simulado): a comparison that is valid shows the difference as institutional minus reference', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(
|
|
||||||
page,
|
|
||||||
fixture([
|
|
||||||
{
|
|
||||||
years: 5,
|
|
||||||
reference: 0.0027,
|
|
||||||
comparison: [
|
|
||||||
comparison(
|
|
||||||
'comparable',
|
|
||||||
[],
|
|
||||||
[
|
|
||||||
part('institutional', { valueDecimal: 0.0127 }),
|
|
||||||
part('institutional-low', { valueDecimal: 0.005 }),
|
|
||||||
part('institutional-high', { valueDecimal: 0.02 }),
|
|
||||||
part('difference-pp', { valueDecimal: 1 }),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
await open(page, url);
|
|
||||||
const row = section(page).locator('tbody tr').first();
|
|
||||||
await expect(row).toContainText('Modelo de prueba');
|
|
||||||
await expect(row).toContainText('1.27 %');
|
|
||||||
await expect(row).toContainText('IC 95 %: 0.50–2.00 %');
|
|
||||||
await expect(row.locator('td').nth(2)).toContainText('0.27 %');
|
|
||||||
await expect(row.locator('td').nth(3)).toContainText('+1.00');
|
|
||||||
await expect(row.locator('td').nth(3)).not.toContainText('No comparable');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('referencia NCI (simulado): another outcome or horizon is "No comparable" with its reasons and no difference', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(
|
|
||||||
page,
|
|
||||||
fixture([
|
|
||||||
{
|
|
||||||
years: 0,
|
|
||||||
reference: 0.0001,
|
|
||||||
comparison: [
|
|
||||||
comparison(
|
|
||||||
'not_comparable',
|
|
||||||
['outcome_differs', 'horizon_not_published_by_model', 'population_not_verified'],
|
|
||||||
[part('institutional', { valueDecimal: 0.05 })],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{ years: 5, reference: 0.0027 },
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
await open(page, url);
|
|
||||||
const first = section(page).locator('tbody tr').first();
|
|
||||||
await expect(first.locator('td').nth(3)).toContainText('No comparable');
|
|
||||||
await expect(first.locator('td').nth(3)).toContainText(
|
|
||||||
'El desenlace del modelo no es el de la tabla (CIN3+)',
|
|
||||||
);
|
|
||||||
await expect(first.locator('td').nth(3)).toContainText(
|
|
||||||
'no publica una predicción a este horizonte',
|
|
||||||
);
|
|
||||||
await expect(first.locator('td').nth(3)).not.toContainText(/[+-]\d/); // no signed difference
|
|
||||||
await expect(first.locator('td').nth(1)).toContainText('5.00 %'); // the model's own risk is shown, never subtracted
|
|
||||||
});
|
|
||||||
|
|
||||||
test('referencia NCI (simulado): a year-one reference is a year, never the immediate risk; a blank is not zero', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(page, fixture([{ years: 1, reference: 0.0136 }, { years: 5 }]));
|
|
||||||
await open(page, url);
|
|
||||||
const rows = section(page).locator('tbody tr');
|
|
||||||
await expect(rows.first()).toContainText('1 año');
|
|
||||||
await expect(section(page)).not.toContainText('Inmediato');
|
|
||||||
await expect(rows.nth(1).locator('td').nth(2)).toContainText('No publicado');
|
|
||||||
await expect(rows.nth(1).locator('td').nth(2)).not.toContainText('0.00');
|
|
||||||
await expect(rows.first().locator('td').nth(2)).toContainText('1.36 %');
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const width of [1440, 480]) {
|
|
||||||
test(`referencia NCI (simulado) at ${width} px: the section lays out cleanly beside the scales and curves`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
await page.setViewportSize({ width, height: 1000 });
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(
|
|
||||||
page,
|
|
||||||
fixture(
|
|
||||||
[
|
|
||||||
{
|
|
||||||
years: 0,
|
|
||||||
reference: 0.0001,
|
|
||||||
comparison: [
|
|
||||||
comparison(
|
|
||||||
'not_comparable',
|
|
||||||
['outcome_differs', 'population_not_verified'],
|
|
||||||
[part('institutional', { valueDecimal: 0.05 })],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
years: 5,
|
|
||||||
reference: 0.0027,
|
|
||||||
comparison: [
|
|
||||||
comparison(
|
|
||||||
'comparable',
|
|
||||||
[],
|
|
||||||
[
|
|
||||||
part('institutional', { valueDecimal: 0.0127 }),
|
|
||||||
part('difference-pp', { valueDecimal: 1 }),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[part('assumption', { valueString: 'un supuesto sin verificar' })],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
await withRisks(page, [
|
|
||||||
risk('a', 'Riesgo LIEAG+ v3', 'cacu.survival', '2026-06-01', [
|
|
||||||
[1, 0.08, 0.05, 0.12],
|
|
||||||
[3, 0.21, 0.15, 0.28],
|
|
||||||
[5, 0.34, 0.26, 0.44],
|
|
||||||
]),
|
|
||||||
risk('b', 'Riesgo cáncer v2', 'cacu.recurrence', '2026-06-01', [
|
|
||||||
[1, 0.002, 0.001, 0.005],
|
|
||||||
[3, 0.008],
|
|
||||||
[5, 0.015, 0.008, 0.028],
|
|
||||||
]),
|
|
||||||
]);
|
|
||||||
await open(page, url);
|
|
||||||
await section(page).locator('details.used summary').click();
|
|
||||||
await page.waitForTimeout(800);
|
|
||||||
expect(await layoutProblems(page)).toEqual([]);
|
|
||||||
expect(
|
|
||||||
await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1),
|
|
||||||
).toBe(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
test('curvas (simulado): one series per model at its published horizons, its band only where it has intervals, and no NCI data', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const { url } = await firstRecord(page);
|
|
||||||
await answerWith(page, fixture([{ years: 5, reference: 0.0027 }]));
|
|
||||||
await withRisks(page, [
|
|
||||||
risk('a', 'Riesgo LIEAG+ v3', 'cacu.survival', '2026-06-01', [
|
|
||||||
[1, 0.08, 0.05, 0.12],
|
|
||||||
[3, 0.21, 0.15, 0.28],
|
|
||||||
[5, 0.34, 0.26, 0.44],
|
|
||||||
]),
|
|
||||||
risk('b', 'Riesgo cáncer v2', 'cacu.recurrence', '2026-06-01', [
|
|
||||||
[1, 0.002, 0.001, 0.005],
|
|
||||||
[3, 0.008],
|
|
||||||
[5, 0.015, 0.008, 0.028],
|
|
||||||
]),
|
|
||||||
risk('c', 'Sin intervalo v1', 'cacu.other', '2026-06-01', [
|
|
||||||
[2, 0.1],
|
|
||||||
[4, 0.2],
|
|
||||||
]),
|
|
||||||
risk('d', 'Un punto v1', 'cacu.partial', '2026-06-01', [[5, 0.5]]),
|
|
||||||
]);
|
|
||||||
await open(page, url);
|
|
||||||
const card = page.locator('details.curves');
|
|
||||||
await expect(card.locator('summary')).toHaveText('Curvas de probabilidad con su intervalo');
|
|
||||||
await expect(card).toHaveAttribute('open', '');
|
|
||||||
await expect(card.locator('li').first()).toContainText(
|
|
||||||
'Riesgo LIEAG+ (fecha índice 2026-06-01): 1 año: 8.0 % (IC 95 %: 5.0–12.0 %); 3 años: 21.0 %',
|
|
||||||
);
|
|
||||||
const plot = await card.locator('.js-plotly-plot').evaluate((e: any) => ({
|
|
||||||
names: e.data.filter((t: any) => t.showlegend !== false).map((t: any) => t.name),
|
|
||||||
series: Object.fromEntries(
|
|
||||||
e.data.filter((t: any) => t.mode?.includes('markers')).map((t: any) => [t.name, t.x]),
|
|
||||||
),
|
|
||||||
bands: e.data.filter((t: any) => t.fill === 'tonexty').map((t: any) => t.name),
|
|
||||||
ticks: e.layout.xaxis.tickvals,
|
|
||||||
title: e.layout.xaxis.title.text,
|
|
||||||
}));
|
|
||||||
expect(plot.series).toEqual({
|
|
||||||
'Riesgo LIEAG+': [1, 3, 5],
|
|
||||||
'Riesgo cáncer': [1, 3, 5],
|
|
||||||
'Sin intervalo': [2, 4],
|
|
||||||
'Un punto': [5],
|
|
||||||
});
|
|
||||||
expect(plot.bands).toEqual(['IC 95 % Riesgo LIEAG+', 'IC 95 % Riesgo cáncer']); // none for the models without intervals
|
|
||||||
expect(plot.ticks).toEqual([1, 2, 3, 4, 5]);
|
|
||||||
expect(plot.title).toBe('Horizonte (años desde la fecha índice (2026-06-01))');
|
|
||||||
// the reference is a separate table: its 0.27 % is nowhere in the figure
|
|
||||||
expect(
|
|
||||||
JSON.stringify(await card.locator('.js-plotly-plot').evaluate((e: any) => e.data)),
|
|
||||||
).not.toContain('0.27');
|
|
||||||
await expect(page.locator('[data-section=referencia-nci]')).toBeVisible();
|
|
||||||
});
|
|
||||||
-122
@@ -1,122 +0,0 @@
|
|||||||
import type { Page } from '@playwright/test';
|
|
||||||
|
|
||||||
/** What breaks a page's layout, measured in the browser: overlapping texts (also inside
|
|
||||||
* Plotly figures: legend against axis titles, tick labels), labels clipped at a figure's
|
|
||||||
* edge, labels that wrap where they should not (buttons, badges), a header taller than one
|
|
||||||
* row, text cut by its own box, and a page wider than the window. Empty: nothing found. */
|
|
||||||
export async function layoutProblems(page: Page): Promise<string[]> {
|
|
||||||
return page.evaluate(() => {
|
|
||||||
const found: string[] = [];
|
|
||||||
const box = (e: Element) => e.getBoundingClientRect();
|
|
||||||
const hit = (a: DOMRect, b: DOMRect) =>
|
|
||||||
a.width > 0 &&
|
|
||||||
b.width > 0 &&
|
|
||||||
a.left < b.right - 1 &&
|
|
||||||
b.left < a.right - 1 &&
|
|
||||||
a.top < b.bottom - 1 &&
|
|
||||||
b.top < a.bottom - 1;
|
|
||||||
const where = (el: Element) => {
|
|
||||||
const card = el.closest('mat-card, section, .card');
|
|
||||||
const h = card?.querySelector('h1,h2,h3,h4,mat-card-title');
|
|
||||||
return (h?.textContent ?? '').trim().slice(0, 60);
|
|
||||||
};
|
|
||||||
if (document.documentElement.scrollWidth > window.innerWidth + 1)
|
|
||||||
found.push(
|
|
||||||
`page overflows horizontally: ${document.documentElement.scrollWidth} > ${window.innerWidth}`,
|
|
||||||
);
|
|
||||||
for (const plot of document.querySelectorAll('.js-plotly-plot')) {
|
|
||||||
const texts = [
|
|
||||||
...plot.querySelectorAll(
|
|
||||||
'.legend, .g-xtitle text, .g-ytitle text, .xtitle, .ytitle, .gtitle',
|
|
||||||
),
|
|
||||||
];
|
|
||||||
for (let i = 0; i < texts.length; i++)
|
|
||||||
for (let j = i + 1; j < texts.length; j++)
|
|
||||||
if (
|
|
||||||
!texts[i].contains(texts[j]) &&
|
|
||||||
!texts[j].contains(texts[i]) &&
|
|
||||||
hit(box(texts[i]), box(texts[j]))
|
|
||||||
)
|
|
||||||
found.push(
|
|
||||||
`plot "${where(plot)}": ${texts[i].getAttribute('class')} overlaps ${texts[j].getAttribute('class')}`,
|
|
||||||
);
|
|
||||||
const host = box(plot);
|
|
||||||
for (const t of plot.querySelectorAll('.slicetext, .xtick text, .ytick text, .legendtext')) {
|
|
||||||
const b = box(t);
|
|
||||||
if (b.width && (b.left < host.left - 1 || b.right > host.right + 1))
|
|
||||||
found.push(`plot "${where(plot)}": text "${t.textContent}" clipped at the edge`);
|
|
||||||
}
|
|
||||||
const ticks = [...plot.querySelectorAll('.xtick text')].map(box);
|
|
||||||
for (let i = 1; i < ticks.length; i++)
|
|
||||||
if (hit(ticks[i - 1], ticks[i])) {
|
|
||||||
found.push(`plot "${where(plot)}": x tick labels overlap`);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Text elements overlapping each other (headings, labels, buttons, table cells).
|
|
||||||
const els = [
|
|
||||||
...document.querySelectorAll<HTMLElement>(
|
|
||||||
'h1,h2,h3,h4,p,label,button,a,dt,dd,th,td,mat-card-title,.mdc-tab__text-label,mat-label,li',
|
|
||||||
),
|
|
||||||
].filter(
|
|
||||||
(e: any) =>
|
|
||||||
e.offsetParent &&
|
|
||||||
box(e).width > 0 &&
|
|
||||||
box(e).height > 0 &&
|
|
||||||
!e.closest('.js-plotly-plot, .cdk-overlay-container') &&
|
|
||||||
!e.closest('details:not([open]) > :not(summary)'),
|
|
||||||
);
|
|
||||||
for (let i = 0; i < els.length; i++)
|
|
||||||
for (let j = i + 1; j < Math.min(els.length, i + 40); j++) {
|
|
||||||
const a = els[i],
|
|
||||||
b = els[j];
|
|
||||||
if (a.contains(b) || b.contains(a)) continue;
|
|
||||||
if (hit(box(a), box(b)))
|
|
||||||
found.push(
|
|
||||||
`"${(a.textContent ?? '').trim().slice(0, 30)}" overlaps "${(b.textContent ?? '').trim().slice(0, 30)}" (${where(a)})`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// Text cut by its own box (ellipsis or overflow hidden).
|
|
||||||
for (const e of document.querySelectorAll<HTMLElement>(
|
|
||||||
'button, .mdc-tab__text-label, th, mat-label, .mat-mdc-select-value-text',
|
|
||||||
))
|
|
||||||
if (
|
|
||||||
e.offsetParent &&
|
|
||||||
e.scrollWidth > e.clientWidth + 2 &&
|
|
||||||
getComputedStyle(e).overflow !== 'visible'
|
|
||||||
)
|
|
||||||
found.push(`text cut: "${(e.textContent ?? '').trim().slice(0, 40)}"`);
|
|
||||||
const header = document.querySelector('.header');
|
|
||||||
if (header && header.getBoundingClientRect().height > 90 && window.innerWidth > 720)
|
|
||||||
found.push(
|
|
||||||
`header taller than one row: ${Math.round(header.getBoundingClientRect().height)}px`,
|
|
||||||
);
|
|
||||||
for (const b of document.querySelectorAll<HTMLElement>(
|
|
||||||
'button:not(.mat-button-toggle-button), a.mdc-button, .badge, .mat-mdc-chip',
|
|
||||||
)) {
|
|
||||||
const label = (b.querySelector('.mdc-button__label') as HTMLElement | null) ?? b;
|
|
||||||
const lines =
|
|
||||||
label.getClientRects().length &&
|
|
||||||
Math.round(
|
|
||||||
label.getBoundingClientRect().height /
|
|
||||||
parseFloat(getComputedStyle(label).lineHeight || '20'),
|
|
||||||
);
|
|
||||||
if (b.offsetParent && lines > 1 && (label.textContent ?? '').trim().length < 40)
|
|
||||||
found.push(`label wraps: "${(label.textContent ?? '').trim()}"`);
|
|
||||||
}
|
|
||||||
const icons = [
|
|
||||||
...document.querySelectorAll('header mat-icon, header a, header button, header .title'),
|
|
||||||
];
|
|
||||||
for (let i = 0; i < icons.length; i++)
|
|
||||||
for (let j = i + 1; j < icons.length; j++)
|
|
||||||
if (
|
|
||||||
!icons[i].contains(icons[j]) &&
|
|
||||||
!icons[j].contains(icons[i]) &&
|
|
||||||
hit(box(icons[i]), box(icons[j]))
|
|
||||||
)
|
|
||||||
found.push(
|
|
||||||
`header: "${(icons[i].textContent ?? '').trim().slice(0, 20)}" overlaps "${(icons[j].textContent ?? '').trim().slice(0, 20)}"`,
|
|
||||||
);
|
|
||||||
return [...new Set(found)];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,368 +0,0 @@
|
|||||||
import { readFileSync } from 'node:fs';
|
|
||||||
import { expect, Page, test } from '@playwright/test';
|
|
||||||
import { layoutProblems } from './layout';
|
|
||||||
|
|
||||||
/** Every page loads from the API with no failed request and no console error. */
|
|
||||||
function watch(page: Page): string[] {
|
|
||||||
const problems: string[] = [];
|
|
||||||
page.on('console', (m) => m.type() === 'error' && problems.push(`console: ${m.text()}`));
|
|
||||||
page.on('response', (r) => r.status() >= 400 && problems.push(`${r.status()} ${r.url()}`));
|
|
||||||
page.on('pageerror', (e) => problems.push(`page: ${e.message}`));
|
|
||||||
return problems;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The pages show only to someone signed in (the API itself answers everyone).
|
|
||||||
test.beforeEach(async ({ page }) => {
|
|
||||||
const signed = await page.request.post('/api/auth/login', {
|
|
||||||
form: { username: 'admin@isssteleon.mx', password: 'solo-para-pruebas' },
|
|
||||||
});
|
|
||||||
expect(signed.status()).toBe(204);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('login: the pages wait for a sign-in, and a wrong password says so', async ({ browser }) => {
|
|
||||||
const page = await browser.newPage({ baseURL: 'http://127.0.0.1:4310' });
|
|
||||||
await page.goto('/conectar');
|
|
||||||
await expect(page).toHaveURL(/\/login\?next=%2Fconectar/);
|
|
||||||
await expect(page.getByRole('heading', { name: 'Inicio de sesión' })).toBeVisible();
|
|
||||||
await page.getByRole('textbox', { name: 'Usuario' }).fill('admin@isssteleon.mx');
|
|
||||||
await page.getByRole('textbox', { name: 'Contraseña' }).fill('otra');
|
|
||||||
await page.getByRole('button', { name: 'Ingresar' }).click();
|
|
||||||
await expect(page.getByText('Usuario o contraseña incorrectos.')).toBeVisible();
|
|
||||||
await page.getByRole('textbox', { name: 'Contraseña' }).fill('solo-para-pruebas');
|
|
||||||
await page.getByRole('button', { name: 'Ingresar' }).click();
|
|
||||||
await expect(page).toHaveURL(/\/conectar$/);
|
|
||||||
await page.getByRole('button', { name: 'Cuenta' }).click();
|
|
||||||
await page.getByRole('menuitem', { name: 'Salir' }).click();
|
|
||||||
await expect(page).toHaveURL(/\/login/);
|
|
||||||
await page.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
test("indicators: the KPIs are the API's MeasureReports, every tab and the patient view load", async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const problems = watch(page);
|
|
||||||
const report = page.waitForResponse(
|
|
||||||
(r) =>
|
|
||||||
r.url().includes('MeasureReport') &&
|
|
||||||
r.url().includes('measure=cacu-eu7') &&
|
|
||||||
!r.url().includes('%2C'),
|
|
||||||
);
|
|
||||||
await page.goto('/indicadores/cacu');
|
|
||||||
const eu7 = await (await report).json();
|
|
||||||
const count = eu7.entry[0].resource.group[0].population.find(
|
|
||||||
(p: any) => p.code.coding[0].code === 'initial-population',
|
|
||||||
).count;
|
|
||||||
// the card says it as the old one did: "<n> pacientes"
|
|
||||||
await expect(page.locator('[data-measure="CACU_EU7"] .kpi-value')).toHaveText(
|
|
||||||
`${count.toLocaleString('es-MX')} pacientes`,
|
|
||||||
);
|
|
||||||
await expect(page.locator('app-tab-indicadores app-plot').first()).toBeVisible();
|
|
||||||
|
|
||||||
await page.getByRole('tab', { name: 'Trazabilidad' }).click();
|
|
||||||
await expect(page.locator('app-tab-trazabilidad section.panel')).toHaveCount(9);
|
|
||||||
|
|
||||||
await page.getByRole('tab', { name: 'Datos y definiciones' }).click();
|
|
||||||
await expect(page.locator('app-tab-definiciones details')).toHaveCount(21);
|
|
||||||
|
|
||||||
const list = page.waitForResponse((r) => r.url().includes('/fhir/Patient?'));
|
|
||||||
await page.getByRole('tab', { name: 'Análisis de riesgos' }).click();
|
|
||||||
const bundle = await (await list).json();
|
|
||||||
const patient = bundle.entry.find((e: any) => e.search.mode === 'match').resource;
|
|
||||||
const first = patient.name?.[0]?.text ?? patient.id.slice(0, 10);
|
|
||||||
const rows = page.locator('table.worklist tbody tr');
|
|
||||||
await expect(rows).toHaveCount(Math.min(20, bundle.total));
|
|
||||||
await expect(rows.first().locator('a').first()).toHaveText(first);
|
|
||||||
await page.getByRole('button', { name: 'Siguiente' }).click();
|
|
||||||
await expect(page.getByText('Página 2 de')).toBeVisible();
|
|
||||||
|
|
||||||
await page.getByRole('button', { name: 'Anterior' }).click();
|
|
||||||
await rows.first().locator('a').first().click();
|
|
||||||
await expect(page.getByText('Historial médico')).toBeVisible();
|
|
||||||
await expect(page.getByText('Pruebas y resultados')).toBeVisible();
|
|
||||||
await expect(
|
|
||||||
page.locator('app-paciente table').nth(1).locator('tbody tr').first(),
|
|
||||||
).not.toContainText('Sin estudios');
|
|
||||||
|
|
||||||
await page.goto('/indicadores/cama');
|
|
||||||
await expect(page.getByRole('tab', { name: 'Indicadores' })).toBeVisible();
|
|
||||||
await page.getByRole('tab', { name: 'Análisis de riesgos' }).click();
|
|
||||||
await page.locator('mat-form-field', { hasText: 'Ventana' }).click();
|
|
||||||
await page.getByRole('option', { name: '12 meses' }).click();
|
|
||||||
const camaRows = page.locator('table.worklist tbody tr');
|
|
||||||
await expect(camaRows.first()).toContainText('BI-RADS');
|
|
||||||
await page.goto('/indicadores/tea');
|
|
||||||
await expect(page.getByRole('tab', { name: 'Resumen' })).toBeVisible();
|
|
||||||
expect(problems).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('conectar: open the hospital pipeline, preview a source, run it to success', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const problems = watch(page);
|
|
||||||
await page.goto('/conectar');
|
|
||||||
await page.getByText('cacu', { exact: true }).click();
|
|
||||||
await expect(page.locator('vflow')).toBeVisible();
|
|
||||||
// a node's caption: its kind, then its name
|
|
||||||
await page.locator('.node-caption', { hasText: 'Fuente de datosPacientes' }).click();
|
|
||||||
// drawn from a fixture, read back as a guided SQLite source: the dialog edits it
|
|
||||||
await expect(page.getByRole('button', { name: 'Editar conexión' })).toBeVisible();
|
|
||||||
await page.getByRole('button', { name: 'Vista previa' }).click();
|
|
||||||
await expect(page.locator('.preview tr[mat-row]').first()).toBeVisible();
|
|
||||||
// A map node shows the site's codes in platform terms (its ConceptMap), editable as rows.
|
|
||||||
await page
|
|
||||||
.locator('.node-caption', { hasText: 'Traducir códigos' })
|
|
||||||
.filter({ has: page.locator('.name', { hasText: /^Citología$/ }) })
|
|
||||||
.click();
|
|
||||||
await expect(page.getByRole('heading', { name: /^Códigos del sitio/ })).toBeVisible();
|
|
||||||
await expect
|
|
||||||
.poll(() =>
|
|
||||||
page
|
|
||||||
.locator('app-concept-map-editor input')
|
|
||||||
.evaluateAll((els) => els.map((e) => (e as HTMLInputElement).value)),
|
|
||||||
)
|
|
||||||
.toContain('LIEAG');
|
|
||||||
await page.getByRole('button', { name: 'Ejecutar' }).click();
|
|
||||||
await expect(page.getByText('SUCCESS')).toBeVisible({ timeout: 10 * 60_000 });
|
|
||||||
expect(problems).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('revision: what the hospital source holds, and a decision through the page', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const problems = watch(page);
|
|
||||||
await page.goto('/revision');
|
|
||||||
await page.getByRole('tab', { name: 'Personas' }).click();
|
|
||||||
await page.locator('mat-form-field', { hasText: 'Canalización' }).click();
|
|
||||||
await page.getByRole('option', { name: 'site', exact: true }).click();
|
|
||||||
await expect(page.getByText(/Posibles pacientes duplicadas \([1-9]/)).toBeVisible();
|
|
||||||
await page.getByRole('button', { name: 'Distintas' }).first().click();
|
|
||||||
await expect(page.getByText('Decisión registrada.')).toBeVisible();
|
|
||||||
expect(problems).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('gobernanza: a version with its reports, its curves, and promotion refused without validation', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const problems = watch(page);
|
|
||||||
await page.goto('/gobernanza/cama');
|
|
||||||
await expect(page.getByRole('heading', { name: 'Supervivencia' })).toBeVisible();
|
|
||||||
const version = page.locator('tr', { hasText: 'v1' });
|
|
||||||
await expect(version.getByRole('link', { name: 'Validación técnica' })).toBeVisible();
|
|
||||||
await version.getByRole('button', { name: 'Ver gráficas' }).click();
|
|
||||||
await expect(page.locator('app-plot .plot svg').first()).toBeVisible();
|
|
||||||
await version.getByRole('button', { name: 'Promover' }).click();
|
|
||||||
await expect(page.getByText('No se promovió')).toContainText('Validación clínica');
|
|
||||||
expect(problems.filter((p) => !p.includes('409'))).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('conectar: someone who knows nothing of databases connects the SQL Server with the dialog', async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const site = new URL((process.env['SITE_URL'] ?? '').replace(/^mssql\+pymssql/, 'http'));
|
|
||||||
const problems = watch(page);
|
|
||||||
await page.goto('/conectar');
|
|
||||||
await page.getByLabel('Nueva canalización').fill('asistente');
|
|
||||||
await page.getByLabel('Nueva canalización').press('Enter');
|
|
||||||
await page.getByRole('button', { name: 'Fuente de datos' }).click();
|
|
||||||
await expect(page.getByText('¿Dónde están los datos?')).toBeVisible();
|
|
||||||
await page.locator('[data-type="sqlserver"]').click();
|
|
||||||
await page.locator('[data-field="host"]').fill(site.hostname);
|
|
||||||
await page.locator('[data-field="database"]').fill(site.pathname.slice(1));
|
|
||||||
await page.locator('[data-field="user"]').fill(decodeURIComponent(site.username));
|
|
||||||
await page.locator('[data-field="password"]').fill(decodeURIComponent(site.password));
|
|
||||||
await page.getByRole('button', { name: 'Probar conexión' }).click();
|
|
||||||
await expect(page.getByText('Conexión correcta: 1 tabla.')).toBeVisible();
|
|
||||||
await page.locator('mat-select[data-field="table"]').click();
|
|
||||||
await page.getByRole('option', { name: 'ResultadoSubrogado' }).click();
|
|
||||||
await expect(page.getByText(/(Las primeras \d+ filas|La primera fila):/)).toBeVisible();
|
|
||||||
await page.getByLabel('Nombre de esta fuente').fill('Resultados');
|
|
||||||
await page.getByRole('button', { name: 'Guardar', exact: true }).last().click();
|
|
||||||
await expect(page.locator('.node-caption', { hasText: 'Resultados' })).toBeVisible();
|
|
||||||
// A wrong password says so in words, not a stack trace.
|
|
||||||
await page.getByRole('button', { name: 'Editar conexión' }).click();
|
|
||||||
await page.locator('[data-field="password"]').fill('not-it');
|
|
||||||
await page.getByRole('button', { name: 'Probar conexión' }).click();
|
|
||||||
await expect(page.getByText(/usuario o la contraseña no son correctos/)).toBeVisible();
|
|
||||||
await page.getByRole('button', { name: 'Cancelar' }).click();
|
|
||||||
await expect(page.getByRole('dialog')).toHaveCount(0);
|
|
||||||
await page.getByRole('button', { name: 'Guardar', exact: true }).click();
|
|
||||||
await expect(page.getByText('Versión 1 guardada.')).toBeVisible();
|
|
||||||
expect(problems).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
/** The old app's Indicadores tab as captured (tools/capture_pages.py): its headings from the
|
|
||||||
* opportunity section on, in order, and the kind of each plot (its traces' types). */
|
|
||||||
function captured(domain: string) {
|
|
||||||
const path = `../tests/fixtures/reference/${domain}/ui/pages.json`;
|
|
||||||
const tabs = JSON.parse(readFileSync(path, 'utf8')).tabs;
|
|
||||||
const items = (tabs['Indicadores'] ?? tabs['Resumen']) as any[]; // TEA's first tab is its summary
|
|
||||||
const from = items.findIndex((i) => i.text === 'Indicadores de oportunidad');
|
|
||||||
return items
|
|
||||||
.slice(from)
|
|
||||||
.filter((i) => ['h2', 'h3', 'plot'].includes(i.kind))
|
|
||||||
.filter((i) => !/^(cacu|cama|tea), /.test(i.text ?? '')); // a figure's machine caption
|
|
||||||
}
|
|
||||||
const period = (text: string) => text.replace(/, \d{4}-(S[12]|\d{2})$/, ', <periodo>');
|
|
||||||
const kindOf = (types: string[]) => [...new Set(types)].sort().join('+');
|
|
||||||
|
|
||||||
// CaCu's page is its own (Phase 6); CaMa's and TEA's follow the old one.
|
|
||||||
for (const domain of ['cama', 'tea']) {
|
|
||||||
test(`indicadores ${domain}: the old page's headings, in order, and the same kinds of plots`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const all = captured(domain);
|
|
||||||
// CaMa's five timeliness boxes are one route card now: its heading stands for them.
|
|
||||||
const route = all.findIndex(
|
|
||||||
(i) => i.kind === 'h3' && i.text === 'Tiempo de tamizaje a diagnóstico',
|
|
||||||
);
|
|
||||||
const clinical = all.findIndex((i) => i.text === 'Indicadores clínicos');
|
|
||||||
// Lote 2: the detection rate has its own title, and the histopathology figures are two
|
|
||||||
// cards (the result by BI-RADS; the confirmation in two readings).
|
|
||||||
const detection = (i: { text?: string }) =>
|
|
||||||
i.text === 'Tasa de confirmación histopatológica'
|
|
||||||
? { ...i, text: 'Tasa de detección histopatológica' }
|
|
||||||
: i;
|
|
||||||
const results = all.findIndex(
|
|
||||||
(i) => i.text === 'Resultado histopatológico por categoría BI-RADS',
|
|
||||||
);
|
|
||||||
const cards = [
|
|
||||||
{ kind: 'h3', text: 'Resultado histopatológico por categoría BI-RADS' },
|
|
||||||
{ kind: 'h3', text: 'Confirmación histopatológica' }, // one card: title, tabs and reading
|
|
||||||
];
|
|
||||||
const old =
|
|
||||||
domain === 'cama'
|
|
||||||
? [...all.slice(0, route + 1).map(detection), ...all.slice(clinical, results), ...cards]
|
|
||||||
: all;
|
|
||||||
await page.goto(`/indicadores/${domain}`);
|
|
||||||
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()));
|
|
||||||
const from = headings.indexOf('Indicadores de oportunidad');
|
|
||||||
expect(headings.slice(from).map(period)).toEqual(
|
|
||||||
old.filter((i) => i.kind !== 'plot').map((i) => period(i.text)),
|
|
||||||
);
|
|
||||||
// Each figure drawn is one of the old kinds (a figure with no data in the period is named).
|
|
||||||
const drawn = await tab
|
|
||||||
.locator('.js-plotly-plot')
|
|
||||||
.evaluateAll((els) =>
|
|
||||||
els.map((e: any) => (e.data ?? []).map((t: any) => t.type ?? 'scatter')),
|
|
||||||
);
|
|
||||||
const kinds = new Set(
|
|
||||||
old.filter((i) => i.kind === 'plot').map((i) => kindOf(i.traces.map((t: any) => t.type))),
|
|
||||||
);
|
|
||||||
for (const types of drawn) expect(kinds).toContain(kindOf(types));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const domain of ['cacu', 'cama', 'tea']) {
|
|
||||||
test(`trazabilidad ${domain}: the old tab's panels, in order, and the same kinds of plots`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const tabs = JSON.parse(
|
|
||||||
readFileSync(`../tests/fixtures/reference/${domain}/ui/pages.json`, 'utf8'),
|
|
||||||
).tabs;
|
|
||||||
const old = (tabs['Trazabilidad'] as any[]).filter((i) =>
|
|
||||||
['h2', 'h3', 'plot'].includes(i.kind),
|
|
||||||
);
|
|
||||||
await page.goto(`/indicadores/${domain}`);
|
|
||||||
await page.getByRole('tab', { name: 'Trazabilidad' }).click();
|
|
||||||
const tab = page.locator('app-tab-trazabilidad');
|
|
||||||
await expect(tab.getByRole('heading', { name: 'Filtros' })).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).toEqual(old.filter((i) => i.kind !== 'plot').map((i) => i.text));
|
|
||||||
const drawn = await tab
|
|
||||||
.locator('.js-plotly-plot')
|
|
||||||
.evaluateAll((els) =>
|
|
||||||
els.map((e: any) => (e.data ?? []).map((t: any) => t.type ?? 'scatter')),
|
|
||||||
);
|
|
||||||
const kinds = new Set(
|
|
||||||
old.filter((i) => i.kind === 'plot').map((i) => kindOf(i.traces.map((t: any) => t.type))),
|
|
||||||
);
|
|
||||||
for (const types of drawn) expect(kinds).toContain(kindOf(types));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const domain of ['cacu', 'cama', 'tea']) {
|
|
||||||
test(`datos y definiciones ${domain}: the old tab's headings and an indicator that opens`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
const tabs = JSON.parse(
|
|
||||||
readFileSync(`../tests/fixtures/reference/${domain}/ui/pages.json`, 'utf8'),
|
|
||||||
).tabs;
|
|
||||||
const old = (tabs['Datos y definiciones'] as any[])
|
|
||||||
.filter((i) => ['h2', 'h3'].includes(i.kind))
|
|
||||||
.map((i) => i.text);
|
|
||||||
await page.goto(`/indicadores/${domain}`);
|
|
||||||
await page.getByRole('tab', { name: 'Datos y definiciones' }).click();
|
|
||||||
const tab = page.locator('app-tab-definiciones');
|
|
||||||
await expect(tab.getByRole('heading', { name: 'Catálogo de indicadores' })).toBeVisible();
|
|
||||||
const headings = await tab
|
|
||||||
.locator('h2, h3')
|
|
||||||
.evaluateAll((els) => els.map((e) => (e as HTMLElement).innerText.trim()));
|
|
||||||
expect(headings).toEqual(old);
|
|
||||||
await tab.locator('summary').first().click();
|
|
||||||
await expect(
|
|
||||||
tab.getByRole('heading', { name: 'Tipos de periodo admitidos' }).first(),
|
|
||||||
).toBeVisible();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Waits for a page's data: no loading indicator left. */
|
|
||||||
async function loaded(page: Page): Promise<void> {
|
|
||||||
await expect(page.locator('app-loading, mat-progress-bar')).toHaveCount(0, {
|
|
||||||
timeout: 5 * 60_000,
|
|
||||||
});
|
|
||||||
await page.waitForTimeout(1000); // plots finish drawing
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const width of [1440, 820]) {
|
|
||||||
test(`layout at ${width} px: no page has overlapping, clipped or wrapped labels`, async ({
|
|
||||||
page,
|
|
||||||
}) => {
|
|
||||||
await page.setViewportSize({ width, height: 1000 });
|
|
||||||
const found: string[] = [];
|
|
||||||
const check = async (where: string) => {
|
|
||||||
await loaded(page);
|
|
||||||
for (const p of await layoutProblems(page)) found.push(`${where}: ${p}`);
|
|
||||||
};
|
|
||||||
for (const domain of ['cacu', 'cama', 'tea']) {
|
|
||||||
await page.goto(`/indicadores/${domain}`);
|
|
||||||
const tabs = page.locator('.mdc-tab');
|
|
||||||
for (let i = 0; i < (await tabs.count()); i++) {
|
|
||||||
await tabs.nth(i).click();
|
|
||||||
await check(`${domain} tab ${i + 1}`);
|
|
||||||
}
|
|
||||||
// the record of the risk list's first patient
|
|
||||||
await tabs.nth(2).click();
|
|
||||||
await loaded(page);
|
|
||||||
const first = page.locator('table a[href*="/pacientes/"]').first();
|
|
||||||
if (await first.count()) {
|
|
||||||
await first.click();
|
|
||||||
await check(`${domain} record`);
|
|
||||||
}
|
|
||||||
await page.goto(`/gobernanza/${domain}`);
|
|
||||||
await check(`${domain} gobernanza`);
|
|
||||||
}
|
|
||||||
await page.goto('/conectar');
|
|
||||||
await check('conectar');
|
|
||||||
// a pipeline open, a node chosen, in both of its panel's tabs
|
|
||||||
await page.locator('.pipelines [mat-list-item]').first().click();
|
|
||||||
await page.locator('.node-caption').first().dispatchEvent('click'); // the canvas may draw it off-screen
|
|
||||||
await check('conectar node');
|
|
||||||
await page.getByRole('tab', { name: 'Avanzado' }).click();
|
|
||||||
await check('conectar node, advanced');
|
|
||||||
await page.goto('/revision');
|
|
||||||
const tabs = page.locator('.mdc-tab');
|
|
||||||
for (let i = 0; i < (await tabs.count()); i++) {
|
|
||||||
await tabs.nth(i).click();
|
|
||||||
await check(`revision tab ${i + 1}`);
|
|
||||||
}
|
|
||||||
expect(found).toEqual([]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
import type { Page } from '@playwright/test';
|
|
||||||
|
|
||||||
/** SIMULATED answers. The pages read the API's aggregated MeasureReports; these helpers pass them
|
|
||||||
* through the browser and rewrite the screening-round strata, so the cards can be tried with the
|
|
||||||
* groups the contract of `rebuild` allows (stratum `round`, crossed `round-category`) without
|
|
||||||
* loading data. They prove how the page draws such answers, not what the backend computes.
|
|
||||||
*
|
|
||||||
* - `as-is`: the answers untouched, with a stratum named `screening_round` renamed `round`.
|
|
||||||
* - `no-initial`: nobody is in the initial group (the group is absent and the totals drop).
|
|
||||||
* - `unclassified`: the initial group folds into "Sin dato" (what 5740's answers look like).
|
|
||||||
* - `unpublished`: the round strata are not in the answers. */
|
|
||||||
export type Simulation = 'as-is' | 'no-initial' | 'unclassified' | 'unpublished';
|
|
||||||
|
|
||||||
type Stratum = {
|
|
||||||
value?: { text?: string };
|
|
||||||
component?: { value?: { text?: string } }[];
|
|
||||||
population?: { code?: { coding?: { code?: string }[] }; count: number }[];
|
|
||||||
};
|
|
||||||
type Stratifier = { code?: { coding?: { code?: string }[] }[]; stratum?: Stratum[] };
|
|
||||||
|
|
||||||
const named = (s: Stratifier) => (s.code ?? []).map((c) => c.coding?.[0]?.code).join('-');
|
|
||||||
const label = (x: Stratum) => x.component?.[0]?.value?.text ?? x.value?.text;
|
|
||||||
const pop = (o: { population?: Stratum['population'] }, code: string) =>
|
|
||||||
o.population?.find((p) => p.code?.coding?.[0]?.code === code);
|
|
||||||
|
|
||||||
function fold(into: Stratum, from: Stratum) {
|
|
||||||
for (const p of from.population ?? []) {
|
|
||||||
const q = pop(into, p.code!.coding![0].code!);
|
|
||||||
if (q) q.count += p.count;
|
|
||||||
else (into.population ??= []).push(structuredClone(p));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function simulate(report: any, how: Simulation) {
|
|
||||||
const group = report?.group?.[0];
|
|
||||||
if (!group) return report;
|
|
||||||
for (const s of group.stratifier ?? ([] as Stratifier[]))
|
|
||||||
for (const c of s.code ?? []) {
|
|
||||||
const k = c.coding?.[0];
|
|
||||||
if (k?.code === 'screening_round') k.code = 'round';
|
|
||||||
}
|
|
||||||
const rounds: Stratifier[] = (group.stratifier ?? []).filter((s: Stratifier) =>
|
|
||||||
['round', 'round-category'].includes(named(s)),
|
|
||||||
);
|
|
||||||
if (how === 'unpublished')
|
|
||||||
group.stratifier = (group.stratifier ?? []).filter((s: Stratifier) => !rounds.includes(s));
|
|
||||||
if (how === 'no-initial' || how === 'unclassified')
|
|
||||||
for (const s of rounds) {
|
|
||||||
const initial = (s.stratum ?? []).filter((x) => label(x) === 'initial');
|
|
||||||
const rest = (s.stratum ?? []).filter((x) => label(x) !== 'initial');
|
|
||||||
for (const x of initial) {
|
|
||||||
if (how === 'unclassified') {
|
|
||||||
const other = x.component?.[1]?.value?.text;
|
|
||||||
const target = rest.find(
|
|
||||||
(y) => label(y) === 'no_data' && (!other || y.component?.[1]?.value?.text === other),
|
|
||||||
);
|
|
||||||
if (target) fold(target, x);
|
|
||||||
else {
|
|
||||||
(x.component ? x.component[0].value! : x.value!).text = 'no_data';
|
|
||||||
rest.push(x);
|
|
||||||
}
|
|
||||||
} else if (named(s) === 'round') {
|
|
||||||
// the group vanishes and the period's total drops by its patients: a real zero
|
|
||||||
for (const p of x.population ?? []) {
|
|
||||||
const total = pop(group, p.code!.coding![0].code!);
|
|
||||||
if (total && p.code!.coding![0].code !== 'numerator')
|
|
||||||
total.count = Math.max(0, total.count - p.count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.stratum = rest;
|
|
||||||
}
|
|
||||||
return report;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Answers every CaCu MeasureReport search through `simulate`. */
|
|
||||||
export async function simulateRounds(page: Page, how: Simulation) {
|
|
||||||
await page.route('**/api/cacu/fhir/MeasureReport**', async (route) => {
|
|
||||||
const response = await route.fetch();
|
|
||||||
const body = await response.json();
|
|
||||||
for (const entry of body.entry ?? []) simulate(entry.resource, how);
|
|
||||||
await route.fulfill({
|
|
||||||
response,
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
contentType: 'application/fhir+json',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "node_modules/ng-openapi-gen/ng-openapi-gen-schema.json",
|
|
||||||
"input": "openapi.json",
|
|
||||||
"output": "src/app/api",
|
|
||||||
"ignoreUnusedModels": false
|
|
||||||
}
|
|
||||||
+33
-9
@@ -1,11 +1,35 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
root /usr/share/nginx/html;
|
server_name _;
|
||||||
location /api/ {
|
root /usr/share/nginx/html;
|
||||||
proxy_pass http://api:8000/;
|
|
||||||
proxy_read_timeout 120s;
|
# Files travel inside the import requests (multipart or base64 JSON):
|
||||||
}
|
# keep this above WebApi's WEBAPI_MAX_UPLOAD_MB (200 MB default) plus
|
||||||
location / {
|
# the ~33% base64 overhead.
|
||||||
try_files $uri $uri/ /index.html;
|
client_max_body_size 270m;
|
||||||
}
|
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
||||||
|
gzip_min_length 1024;
|
||||||
|
|
||||||
|
location ~ ^/(api|imports|data|cacu|cama|tea|governance|reportes|health)(/|$) {
|
||||||
|
proxy_pass http://webapi:5000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
# OCR over a stack of scanned pages takes a while.
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bundles carry a content hash in their name; index.html doesn't, so it
|
||||||
|
# must be revalidated or browsers keep running the previous release.
|
||||||
|
location ~* \.(js|css)$ {
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
add_header Cache-Control "no-cache";
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-6125
File diff suppressed because it is too large
Load Diff
Generated
+2709
-2621
File diff suppressed because it is too large
Load Diff
+22
-38
@@ -1,55 +1,39 @@
|
|||||||
{
|
{
|
||||||
"name": "webapp",
|
"name": "web-app",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --proxy-config proxy.conf.json",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test"
|
||||||
"api": "ng-openapi-gen -c ng-openapi-gen.json"
|
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "npm@11.20.0",
|
"packageManager": "npm@11.17.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/cdk": "^22.3.0",
|
"@angular/cdk": "^22.1.7",
|
||||||
"@angular/common": "^22.3.0",
|
"@angular/common": "^22.1.0",
|
||||||
"@angular/compiler": "^22.3.0",
|
"@angular/compiler": "^22.1.0",
|
||||||
"@angular/core": "^22.3.0",
|
"@angular/core": "^22.1.0",
|
||||||
"@angular/forms": "^22.3.0",
|
"@angular/forms": "^22.1.0",
|
||||||
"@angular/material": "^22.3.0",
|
"@angular/material": "^22.1.7",
|
||||||
"@angular/platform-browser": "^22.3.0",
|
"@angular/platform-browser": "^22.1.0",
|
||||||
"@angular/router": "^22.3.0",
|
"@angular/router": "^22.1.0",
|
||||||
"@fontsource/rajdhani": "5.3.0",
|
"@fontsource/rajdhani": "^5.3.0",
|
||||||
"@fontsource/roboto": "5.3.0",
|
"@fontsource/roboto": "^5.3.0",
|
||||||
"@ngx-formly/core": "11.2.0",
|
"@fontsource/roboto-mono": "^5.3.0",
|
||||||
"@ngx-formly/material": "11.2.0",
|
"material-icons": "^1.13.14",
|
||||||
"d3-drag": "3.0.0",
|
|
||||||
"d3-selection": "3.0.0",
|
|
||||||
"d3-zoom": "3.0.0",
|
|
||||||
"material-symbols": "0.48.3",
|
|
||||||
"ngx-vflow": "2.7.0",
|
|
||||||
"pdfmake": "0.3.14",
|
|
||||||
"plotly.js-cartesian-dist-min": "4.1.2",
|
"plotly.js-cartesian-dist-min": "4.1.2",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0"
|
||||||
"write-excel-file": "4.1.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/build": "^22.3.0",
|
"@angular/build": "^22.1.8",
|
||||||
"@angular/cli": "^22.3.0",
|
"@angular/cli": "^22.1.8",
|
||||||
"@angular/compiler-cli": "^22.3.0",
|
"@angular/compiler-cli": "^22.1.0",
|
||||||
"@playwright/test": "1.64.1",
|
"jsdom": "^28.0.0",
|
||||||
"@types/d3-drag": "3.0.7",
|
|
||||||
"@types/d3-selection": "3.0.13",
|
|
||||||
"@types/d3-zoom": "3.0.9",
|
|
||||||
"@types/fhir": "0.0.44",
|
|
||||||
"@types/pdfmake": "0.3.5",
|
|
||||||
"@types/plotly.js": "3.0.15",
|
|
||||||
"jsdom": "^31.0.0",
|
|
||||||
"ng-openapi-gen": "^1.1.0",
|
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"typescript": "~6.0.2",
|
"typescript": "~6.0.2",
|
||||||
"vitest": "^5.0.0"
|
"vitest": "^4.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
import { defineConfig } from '@playwright/test';
|
|
||||||
|
|
||||||
/** The pages against a running API (API_URL), served by the dev server with the same
|
|
||||||
* proxy the app uses in production (`/api`). Run by WebApi/tests/test_webapp.py, which
|
|
||||||
* starts the platform and loads the synthetic hospital first. */
|
|
||||||
export default defineConfig({
|
|
||||||
testDir: 'e2e',
|
|
||||||
timeout: 15 * 60_000,
|
|
||||||
expect: { timeout: 60_000 },
|
|
||||||
workers: 1,
|
|
||||||
reporter: 'list',
|
|
||||||
use: {
|
|
||||||
baseURL: 'http://127.0.0.1:4310',
|
|
||||||
viewport: { width: 1440, height: 1000 },
|
|
||||||
actionTimeout: 60_000, // a stuck step fails, not the whole run
|
|
||||||
},
|
|
||||||
webServer: {
|
|
||||||
// IPv4 explicitly: `localhost` may resolve to ::1 only (CI containers), where the url below never answers.
|
|
||||||
command: 'npx ng serve --host 127.0.0.1 --port 4310 --proxy-config proxy.e2e.mjs',
|
|
||||||
env: { NG_CLI_ANALYTICS: 'false' },
|
|
||||||
url: 'http://127.0.0.1:4310',
|
|
||||||
timeout: 180_000,
|
|
||||||
reuseExistingServer: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
+11
-1
@@ -1 +1,11 @@
|
|||||||
{ "/api": { "target": "http://127.0.0.1:5711", "pathRewrite": { "^/api": "" } } }
|
{
|
||||||
|
"/api": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/imports": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/data": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/health": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/cacu": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/cama": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/tea": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/governance": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true },
|
||||||
|
"/reportes": { "target": "http://localhost:5050", "secure": false, "changeOrigin": true }
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
// `/api` to the API the e2e run started (API_URL).
|
|
||||||
export default { '/api': { target: process.env.API_URL, pathRewrite: { '^/api': '' } } };
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 15 KiB |
+25
-25
@@ -4,7 +4,7 @@
|
|||||||
@use 'sass:map';
|
@use 'sass:map';
|
||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
|
|
||||||
// Note: Color palettes are generated from primary: #a8c243, tertiary: #5f9ea0
|
// Note: Color palettes are generated from primary: #a8c243, tertiary: #5f9ea0, neutral: #5c5f66
|
||||||
$_palettes: (
|
$_palettes: (
|
||||||
primary: (
|
primary: (
|
||||||
0: #000000,
|
0: #000000,
|
||||||
@@ -62,31 +62,31 @@ $_palettes: (
|
|||||||
),
|
),
|
||||||
neutral: (
|
neutral: (
|
||||||
0: #000000,
|
0: #000000,
|
||||||
10: #1b1c14,
|
10: #181c22,
|
||||||
20: #303128,
|
20: #2d3037,
|
||||||
25: #3b3c32,
|
25: #383b42,
|
||||||
30: #46483d,
|
30: #44474d,
|
||||||
35: #525348,
|
35: #4f5259,
|
||||||
40: #5e5f54,
|
40: #5b5e65,
|
||||||
50: #77786c,
|
50: #74777e,
|
||||||
60: #919285,
|
60: #8e9198,
|
||||||
70: #acac9f,
|
70: #a9abb3,
|
||||||
80: #c7c7b9,
|
80: #c4c6ce,
|
||||||
90: #e4e3d5,
|
90: #e0e2ea,
|
||||||
95: #f2f2e3,
|
95: #eff0f9,
|
||||||
98: #fbfaeb,
|
98: #f9f9ff,
|
||||||
99: #fdfdf5,
|
99: #fdfcff,
|
||||||
100: #ffffff,
|
100: #ffffff,
|
||||||
4: #0d0f07,
|
4: #0b0e14,
|
||||||
6: #13140c,
|
6: #101419,
|
||||||
12: #1f2017,
|
12: #1c2026,
|
||||||
17: #292b21,
|
17: #272a30,
|
||||||
22: #34362c,
|
22: #32353b,
|
||||||
24: #393a30,
|
24: #363940,
|
||||||
87: #dbdbcd,
|
87: #d8dae2,
|
||||||
92: #e9e9da,
|
92: #e6e8f0,
|
||||||
94: #efefe0,
|
94: #ecedf6,
|
||||||
96: #f5f4e6,
|
96: #f1f3fc,
|
||||||
),
|
),
|
||||||
neutral-variant: (
|
neutral-variant: (
|
||||||
0: #000000,
|
0: #000000,
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the ApiConfiguration configuration object with a given root URL.
|
|
||||||
*/
|
|
||||||
export function provideApiConfiguration(rootUrl: string) {
|
|
||||||
var config = new ApiConfiguration();
|
|
||||||
config.rootUrl = rootUrl;
|
|
||||||
return {
|
|
||||||
provide: ApiConfiguration,
|
|
||||||
useValue: config
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Global configuration
|
|
||||||
*/
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class ApiConfiguration {
|
|
||||||
rootUrl: string = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable, firstValueFrom } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { ApiConfiguration } from './api-configuration';
|
|
||||||
import { StrictHttpResponse } from './strict-http-response';
|
|
||||||
|
|
||||||
export type ApiFnOptional<P, R> = (http: HttpClient, rootUrl: string, params?: P, context?: HttpContext) => Observable<StrictHttpResponse<R>>;
|
|
||||||
export type ApiFnRequired<P, R> = (http: HttpClient, rootUrl: string, params: P, context?: HttpContext) => Observable<StrictHttpResponse<R>>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper service to call API functions directly
|
|
||||||
*/
|
|
||||||
@Injectable({ providedIn: 'root' })
|
|
||||||
export class Api {
|
|
||||||
constructor(
|
|
||||||
private config: ApiConfiguration,
|
|
||||||
private http: HttpClient
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
private _rootUrl?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the root url for API operations. If not set directly here,
|
|
||||||
* will fallback to `ApiConfiguration.rootUrl`.
|
|
||||||
*/
|
|
||||||
get rootUrl(): string {
|
|
||||||
return this._rootUrl || this.config.rootUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the root URL for API operations
|
|
||||||
*/
|
|
||||||
set rootUrl(rootUrl: string) {
|
|
||||||
this._rootUrl = rootUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes an API call, returning the response body only
|
|
||||||
*/
|
|
||||||
invoke<P, R>(fn: ApiFnRequired<P, R>, params: P, context?: HttpContext): Promise<R>;
|
|
||||||
invoke<P, R>(fn: ApiFnOptional<P, R>, params?: P, context?: HttpContext): Promise<R>;
|
|
||||||
async invoke<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params: P, context?: HttpContext): Promise<R> {
|
|
||||||
const resp = this.invoke$Response(fn, params, context);
|
|
||||||
return (await resp).body;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes an API call, returning the entire response
|
|
||||||
*/
|
|
||||||
invoke$Response<P, R>(fn: ApiFnRequired<P, R>, params: P, context?: HttpContext): Promise<StrictHttpResponse<R>>;
|
|
||||||
invoke$Response<P, R>(fn: ApiFnOptional<P, R>, params?: P, context?: HttpContext): Promise<StrictHttpResponse<R>>;
|
|
||||||
invoke$Response<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params: P, context?: HttpContext): Promise<StrictHttpResponse<R>> {
|
|
||||||
const obs = fn(this.http, this.rootUrl, params, context)
|
|
||||||
.pipe(
|
|
||||||
filter(r => r instanceof HttpResponse),
|
|
||||||
map(r => r as StrictHttpResponse<R>));
|
|
||||||
return firstValueFrom(obs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Login } from '../../models/login';
|
|
||||||
|
|
||||||
export interface AuthCookieLogin$Params {
|
|
||||||
body: Login
|
|
||||||
}
|
|
||||||
|
|
||||||
export function authCookieLogin(http: HttpClient, rootUrl: string, params: AuthCookieLogin$Params, context?: HttpContext): Observable<StrictHttpResponse<any>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, authCookieLogin.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/x-www-form-urlencoded');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<any>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
authCookieLogin.PATH = '/auth/login';
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface AuthCookieLogout$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function authCookieLogout(http: HttpClient, rootUrl: string, params?: AuthCookieLogout$Params, context?: HttpContext): Observable<StrictHttpResponse<any>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, authCookieLogout.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<any>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
authCookieLogout.PATH = '/auth/logout';
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Study } from '../../models/study';
|
|
||||||
|
|
||||||
export interface Studies$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function studies(http: HttpClient, rootUrl: string, params?: Studies$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<Study>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, studies.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<Study>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
studies.PATH = '/tea/eegs';
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Analysis } from '../../models/analysis';
|
|
||||||
|
|
||||||
export interface Study$Params {
|
|
||||||
eeg_id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function study(http: HttpClient, rootUrl: string, params: Study$Params, context?: HttpContext): Observable<StrictHttpResponse<Analysis>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, study.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('eeg_id', params.eeg_id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Analysis>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
study.PATH = '/tea/eegs/{eeg_id}';
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface Metadata$Params {
|
|
||||||
domain: Domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function metadata(http: HttpClient, rootUrl: string, params: Metadata$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, metadata.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
metadata.PATH = '/{domain}/fhir/metadata';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface PostBundle$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the sender's pipeline (its fhir nodes read this inbox)
|
|
||||||
*/
|
|
||||||
sender: string;
|
|
||||||
body: {
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function postBundle(http: HttpClient, rootUrl: string, params: PostBundle$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, postBundle.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('sender', params.sender, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
postBundle.PATH = '/{domain}/fhir';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface ReadMeasure$Params {
|
|
||||||
domain: Domain;
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function readMeasure(http: HttpClient, rootUrl: string, params: ReadMeasure$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, readMeasure.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('id', params.id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
readMeasure.PATH = '/{domain}/fhir/Measure/{id}';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface ReadPatient$Params {
|
|
||||||
domain: Domain;
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function readPatient(http: HttpClient, rootUrl: string, params: ReadPatient$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, readPatient.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('id', params.id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
readPatient.PATH = '/{domain}/fhir/Patient/{id}';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchCondition$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchCondition(http: HttpClient, rootUrl: string, params: SearchCondition$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchCondition.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchCondition.PATH = '/{domain}/fhir/Condition';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchDiagnosticReport$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchDiagnosticReport(http: HttpClient, rootUrl: string, params: SearchDiagnosticReport$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchDiagnosticReport.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchDiagnosticReport.PATH = '/{domain}/fhir/DiagnosticReport';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchEncounter$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchEncounter(http: HttpClient, rootUrl: string, params: SearchEncounter$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchEncounter.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchEncounter.PATH = '/{domain}/fhir/Encounter';
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchMeasureReport$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the Measure's id or canonical URL
|
|
||||||
*/
|
|
||||||
measure: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* semesters (2025-S1) or months (2025-03), comma-separated
|
|
||||||
*/
|
|
||||||
'reporting-period': string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* count only what was known by then
|
|
||||||
*/
|
|
||||||
'as-of'?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* durations count to this day
|
|
||||||
*/
|
|
||||||
'event-cutoff'?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchMeasureReport(http: HttpClient, rootUrl: string, params: SearchMeasureReport$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchMeasureReport.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('measure', params.measure, {});
|
|
||||||
rb.query('reporting-period', params['reporting-period'], {});
|
|
||||||
rb.query('as-of', params['as-of'], {});
|
|
||||||
rb.query('event-cutoff', params['event-cutoff'], {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchMeasureReport.PATH = '/{domain}/fhir/MeasureReport';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchMeasure$Params {
|
|
||||||
domain: Domain;
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchMeasure(http: HttpClient, rootUrl: string, params: SearchMeasure$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchMeasure.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchMeasure.PATH = '/{domain}/fhir/Measure';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchObservation$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchObservation(http: HttpClient, rootUrl: string, params: SearchObservation$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchObservation.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchObservation.PATH = '/{domain}/fhir/Observation';
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchPatient$Params {
|
|
||||||
domain: Domain;
|
|
||||||
'_id'?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* months: the domain's follow-up list over that window up to the cut-off
|
|
||||||
*/
|
|
||||||
'follow-up-window'?: (number | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* default: the last day with data
|
|
||||||
*/
|
|
||||||
'follow-up-cutoff'?: (string | null);
|
|
||||||
'follow-up-status'?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* each word starts a word of her name (case and accents ignored)
|
|
||||||
*/
|
|
||||||
name?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [system|]value: a CURP or record number (case ignored)
|
|
||||||
*/
|
|
||||||
identifier?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gt, ge, lt or le and a day (2000-12-31)
|
|
||||||
*/
|
|
||||||
birthdate?: Array<string>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* -recent or -risk-<outcome>
|
|
||||||
*/
|
|
||||||
'_sort'?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* years
|
|
||||||
*/
|
|
||||||
'risk-horizon'?: (number | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* any of ('DiagnosticReport:subject', 'RiskAssessment:subject', 'Observation:subject')
|
|
||||||
*/
|
|
||||||
'_revinclude'?: Array<string>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DiagnosticReport:result
|
|
||||||
*/
|
|
||||||
'_include:iterate'?: Array<string>;
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchPatient(http: HttpClient, rootUrl: string, params: SearchPatient$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchPatient.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('_id', params['_id'], {});
|
|
||||||
rb.query('follow-up-window', params['follow-up-window'], {});
|
|
||||||
rb.query('follow-up-cutoff', params['follow-up-cutoff'], {});
|
|
||||||
rb.query('follow-up-status', params['follow-up-status'], {});
|
|
||||||
rb.query('name', params.name, {});
|
|
||||||
rb.query('identifier', params.identifier, {});
|
|
||||||
rb.query('birthdate', params.birthdate, {});
|
|
||||||
rb.query('_sort', params['_sort'], {});
|
|
||||||
rb.query('risk-horizon', params['risk-horizon'], {});
|
|
||||||
rb.query('_revinclude', params['_revinclude'], {});
|
|
||||||
rb.query('_include:iterate', params['_include:iterate'], {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchPatient.PATH = '/{domain}/fhir/Patient';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchProcedure$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchProcedure(http: HttpClient, rootUrl: string, params: SearchProcedure$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchProcedure.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchProcedure.PATH = '/{domain}/fhir/Procedure';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface SearchRiskAssessment$Params {
|
|
||||||
domain: Domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Patient/<id>, comma-separated
|
|
||||||
*/
|
|
||||||
subject?: (string | null);
|
|
||||||
'_count'?: (number | null);
|
|
||||||
'_offset'?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function searchRiskAssessment(http: HttpClient, rootUrl: string, params: SearchRiskAssessment$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, searchRiskAssessment.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.query('subject', params.subject, {});
|
|
||||||
rb.query('_count', params['_count'], {});
|
|
||||||
rb.query('_offset', params['_offset'], {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/fhir+json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchRiskAssessment.PATH = '/{domain}/fhir/RiskAssessment';
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Browsed } from '../../models/browsed';
|
|
||||||
|
|
||||||
export interface Browse$Params {
|
|
||||||
path?: (string | null);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function browse(http: HttpClient, rootUrl: string, params?: Browse$Params, context?: HttpContext): Observable<StrictHttpResponse<Browsed>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, browse.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.query('path', params.path, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Browsed>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
browse.PATH = '/ingest/sources/browse';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface ConceptMaps$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function conceptMaps(http: HttpClient, rootUrl: string, params?: ConceptMaps$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, conceptMaps.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
conceptMaps.PATH = '/ingest/concept-maps';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface GetConceptMap$Params {
|
|
||||||
map_id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getConceptMap(http: HttpClient, rootUrl: string, params: GetConceptMap$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, getConceptMap.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('map_id', params.map_id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
getConceptMap.PATH = '/ingest/concept-maps/{map_id}';
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface NodeRows$Params {
|
|
||||||
pipeline_id: string;
|
|
||||||
node_id: string;
|
|
||||||
limit?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function nodeRows(http: HttpClient, rootUrl: string, params: NodeRows$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, nodeRows.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('pipeline_id', params.pipeline_id, {});
|
|
||||||
rb.path('node_id', params.node_id, {});
|
|
||||||
rb.query('limit', params.limit, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
nodeRows.PATH = '/ingest/pipelines/{pipeline_id}/nodes/{node_id}/rows';
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { SignIn } from '../../models/sign-in';
|
|
||||||
|
|
||||||
export interface OauthStart$Params {
|
|
||||||
provider: string;
|
|
||||||
origin: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function oauthStart(http: HttpClient, rootUrl: string, params: OauthStart$Params, context?: HttpContext): Observable<StrictHttpResponse<SignIn>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, oauthStart.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('provider', params.provider, {});
|
|
||||||
rb.query('origin', params.origin, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<SignIn>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
oauthStart.PATH = '/ingest/sources/oauth/{provider}/start';
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { SavedPipeline } from '../../models/saved-pipeline';
|
|
||||||
|
|
||||||
export interface Pipeline$Params {
|
|
||||||
pipeline_id: string;
|
|
||||||
version?: (number | null);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function pipeline(http: HttpClient, rootUrl: string, params: Pipeline$Params, context?: HttpContext): Observable<StrictHttpResponse<SavedPipeline>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, pipeline.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('pipeline_id', params.pipeline_id, {});
|
|
||||||
rb.query('version', params.version, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<SavedPipeline>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeline.PATH = '/ingest/pipelines/{pipeline_id}';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Pipelines$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function pipelines(http: HttpClient, rootUrl: string, params?: Pipelines$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, pipelines.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
pipelines.PATH = '/ingest/pipelines';
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface SaveConceptMap$Params {
|
|
||||||
map_id: string;
|
|
||||||
body: {
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function saveConceptMap(http: HttpClient, rootUrl: string, params: SaveConceptMap$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: number;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, saveConceptMap.PATH, 'put');
|
|
||||||
if (params) {
|
|
||||||
rb.path('map_id', params.map_id, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: number;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
saveConceptMap.PATH = '/ingest/concept-maps/{map_id}';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Pipeline } from '../../models/pipeline';
|
|
||||||
|
|
||||||
export interface SavePipeline$Params {
|
|
||||||
pipeline_id: string;
|
|
||||||
body: Pipeline
|
|
||||||
}
|
|
||||||
|
|
||||||
export function savePipeline(http: HttpClient, rootUrl: string, params: SavePipeline$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: number;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, savePipeline.PATH, 'put');
|
|
||||||
if (params) {
|
|
||||||
rb.path('pipeline_id', params.pipeline_id, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: number;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
savePipeline.PATH = '/ingest/pipelines/{pipeline_id}';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Schema$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function schema(http: HttpClient, rootUrl: string, params?: Schema$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, schema.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
schema.PATH = '/ingest/schema';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Source } from '../../models/source';
|
|
||||||
|
|
||||||
export interface SourcePreview$Params {
|
|
||||||
limit?: number;
|
|
||||||
body: Source
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sourcePreview(http: HttpClient, rootUrl: string, params: SourcePreview$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, sourcePreview.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.query('limit', params.limit, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sourcePreview.PATH = '/ingest/sources/preview';
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { SourceRef } from '../../models/source-ref';
|
|
||||||
|
|
||||||
export interface SourceResources$Params {
|
|
||||||
body: SourceRef
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sourceResources(http: HttpClient, rootUrl: string, params: SourceResources$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<string>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, sourceResources.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<string>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceResources.PATH = '/ingest/sources/resources';
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Catalog } from '../../models/catalog';
|
|
||||||
|
|
||||||
export interface SourceTypes$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sourceTypes(http: HttpClient, rootUrl: string, params?: SourceTypes$Params, context?: HttpContext): Observable<StrictHttpResponse<Catalog>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, sourceTypes.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Catalog>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceTypes.PATH = '/ingest/sources/types';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { RunRequest } from '../../models/run-request';
|
|
||||||
|
|
||||||
export interface StartRun$Params {
|
|
||||||
pipeline_id: string;
|
|
||||||
body: RunRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
export function startRun(http: HttpClient, rootUrl: string, params: StartRun$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, startRun.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('pipeline_id', params.pipeline_id, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
startRun.PATH = '/ingest/pipelines/{pipeline_id}/runs';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Answers } from '../../models/answers';
|
|
||||||
import { Tested } from '../../models/tested';
|
|
||||||
|
|
||||||
export interface TestSource$Params {
|
|
||||||
limit?: number;
|
|
||||||
body: Answers
|
|
||||||
}
|
|
||||||
|
|
||||||
export function testSource(http: HttpClient, rootUrl: string, params: TestSource$Params, context?: HttpContext): Observable<StrictHttpResponse<Tested>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, testSource.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.query('limit', params.limit, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Tested>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
testSource.PATH = '/ingest/sources/test';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { BodyUpload } from '../../models/body-upload';
|
|
||||||
import { Uploaded } from '../../models/uploaded';
|
|
||||||
|
|
||||||
export interface Upload$Params {
|
|
||||||
body: BodyUpload
|
|
||||||
}
|
|
||||||
|
|
||||||
export function upload(http: HttpClient, rootUrl: string, params: Upload$Params, context?: HttpContext): Observable<StrictHttpResponse<Uploaded>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, upload.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'multipart/form-data');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Uploaded>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
upload.PATH = '/ingest/uploads';
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { BodyAddClinicalValidation } from '../../models/body-add-clinical-validation';
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface AddClinicalValidation$Params {
|
|
||||||
domain: Domain;
|
|
||||||
name: string;
|
|
||||||
version: number;
|
|
||||||
body: BodyAddClinicalValidation
|
|
||||||
}
|
|
||||||
|
|
||||||
export function addClinicalValidation(http: HttpClient, rootUrl: string, params: AddClinicalValidation$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, addClinicalValidation.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('name', params.name, {});
|
|
||||||
rb.path('version', params.version, {});
|
|
||||||
rb.body(params.body, 'multipart/form-data');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
addClinicalValidation.PATH = '/models/{domain}/{name}/versions/{version}/reports/clinical_validation';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface Analyze$Params {
|
|
||||||
domain: Domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function analyze(http: HttpClient, rootUrl: string, params: Analyze$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, analyze.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
analyze.PATH = '/models/{domain}/analyze';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
import { Model } from '../../models/model';
|
|
||||||
|
|
||||||
export interface Models$Params {
|
|
||||||
domain: Domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function models(http: HttpClient, rootUrl: string, params: Models$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<Model>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, models.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<Model>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
models.PATH = '/models/{domain}';
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface Promote$Params {
|
|
||||||
domain: Domain;
|
|
||||||
name: string;
|
|
||||||
version: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function promote(http: HttpClient, rootUrl: string, params: Promote$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, promote.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('name', params.name, {});
|
|
||||||
rb.path('version', params.version, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
promote.PATH = '/models/{domain}/{name}/versions/{version}/promote';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface ReadReport$Any$Params {
|
|
||||||
domain: Domain;
|
|
||||||
name: string;
|
|
||||||
version: number;
|
|
||||||
report: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function readReport$Any(http: HttpClient, rootUrl: string, params: ReadReport$Any$Params, context?: HttpContext): Observable<StrictHttpResponse<any>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, readReport$Any.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('name', params.name, {});
|
|
||||||
rb.path('version', params.version, {});
|
|
||||||
rb.path('report', params.report, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'blob', accept: 'application/octet-stream', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<any>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
readReport$Any.PATH = '/models/{domain}/{name}/versions/{version}/reports/{report}';
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface ReadReport$Json$Params {
|
|
||||||
domain: Domain;
|
|
||||||
name: string;
|
|
||||||
version: number;
|
|
||||||
report: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function readReport$Json(http: HttpClient, rootUrl: string, params: ReadReport$Json$Params, context?: HttpContext): Observable<StrictHttpResponse<any>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, readReport$Json.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('name', params.name, {});
|
|
||||||
rb.path('version', params.version, {});
|
|
||||||
rb.path('report', params.report, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<any>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
readReport$Json.PATH = '/models/{domain}/{name}/versions/{version}/reports/{report}';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface Score$Params {
|
|
||||||
domain: Domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function score(http: HttpClient, rootUrl: string, params: Score$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, score.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
score.PATH = '/models/{domain}/score';
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
import { Training } from '../../models/training';
|
|
||||||
|
|
||||||
export interface Train$Params {
|
|
||||||
domain: Domain;
|
|
||||||
body: Training
|
|
||||||
}
|
|
||||||
|
|
||||||
export function train(http: HttpClient, rootUrl: string, params: Train$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, train.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
train.PATH = '/models/{domain}/train';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
import { Version } from '../../models/version';
|
|
||||||
|
|
||||||
export interface Versions$Params {
|
|
||||||
domain: Domain;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function versions(http: HttpClient, rootUrl: string, params: Versions$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<Version>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, versions.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('domain', params.domain, {});
|
|
||||||
rb.path('name', params.name, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<Version>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
versions.PATH = '/models/{domain}/{name}/versions';
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Domain } from '../../models/domain';
|
|
||||||
|
|
||||||
export interface Domains$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function domains(http: HttpClient, rootUrl: string, params?: Domains$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<Domain>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, domains.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<Domain>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
domains.PATH = '/domains';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Health$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function health(http: HttpClient, rootUrl: string, params?: Health$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, health.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
health.PATH = '/health';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Conflicts$Params {
|
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
|
||||||
}
|
|
||||||
|
|
||||||
export function conflicts(http: HttpClient, rootUrl: string, params: Conflicts$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, conflicts.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.query('entity', params.entity, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
conflicts.PATH = '/review/conflicts';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Correction } from '../../models/correction';
|
|
||||||
|
|
||||||
export interface Correct$Params {
|
|
||||||
body: Correction
|
|
||||||
}
|
|
||||||
|
|
||||||
export function correct(http: HttpClient, rootUrl: string, params: Correct$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, correct.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
correct.PATH = '/review/corrections';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { PersonDecision } from '../../models/person-decision';
|
|
||||||
|
|
||||||
export interface DecidePersons$Params {
|
|
||||||
body: PersonDecision
|
|
||||||
}
|
|
||||||
|
|
||||||
export function decidePersons(http: HttpClient, rootUrl: string, params: DecidePersons$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, decidePersons.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
decidePersons.PATH = '/review/persons';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Held$Params {
|
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
|
||||||
}
|
|
||||||
|
|
||||||
export function held(http: HttpClient, rootUrl: string, params: Held$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, held.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.query('entity', params.entity, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
held.PATH = '/review/held';
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Persons$Params {
|
|
||||||
pipeline: string;
|
|
||||||
node: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function persons(http: HttpClient, rootUrl: string, params: Persons$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, persons.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.query('pipeline', params.pipeline, {});
|
|
||||||
rb.query('node', params.node, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
persons.PATH = '/review/persons';
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { Rejection } from '../../models/rejection';
|
|
||||||
|
|
||||||
export interface Reject$Params {
|
|
||||||
body: Rejection
|
|
||||||
}
|
|
||||||
|
|
||||||
export function reject(http: HttpClient, rootUrl: string, params: Reject$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, reject.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
reject.PATH = '/review/rejections';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Unrecognised$Params {
|
|
||||||
pipeline: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function unrecognised(http: HttpClient, rootUrl: string, params: Unrecognised$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, unrecognised.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.query('pipeline', params.pipeline, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<Array<{
|
|
||||||
[key: string]: any;
|
|
||||||
}>>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
unrecognised.PATH = '/review/unrecognised';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface RunStatus$Params {
|
|
||||||
run_id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function runStatus(http: HttpClient, rootUrl: string, params: RunStatus$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, runStatus.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('run_id', params.run_id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
runStatus.PATH = '/runs/{run_id}';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface TerminateRun$Params {
|
|
||||||
run_id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function terminateRun(http: HttpClient, rootUrl: string, params: TerminateRun$Params, context?: HttpContext): Observable<StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, terminateRun.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.path('run_id', params.run_id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<{
|
|
||||||
[key: string]: string;
|
|
||||||
}>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
terminateRun.PATH = '/runs/{run_id}/terminate';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { UserCreate } from '../../models/user-create';
|
|
||||||
import { UserRead } from '../../models/user-read';
|
|
||||||
|
|
||||||
export interface RegisterRegister$Params {
|
|
||||||
body: UserCreate
|
|
||||||
}
|
|
||||||
|
|
||||||
export function registerRegister(http: HttpClient, rootUrl: string, params: RegisterRegister$Params, context?: HttpContext): Observable<StrictHttpResponse<UserRead>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, registerRegister.PATH, 'post');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<UserRead>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
registerRegister.PATH = '/users/register';
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { UserRead } from '../../models/user-read';
|
|
||||||
|
|
||||||
export interface UsersCurrentUser$Params {
|
|
||||||
}
|
|
||||||
|
|
||||||
export function usersCurrentUser(http: HttpClient, rootUrl: string, params?: UsersCurrentUser$Params, context?: HttpContext): Observable<StrictHttpResponse<UserRead>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, usersCurrentUser.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<UserRead>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
usersCurrentUser.PATH = '/users/me';
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
|
|
||||||
export interface UsersDeleteUser$Params {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function usersDeleteUser(http: HttpClient, rootUrl: string, params: UsersDeleteUser$Params, context?: HttpContext): Observable<StrictHttpResponse<void>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, usersDeleteUser.PATH, 'delete');
|
|
||||||
if (params) {
|
|
||||||
rb.path('id', params.id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'text', accept: '*/*', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
usersDeleteUser.PATH = '/users/{id}';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { UserRead } from '../../models/user-read';
|
|
||||||
import { UserUpdate } from '../../models/user-update';
|
|
||||||
|
|
||||||
export interface UsersPatchCurrentUser$Params {
|
|
||||||
body: UserUpdate
|
|
||||||
}
|
|
||||||
|
|
||||||
export function usersPatchCurrentUser(http: HttpClient, rootUrl: string, params: UsersPatchCurrentUser$Params, context?: HttpContext): Observable<StrictHttpResponse<UserRead>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, usersPatchCurrentUser.PATH, 'patch');
|
|
||||||
if (params) {
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<UserRead>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
usersPatchCurrentUser.PATH = '/users/me';
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { UserRead } from '../../models/user-read';
|
|
||||||
import { UserUpdate } from '../../models/user-update';
|
|
||||||
|
|
||||||
export interface UsersPatchUser$Params {
|
|
||||||
id: string;
|
|
||||||
body: UserUpdate
|
|
||||||
}
|
|
||||||
|
|
||||||
export function usersPatchUser(http: HttpClient, rootUrl: string, params: UsersPatchUser$Params, context?: HttpContext): Observable<StrictHttpResponse<UserRead>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, usersPatchUser.PATH, 'patch');
|
|
||||||
if (params) {
|
|
||||||
rb.path('id', params.id, {});
|
|
||||||
rb.body(params.body, 'application/json');
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<UserRead>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
usersPatchUser.PATH = '/users/{id}';
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { filter, map } from 'rxjs/operators';
|
|
||||||
import { StrictHttpResponse } from '../../strict-http-response';
|
|
||||||
import { RequestBuilder } from '../../request-builder';
|
|
||||||
|
|
||||||
import { UserRead } from '../../models/user-read';
|
|
||||||
|
|
||||||
export interface UsersUser$Params {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function usersUser(http: HttpClient, rootUrl: string, params: UsersUser$Params, context?: HttpContext): Observable<StrictHttpResponse<UserRead>> {
|
|
||||||
const rb = new RequestBuilder(rootUrl, usersUser.PATH, 'get');
|
|
||||||
if (params) {
|
|
||||||
rb.path('id', params.id, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.request(
|
|
||||||
rb.build({ responseType: 'json', accept: 'application/json', context })
|
|
||||||
).pipe(
|
|
||||||
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
|
||||||
map((r: HttpResponse<any>) => {
|
|
||||||
return r as StrictHttpResponse<UserRead>;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
usersUser.PATH = '/users/{id}';
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export type { AuthCookieLogin$Params as AuthCookieLogin$Params } from './fn/auth/auth-cookie-login';
|
|
||||||
export { authCookieLogin as authCookieLogin } from './fn/auth/auth-cookie-login';
|
|
||||||
export type { AuthCookieLogout$Params as AuthCookieLogout$Params } from './fn/auth/auth-cookie-logout';
|
|
||||||
export { authCookieLogout as authCookieLogout } from './fn/auth/auth-cookie-logout';
|
|
||||||
export type { Domains$Params as Domains$Params } from './fn/operations/domains';
|
|
||||||
export { domains as domains } from './fn/operations/domains';
|
|
||||||
export type { Health$Params as Health$Params } from './fn/operations/health';
|
|
||||||
export { health as health } from './fn/operations/health';
|
|
||||||
export type { ConceptMaps$Params as ConceptMaps$Params } from './fn/ingest/concept-maps';
|
|
||||||
export { conceptMaps as conceptMaps } from './fn/ingest/concept-maps';
|
|
||||||
export type { GetConceptMap$Params as GetConceptMap$Params } from './fn/ingest/get-concept-map';
|
|
||||||
export { getConceptMap as getConceptMap } from './fn/ingest/get-concept-map';
|
|
||||||
export type { SaveConceptMap$Params as SaveConceptMap$Params } from './fn/ingest/save-concept-map';
|
|
||||||
export { saveConceptMap as saveConceptMap } from './fn/ingest/save-concept-map';
|
|
||||||
export type { Pipelines$Params as Pipelines$Params } from './fn/ingest/pipelines';
|
|
||||||
export { pipelines as pipelines } from './fn/ingest/pipelines';
|
|
||||||
export type { Pipeline$Params as Pipeline$Params } from './fn/ingest/pipeline';
|
|
||||||
export { pipeline as pipeline } from './fn/ingest/pipeline';
|
|
||||||
export type { SavePipeline$Params as SavePipeline$Params } from './fn/ingest/save-pipeline';
|
|
||||||
export { savePipeline as savePipeline } from './fn/ingest/save-pipeline';
|
|
||||||
export type { NodeRows$Params as NodeRows$Params } from './fn/ingest/node-rows';
|
|
||||||
export { nodeRows as nodeRows } from './fn/ingest/node-rows';
|
|
||||||
export type { StartRun$Params as StartRun$Params } from './fn/ingest/start-run';
|
|
||||||
export { startRun as startRun } from './fn/ingest/start-run';
|
|
||||||
export type { Schema$Params as Schema$Params } from './fn/ingest/schema';
|
|
||||||
export { schema as schema } from './fn/ingest/schema';
|
|
||||||
export type { Browse$Params as Browse$Params } from './fn/ingest/browse';
|
|
||||||
export { browse as browse } from './fn/ingest/browse';
|
|
||||||
export type { OauthStart$Params as OauthStart$Params } from './fn/ingest/oauth-start';
|
|
||||||
export { oauthStart as oauthStart } from './fn/ingest/oauth-start';
|
|
||||||
export type { SourcePreview$Params as SourcePreview$Params } from './fn/ingest/source-preview';
|
|
||||||
export { sourcePreview as sourcePreview } from './fn/ingest/source-preview';
|
|
||||||
export type { SourceResources$Params as SourceResources$Params } from './fn/ingest/source-resources';
|
|
||||||
export { sourceResources as sourceResources } from './fn/ingest/source-resources';
|
|
||||||
export type { TestSource$Params as TestSource$Params } from './fn/ingest/test-source';
|
|
||||||
export { testSource as testSource } from './fn/ingest/test-source';
|
|
||||||
export type { SourceTypes$Params as SourceTypes$Params } from './fn/ingest/source-types';
|
|
||||||
export { sourceTypes as sourceTypes } from './fn/ingest/source-types';
|
|
||||||
export type { Upload$Params as Upload$Params } from './fn/ingest/upload';
|
|
||||||
export { upload as upload } from './fn/ingest/upload';
|
|
||||||
export type { Models$Params as Models$Params } from './fn/models/models';
|
|
||||||
export { models as models } from './fn/models/models';
|
|
||||||
export type { Analyze$Params as Analyze$Params } from './fn/models/analyze';
|
|
||||||
export { analyze as analyze } from './fn/models/analyze';
|
|
||||||
export type { Score$Params as Score$Params } from './fn/models/score';
|
|
||||||
export { score as score } from './fn/models/score';
|
|
||||||
export type { Train$Params as Train$Params } from './fn/models/train';
|
|
||||||
export { train as train } from './fn/models/train';
|
|
||||||
export type { Versions$Params as Versions$Params } from './fn/models/versions';
|
|
||||||
export { versions as versions } from './fn/models/versions';
|
|
||||||
export type { Promote$Params as Promote$Params } from './fn/models/promote';
|
|
||||||
export { promote as promote } from './fn/models/promote';
|
|
||||||
export type { AddClinicalValidation$Params as AddClinicalValidation$Params } from './fn/models/add-clinical-validation';
|
|
||||||
export { addClinicalValidation as addClinicalValidation } from './fn/models/add-clinical-validation';
|
|
||||||
export type { ReadReport$Json$Params as ReadReport$Json$Params } from './fn/models/read-report-json';
|
|
||||||
export { readReport$Json as readReport$Json } from './fn/models/read-report-json';
|
|
||||||
export type { ReadReport$Any$Params as ReadReport$Any$Params } from './fn/models/read-report-any';
|
|
||||||
export { readReport$Any as readReport$Any } from './fn/models/read-report-any';
|
|
||||||
export type { Conflicts$Params as Conflicts$Params } from './fn/review/conflicts';
|
|
||||||
export { conflicts as conflicts } from './fn/review/conflicts';
|
|
||||||
export type { Correct$Params as Correct$Params } from './fn/review/correct';
|
|
||||||
export { correct as correct } from './fn/review/correct';
|
|
||||||
export type { Held$Params as Held$Params } from './fn/review/held';
|
|
||||||
export { held as held } from './fn/review/held';
|
|
||||||
export type { Persons$Params as Persons$Params } from './fn/review/persons';
|
|
||||||
export { persons as persons } from './fn/review/persons';
|
|
||||||
export type { DecidePersons$Params as DecidePersons$Params } from './fn/review/decide-persons';
|
|
||||||
export { decidePersons as decidePersons } from './fn/review/decide-persons';
|
|
||||||
export type { Reject$Params as Reject$Params } from './fn/review/reject';
|
|
||||||
export { reject as reject } from './fn/review/reject';
|
|
||||||
export type { Unrecognised$Params as Unrecognised$Params } from './fn/review/unrecognised';
|
|
||||||
export { unrecognised as unrecognised } from './fn/review/unrecognised';
|
|
||||||
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
|
|
||||||
export { runStatus as runStatus } from './fn/runs/run-status';
|
|
||||||
export type { TerminateRun$Params as TerminateRun$Params } from './fn/runs/terminate-run';
|
|
||||||
export { terminateRun as terminateRun } from './fn/runs/terminate-run';
|
|
||||||
export type { Studies$Params as Studies$Params } from './fn/eeg/studies';
|
|
||||||
export { studies as studies } from './fn/eeg/studies';
|
|
||||||
export type { Study$Params as Study$Params } from './fn/eeg/study';
|
|
||||||
export { study as study } from './fn/eeg/study';
|
|
||||||
export type { UsersCurrentUser$Params as UsersCurrentUser$Params } from './fn/users/users-current-user';
|
|
||||||
export { usersCurrentUser as usersCurrentUser } from './fn/users/users-current-user';
|
|
||||||
export type { UsersPatchCurrentUser$Params as UsersPatchCurrentUser$Params } from './fn/users/users-patch-current-user';
|
|
||||||
export { usersPatchCurrentUser as usersPatchCurrentUser } from './fn/users/users-patch-current-user';
|
|
||||||
export type { RegisterRegister$Params as RegisterRegister$Params } from './fn/users/register-register';
|
|
||||||
export { registerRegister as registerRegister } from './fn/users/register-register';
|
|
||||||
export type { UsersUser$Params as UsersUser$Params } from './fn/users/users-user';
|
|
||||||
export { usersUser as usersUser } from './fn/users/users-user';
|
|
||||||
export type { UsersDeleteUser$Params as UsersDeleteUser$Params } from './fn/users/users-delete-user';
|
|
||||||
export { usersDeleteUser as usersDeleteUser } from './fn/users/users-delete-user';
|
|
||||||
export type { UsersPatchUser$Params as UsersPatchUser$Params } from './fn/users/users-patch-user';
|
|
||||||
export { usersPatchUser as usersPatchUser } from './fn/users/users-patch-user';
|
|
||||||
export type { PostBundle$Params as PostBundle$Params } from './fn/fhir/post-bundle';
|
|
||||||
export { postBundle as postBundle } from './fn/fhir/post-bundle';
|
|
||||||
export type { SearchCondition$Params as SearchCondition$Params } from './fn/fhir/search-condition';
|
|
||||||
export { searchCondition as searchCondition } from './fn/fhir/search-condition';
|
|
||||||
export type { SearchDiagnosticReport$Params as SearchDiagnosticReport$Params } from './fn/fhir/search-diagnostic-report';
|
|
||||||
export { searchDiagnosticReport as searchDiagnosticReport } from './fn/fhir/search-diagnostic-report';
|
|
||||||
export type { SearchEncounter$Params as SearchEncounter$Params } from './fn/fhir/search-encounter';
|
|
||||||
export { searchEncounter as searchEncounter } from './fn/fhir/search-encounter';
|
|
||||||
export type { SearchMeasure$Params as SearchMeasure$Params } from './fn/fhir/search-measure';
|
|
||||||
export { searchMeasure as searchMeasure } from './fn/fhir/search-measure';
|
|
||||||
export type { ReadMeasure$Params as ReadMeasure$Params } from './fn/fhir/read-measure';
|
|
||||||
export { readMeasure as readMeasure } from './fn/fhir/read-measure';
|
|
||||||
export type { SearchMeasureReport$Params as SearchMeasureReport$Params } from './fn/fhir/search-measure-report';
|
|
||||||
export { searchMeasureReport as searchMeasureReport } from './fn/fhir/search-measure-report';
|
|
||||||
export type { SearchObservation$Params as SearchObservation$Params } from './fn/fhir/search-observation';
|
|
||||||
export { searchObservation as searchObservation } from './fn/fhir/search-observation';
|
|
||||||
export type { SearchPatient$Params as SearchPatient$Params } from './fn/fhir/search-patient';
|
|
||||||
export { searchPatient as searchPatient } from './fn/fhir/search-patient';
|
|
||||||
export type { ReadPatient$Params as ReadPatient$Params } from './fn/fhir/read-patient';
|
|
||||||
export { readPatient as readPatient } from './fn/fhir/read-patient';
|
|
||||||
export type { SearchProcedure$Params as SearchProcedure$Params } from './fn/fhir/search-procedure';
|
|
||||||
export { searchProcedure as searchProcedure } from './fn/fhir/search-procedure';
|
|
||||||
export type { SearchRiskAssessment$Params as SearchRiskAssessment$Params } from './fn/fhir/search-risk-assessment';
|
|
||||||
export { searchRiskAssessment as searchRiskAssessment } from './fn/fhir/search-risk-assessment';
|
|
||||||
export type { Metadata$Params as Metadata$Params } from './fn/fhir/metadata';
|
|
||||||
export { metadata as metadata } from './fn/fhir/metadata';
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export type { Analysis } from './models/analysis';
|
|
||||||
export type { Answers } from './models/answers';
|
|
||||||
export type { BodyAddClinicalValidation } from './models/body-add-clinical-validation';
|
|
||||||
export type { BodyUpload } from './models/body-upload';
|
|
||||||
export type { Browsed } from './models/browsed';
|
|
||||||
export type { Catalog } from './models/catalog';
|
|
||||||
export type { Condition } from './models/condition';
|
|
||||||
export type { Correction } from './models/correction';
|
|
||||||
export type { Domain } from './models/domain';
|
|
||||||
export type { Entry } from './models/entry';
|
|
||||||
export type { ErrorModel } from './models/error-model';
|
|
||||||
export type { Extract } from './models/extract';
|
|
||||||
export type { Fhir } from './models/fhir';
|
|
||||||
export type { FieldSpec } from './models/field-spec';
|
|
||||||
export type { Group } from './models/group';
|
|
||||||
export type { Guided } from './models/guided';
|
|
||||||
export type { HttpValidationError } from './models/http-validation-error';
|
|
||||||
export type { Join } from './models/join';
|
|
||||||
export type { Link } from './models/link';
|
|
||||||
export type { Listing } from './models/listing';
|
|
||||||
export type { Login } from './models/login';
|
|
||||||
export type { Map } from './models/map';
|
|
||||||
export type { Metric } from './models/metric';
|
|
||||||
export type { Model } from './models/model';
|
|
||||||
export type { Option } from './models/option';
|
|
||||||
export type { PersonDecision } from './models/person-decision';
|
|
||||||
export type { Pipeline } from './models/pipeline';
|
|
||||||
export type { Position } from './models/position';
|
|
||||||
export type { Provider } from './models/provider';
|
|
||||||
export type { Read } from './models/read';
|
|
||||||
export type { Rejection } from './models/rejection';
|
|
||||||
export type { Relation } from './models/relation';
|
|
||||||
export type { Route } from './models/route';
|
|
||||||
export type { RunRequest } from './models/run-request';
|
|
||||||
export type { SavedPipeline } from './models/saved-pipeline';
|
|
||||||
export type { SignIn } from './models/sign-in';
|
|
||||||
export type { Site } from './models/site';
|
|
||||||
export type { Source } from './models/source';
|
|
||||||
export type { SourceRef } from './models/source-ref';
|
|
||||||
export type { SourceType } from './models/source-type';
|
|
||||||
export type { Study } from './models/study';
|
|
||||||
export type { Target } from './models/target';
|
|
||||||
export type { Tested } from './models/tested';
|
|
||||||
export type { Training } from './models/training';
|
|
||||||
export type { Uploaded } from './models/uploaded';
|
|
||||||
export type { UserCreate } from './models/user-create';
|
|
||||||
export type { UserRead } from './models/user-read';
|
|
||||||
export type { UserUpdate } from './models/user-update';
|
|
||||||
export type { ValidationError } from './models/validation-error';
|
|
||||||
export type { Version } from './models/version';
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Metric } from '../models/metric';
|
|
||||||
import { Relation } from '../models/relation';
|
|
||||||
export interface Analysis {
|
|
||||||
age_months: (number | null);
|
|
||||||
id: string;
|
|
||||||
level: (string | null);
|
|
||||||
metrics: Array<Metric>;
|
|
||||||
relation?: Array<Relation>;
|
|
||||||
valid: (boolean | null);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface Answers {
|
|
||||||
answers?: {
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
node?: (string | null);
|
|
||||||
pipeline?: (string | null);
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface BodyAddClinicalValidation {
|
|
||||||
file: string;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface BodyUpload {
|
|
||||||
files: Array<string>;
|
|
||||||
folder?: (string | null);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Entry } from '../models/entry';
|
|
||||||
export interface Browsed {
|
|
||||||
entries: Array<Entry>;
|
|
||||||
parent: (string | null);
|
|
||||||
path: (string | null);
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Group } from '../models/group';
|
|
||||||
import { Option } from '../models/option';
|
|
||||||
import { Provider } from '../models/provider';
|
|
||||||
import { SourceType } from '../models/source-type';
|
|
||||||
export interface Catalog {
|
|
||||||
formats: Array<Option>;
|
|
||||||
groups: {
|
|
||||||
[key: string]: Group;
|
|
||||||
};
|
|
||||||
providers: {
|
|
||||||
[key: string]: Provider;
|
|
||||||
};
|
|
||||||
types: {
|
|
||||||
[key: string]: SourceType;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface Condition {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Por ejemplo «text», el texto leído del documento.
|
|
||||||
*/
|
|
||||||
column: string;
|
|
||||||
op: 'equals' | 'contains' | 'matches' | 'present';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lo que se busca; por ejemplo «citología».
|
|
||||||
*/
|
|
||||||
value?: string;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* One field of one record as a reviewer read it in the source document: an identity
|
|
||||||
* field (a mistyped record number) or a study's (a stage the scan made unreadable).
|
|
||||||
*/
|
|
||||||
export interface Correction {
|
|
||||||
entity?: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
|
||||||
field: string;
|
|
||||||
record: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Domain } from './domain';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Each possible value of `Domain`
|
|
||||||
*/
|
|
||||||
export const DOMAIN: Domain[] = [
|
|
||||||
'cacu',
|
|
||||||
'cama',
|
|
||||||
'tea'
|
|
||||||
];
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export type Domain = 'cacu' | 'cama' | 'tea';
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface Entry {
|
|
||||||
kind: 'folder' | 'file';
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
size?: (number | null);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
export interface ErrorModel {
|
|
||||||
detail: (string | {
|
|
||||||
[key: string]: string;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
|
||||||
|
|
||||||
import { Position } from '../models/position';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Platform fields read from text, each kept with the text it was read from.
|
|
||||||
*
|
|
||||||
* `auto` asks the LLM when one is configured and answering, else applies `patterns`;
|
|
||||||
* with neither, the row is held. Patterns are regexes with one group, per field (the
|
|
||||||
* LLM can propose them from sample documents); their values go through the ConceptMap
|
|
||||||
* and `formats` as in `map`.
|
|
||||||
*/
|
|
||||||
export interface Extract {
|
|
||||||
column: (string | Array<string>);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dato → columna, sin leer el texto.
|
|
||||||
*/
|
|
||||||
columns?: {
|
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
concept_map?: (string | null);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Qué estudio se saca del documento.
|
|
||||||
*/
|
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
|
||||||
formats?: {
|
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Para el modelo de lenguaje.
|
|
||||||
*/
|
|
||||||
hints?: string;
|
|
||||||
id: string;
|
|
||||||
inputs?: Array<string>;
|
|
||||||
kind?: 'extract';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cómo se ve en el diagrama.
|
|
||||||
*/
|
|
||||||
label?: string;
|
|
||||||
method?: 'auto' | 'llm' | 'patterns';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dato → expresión con un grupo ( ).
|
|
||||||
*/
|
|
||||||
patterns?: {
|
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
position?: (Position | null);
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user