TEA indicators, EEG section in governance
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ test("indicators: the KPIs are the API's MeasureReports, every tab and the patie
|
|||||||
const camaRows = page.locator('table.worklist tbody tr');
|
const camaRows = page.locator('table.worklist tbody tr');
|
||||||
await expect(camaRows.first()).toContainText('BI-RADS');
|
await expect(camaRows.first()).toContainText('BI-RADS');
|
||||||
await page.goto('/indicadores/tea');
|
await page.goto('/indicadores/tea');
|
||||||
await expect(page.getByText('todavía no tiene indicadores')).toBeVisible();
|
await expect(page.getByRole('tab', { name: 'Indicadores' })).toBeVisible();
|
||||||
expect(problems).toEqual([]);
|
expect(problems).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+328
-6
@@ -1,6 +1,63 @@
|
|||||||
{
|
{
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"Analysis": {
|
||||||
|
"properties": {
|
||||||
|
"age_months": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Age Months"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"title": "Id",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Level"
|
||||||
|
},
|
||||||
|
"metrics": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/Metric"
|
||||||
|
},
|
||||||
|
"title": "Metrics",
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"valid": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Valid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"valid",
|
||||||
|
"level",
|
||||||
|
"age_months",
|
||||||
|
"metrics"
|
||||||
|
],
|
||||||
|
"title": "Analysis",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"Body_add_clinical_validation": {
|
"Body_add_clinical_validation": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"file": {
|
"file": {
|
||||||
@@ -127,7 +184,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -239,7 +299,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -523,6 +586,14 @@
|
|||||||
"type": "null"
|
"type": "null"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"values": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"default": {},
|
||||||
|
"title": "Values",
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -532,6 +603,60 @@
|
|||||||
"title": "Map",
|
"title": "Map",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"Metric": {
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"title": "Code",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Model"
|
||||||
|
},
|
||||||
|
"outside": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Outside"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"z": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Z"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"value",
|
||||||
|
"z",
|
||||||
|
"outside",
|
||||||
|
"model"
|
||||||
|
],
|
||||||
|
"title": "Metric",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"PersonDecision": {
|
"PersonDecision": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"candidate": {
|
"candidate": {
|
||||||
@@ -694,7 +819,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -917,6 +1045,70 @@
|
|||||||
"title": "SourceRef",
|
"title": "SourceRef",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"Study": {
|
||||||
|
"properties": {
|
||||||
|
"analysed": {
|
||||||
|
"title": "Analysed",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"title": "Id",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lab_record_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Lab Record Id"
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Level"
|
||||||
|
},
|
||||||
|
"person_id": {
|
||||||
|
"title": "Person Id",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"study_date": {
|
||||||
|
"title": "Study Date",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"valid": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Valid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"person_id",
|
||||||
|
"study_date",
|
||||||
|
"lab_record_id",
|
||||||
|
"analysed",
|
||||||
|
"valid",
|
||||||
|
"level"
|
||||||
|
],
|
||||||
|
"title": "Study",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"Target": {
|
"Target": {
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"description": "Rows of platform fields into one platform entity, each row given its person by the\none `link` node among the inputs. Rule breaks are held for review.",
|
"description": "Rows of platform fields into one platform entity, each row given its person by the\none `link` node among the inputs. Rule breaks are held for review.",
|
||||||
@@ -929,7 +1121,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -992,6 +1187,14 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "As Of"
|
"title": "As Of"
|
||||||
|
},
|
||||||
|
"models": {
|
||||||
|
"default": [],
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": "Models",
|
||||||
|
"type": "array"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "Training",
|
"title": "Training",
|
||||||
@@ -1770,6 +1973,52 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/models/{domain}/analyze": {
|
||||||
|
"post": {
|
||||||
|
"description": "Starts analysing the studies the domain's models read whole (TEA: its EEGs); follow\nit at /runs.",
|
||||||
|
"operationId": "analyze",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "domain",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Domain"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": "Response Analyze",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Successful Response"
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Validation Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Analyze",
|
||||||
|
"tags": [
|
||||||
|
"models"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/models/{domain}/score": {
|
"/models/{domain}/score": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Starts a risk batch from each model's champion; follow it at /runs.",
|
"description": "Starts a risk batch from each model's champion; follow it at /runs.",
|
||||||
@@ -2143,7 +2392,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -2246,7 +2498,10 @@
|
|||||||
"mammography",
|
"mammography",
|
||||||
"breast_biopsy",
|
"breast_biopsy",
|
||||||
"clinical_note",
|
"clinical_note",
|
||||||
"death"
|
"death",
|
||||||
|
"mchat",
|
||||||
|
"ados2",
|
||||||
|
"eeg"
|
||||||
],
|
],
|
||||||
"title": "Entity",
|
"title": "Entity",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -2486,6 +2741,73 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/tea/eegs": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "studies",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/Study"
|
||||||
|
},
|
||||||
|
"title": "Response Studies",
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Successful Response"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Studies",
|
||||||
|
"tags": [
|
||||||
|
"eeg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tea/eegs/{eeg_id}": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "study",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "eeg_id",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"title": "Eeg Id",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Analysis"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Successful Response"
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Validation Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Study",
|
||||||
|
"tags": [
|
||||||
|
"eeg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/{domain}/fhir": {
|
"/{domain}/fhir": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "A standard hospital's Bundle: checked as FHIR, kept as sent in the sender's inbox,\nand placed by the sender's pipeline (a run starts; follow it at the Location).",
|
"description": "A standard hospital's Bundle: checked as FHIR, kept as sent in the sender's inbox,\nand placed by the sender's pipeline (a run starts; follow it at the Location).",
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* 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';
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* 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}';
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/* 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';
|
||||||
@@ -9,7 +9,7 @@ import { RequestBuilder } from '../../request-builder';
|
|||||||
|
|
||||||
|
|
||||||
export interface Conflicts$Params {
|
export interface Conflicts$Params {
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function conflicts(http: HttpClient, rootUrl: string, params: Conflicts$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
export function conflicts(http: HttpClient, rootUrl: string, params: Conflicts$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { RequestBuilder } from '../../request-builder';
|
|||||||
|
|
||||||
|
|
||||||
export interface Held$Params {
|
export interface Held$Params {
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function held(http: HttpClient, rootUrl: string, params: Held$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
export function held(http: HttpClient, rootUrl: string, params: Held$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export type { Upload$Params as Upload$Params } from './fn/ingest/upload';
|
|||||||
export { upload as upload } from './fn/ingest/upload';
|
export { upload as upload } from './fn/ingest/upload';
|
||||||
export type { Models$Params as Models$Params } from './fn/models/models';
|
export type { Models$Params as Models$Params } from './fn/models/models';
|
||||||
export { models as models } 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 type { Score$Params as Score$Params } from './fn/models/score';
|
||||||
export { score as score } from './fn/models/score';
|
export { score as score } from './fn/models/score';
|
||||||
export type { Train$Params as Train$Params } from './fn/models/train';
|
export type { Train$Params as Train$Params } from './fn/models/train';
|
||||||
@@ -59,6 +61,10 @@ export type { Reject$Params as Reject$Params } from './fn/review/reject';
|
|||||||
export { reject as reject } from './fn/review/reject';
|
export { reject as reject } from './fn/review/reject';
|
||||||
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
|
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
|
||||||
export { runStatus as runStatus } from './fn/runs/run-status';
|
export { runStatus as runStatus } from './fn/runs/run-status';
|
||||||
|
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 { PostBundle$Params as PostBundle$Params } from './fn/fhir/post-bundle';
|
export type { PostBundle$Params as PostBundle$Params } from './fn/fhir/post-bundle';
|
||||||
export { postBundle as postBundle } 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 type { SearchCondition$Params as SearchCondition$Params } from './fn/fhir/search-condition';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
||||||
|
|
||||||
|
export type { Analysis } from './models/analysis';
|
||||||
export type { BodyAddClinicalValidation } from './models/body-add-clinical-validation';
|
export type { BodyAddClinicalValidation } from './models/body-add-clinical-validation';
|
||||||
export type { BodyUpload } from './models/body-upload';
|
export type { BodyUpload } from './models/body-upload';
|
||||||
export type { Condition } from './models/condition';
|
export type { Condition } from './models/condition';
|
||||||
@@ -12,6 +13,7 @@ export type { HttpValidationError } from './models/http-validation-error';
|
|||||||
export type { Join } from './models/join';
|
export type { Join } from './models/join';
|
||||||
export type { Link } from './models/link';
|
export type { Link } from './models/link';
|
||||||
export type { Map } from './models/map';
|
export type { Map } from './models/map';
|
||||||
|
export type { Metric } from './models/metric';
|
||||||
export type { PersonDecision } from './models/person-decision';
|
export type { PersonDecision } from './models/person-decision';
|
||||||
export type { Pipeline } from './models/pipeline';
|
export type { Pipeline } from './models/pipeline';
|
||||||
export type { Position } from './models/position';
|
export type { Position } from './models/position';
|
||||||
@@ -22,6 +24,7 @@ export type { RunRequest } from './models/run-request';
|
|||||||
export type { SavedPipeline } from './models/saved-pipeline';
|
export type { SavedPipeline } from './models/saved-pipeline';
|
||||||
export type { Source } from './models/source';
|
export type { Source } from './models/source';
|
||||||
export type { SourceRef } from './models/source-ref';
|
export type { SourceRef } from './models/source-ref';
|
||||||
|
export type { Study } from './models/study';
|
||||||
export type { Target } from './models/target';
|
export type { Target } from './models/target';
|
||||||
export type { Training } from './models/training';
|
export type { Training } from './models/training';
|
||||||
export type { ValidationError } from './models/validation-error';
|
export type { ValidationError } from './models/validation-error';
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
||||||
|
|
||||||
|
import { Metric } from '../models/metric';
|
||||||
|
export interface Analysis {
|
||||||
|
age_months: (number | null);
|
||||||
|
id: string;
|
||||||
|
level: (string | null);
|
||||||
|
metrics: Array<Metric>;
|
||||||
|
valid: (boolean | null);
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ import { Position } from '../models/position';
|
|||||||
export interface Extract {
|
export interface Extract {
|
||||||
column: string;
|
column: string;
|
||||||
concept_map?: (string | null);
|
concept_map?: (string | null);
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
formats?: {
|
formats?: {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { Position } from '../models/position';
|
|||||||
export interface Fhir {
|
export interface Fhir {
|
||||||
column?: string;
|
column?: string;
|
||||||
concept_map?: (string | null);
|
concept_map?: (string | null);
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
id: string;
|
id: string;
|
||||||
inputs?: Array<string>;
|
inputs?: Array<string>;
|
||||||
kind?: 'fhir';
|
kind?: 'fhir';
|
||||||
|
|||||||
@@ -20,4 +20,7 @@ export interface Map {
|
|||||||
kind?: 'map';
|
kind?: 'map';
|
||||||
label?: string;
|
label?: string;
|
||||||
position?: (Position | null);
|
position?: (Position | null);
|
||||||
|
values?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
||||||
|
|
||||||
|
export interface Metric {
|
||||||
|
code: string;
|
||||||
|
model: (string | null);
|
||||||
|
outside: (number | null);
|
||||||
|
value: number;
|
||||||
|
z: (number | null);
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
||||||
|
|
||||||
export interface Rejection {
|
export interface Rejection {
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
reason: string;
|
reason: string;
|
||||||
record: string;
|
record: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* Code generated by ng-openapi-gen DO NOT EDIT. */
|
||||||
|
|
||||||
|
export interface Study {
|
||||||
|
analysed: boolean;
|
||||||
|
id: string;
|
||||||
|
lab_record_id: (string | null);
|
||||||
|
level: (string | null);
|
||||||
|
person_id: string;
|
||||||
|
study_date: string;
|
||||||
|
valid: (boolean | null);
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import { Position } from '../models/position';
|
|||||||
* one `link` node among the inputs. Rule breaks are held for review.
|
* one `link` node among the inputs. Rule breaks are held for review.
|
||||||
*/
|
*/
|
||||||
export interface Target {
|
export interface Target {
|
||||||
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death';
|
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
|
||||||
id: string;
|
id: string;
|
||||||
inputs?: Array<string>;
|
inputs?: Array<string>;
|
||||||
kind?: 'target';
|
kind?: 'target';
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
|
|
||||||
export interface Training {
|
export interface Training {
|
||||||
as_of?: (string | null);
|
as_of?: (string | null);
|
||||||
|
models?: Array<string>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-flat-button type="button" (click)="start('train')">Entrenar</button>
|
<button mat-flat-button type="button" (click)="start('train')">Entrenar</button>
|
||||||
<button mat-stroked-button type="button" (click)="start('score')">Calcular riesgos</button>
|
<button mat-stroked-button type="button" (click)="start('score')">Calcular riesgos</button>
|
||||||
|
@if (domain() === 'tea') {
|
||||||
|
<button mat-stroked-button type="button" (click)="analyzeEegs()">Analizar EEG</button>
|
||||||
|
}
|
||||||
@if (run(); as r) {
|
@if (run(); as r) {
|
||||||
<span class="muted" role="status">{{ r.kind }}: {{ r.status }}</span>
|
<span class="muted" role="status">{{ r.kind }}: {{ r.status }}</span>
|
||||||
}
|
}
|
||||||
@@ -113,4 +116,64 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (domain() === 'tea') {
|
||||||
|
<div class="card model">
|
||||||
|
<h2>Electroencefalogramas</h2>
|
||||||
|
<table class="plain eegs">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Fecha</th>
|
||||||
|
<th>Registro</th>
|
||||||
|
<th>Análisis</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@for (e of eegs.value() ?? []; track e.id) {
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button mat-button type="button" (click)="eeg.set(e.id)">{{ e.study_date }}</button>
|
||||||
|
</td>
|
||||||
|
<td>{{ e.lab_record_id ?? '—' }}</td>
|
||||||
|
<td>
|
||||||
|
{{ !e.analysed ? 'Sin analizar' : e.valid ? 'Válido' : 'No válido' }}
|
||||||
|
{{ e.level ? '(' + e.level + ')' : '' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
} @empty {
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="muted">Sin EEG cargados.</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@if (eegMetrics.value(); as m) {
|
||||||
|
<h3>EEG {{ m.id }} · {{ m.age_months ?? '—' }} meses</h3>
|
||||||
|
<table class="plain">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Métrica</th>
|
||||||
|
<th>Valor</th>
|
||||||
|
<th>z</th>
|
||||||
|
<th>Curva</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@for (x of m.metrics; track x.code) {
|
||||||
|
<tr>
|
||||||
|
<td>{{ metricNames[x.code] ?? x.code }}</td>
|
||||||
|
<td class="num">{{ x.value | number: '1.2-2' }}</td>
|
||||||
|
<td class="num">{{ x.z === null ? '—' : (x.z | number: '1.2-2') }}</td>
|
||||||
|
<td>{{ x.model ?? 'sin curva en producción' }}</td>
|
||||||
|
</tr>
|
||||||
|
} @empty {
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" class="muted">Sin métricas (EEG no válido).</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { RouterLink } from '@angular/router';
|
|||||||
import { Api } from '../api/api';
|
import { Api } from '../api/api';
|
||||||
import { ApiConfiguration } from '../api/api-configuration';
|
import { ApiConfiguration } from '../api/api-configuration';
|
||||||
import { addClinicalValidation } from '../api/fn/models/add-clinical-validation';
|
import { addClinicalValidation } from '../api/fn/models/add-clinical-validation';
|
||||||
|
import { analyze } from '../api/fn/models/analyze';
|
||||||
import { models } from '../api/fn/models/models';
|
import { models } from '../api/fn/models/models';
|
||||||
import { promote } from '../api/fn/models/promote';
|
import { promote } from '../api/fn/models/promote';
|
||||||
import { readReport$Json } from '../api/fn/models/read-report-json';
|
import { readReport$Json } from '../api/fn/models/read-report-json';
|
||||||
@@ -16,6 +17,8 @@ import { score } from '../api/fn/models/score';
|
|||||||
import { train } from '../api/fn/models/train';
|
import { train } from '../api/fn/models/train';
|
||||||
import { versions } from '../api/fn/models/versions';
|
import { versions } from '../api/fn/models/versions';
|
||||||
import { domains } from '../api/fn/operations/domains';
|
import { domains } from '../api/fn/operations/domains';
|
||||||
|
import { studies } from '../api/fn/eeg/studies';
|
||||||
|
import { study } from '../api/fn/eeg/study';
|
||||||
import { runStatus } from '../api/fn/runs/run-status';
|
import { runStatus } from '../api/fn/runs/run-status';
|
||||||
import type { Domain } from '../api/models/domain';
|
import type { Domain } from '../api/models/domain';
|
||||||
import type { Version } from '../api/models/version';
|
import type { Version } from '../api/models/version';
|
||||||
@@ -78,6 +81,23 @@ export class Gobernanza {
|
|||||||
const found = this.report.value();
|
const found = this.report.value();
|
||||||
return found ? interpretabilityFigures(found as Record<string, unknown>) : [];
|
return found ? interpretabilityFigures(found as Record<string, unknown>) : [];
|
||||||
});
|
});
|
||||||
|
/** TEA: its EEGs and their analysis. */
|
||||||
|
protected readonly eegs = resource({
|
||||||
|
params: () => (this.domain() === 'tea' ? this.refreshed() + 1 : undefined),
|
||||||
|
loader: () => this.api.invoke(studies),
|
||||||
|
});
|
||||||
|
protected readonly eeg = signal<string | undefined>(undefined);
|
||||||
|
protected readonly eegMetrics = resource({
|
||||||
|
params: () => this.eeg(),
|
||||||
|
loader: ({ params }) => this.api.invoke(study, { eeg_id: params }),
|
||||||
|
});
|
||||||
|
protected readonly metricNames: Record<string, string> = {
|
||||||
|
posterior_rhythm: 'Ritmo posterior (Hz)',
|
||||||
|
spindles_n2: 'Husos de sueño N2 (por min)',
|
||||||
|
spindles_n3: 'Husos de sueño N3 (por min)',
|
||||||
|
paroxysmal_spikes: 'Picos paroxísticos (por min)',
|
||||||
|
anteroposterior_gradient: 'Gradiente anteroposterior',
|
||||||
|
};
|
||||||
protected readonly asOf = signal('');
|
protected readonly asOf = signal('');
|
||||||
protected readonly run = signal<{ kind: string; status: string } | undefined>(undefined);
|
protected readonly run = signal<{ kind: string; status: string } | undefined>(undefined);
|
||||||
protected readonly message = signal('');
|
protected readonly message = signal('');
|
||||||
@@ -115,13 +135,12 @@ export class Gobernanza {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async start(kind: 'train' | 'score'): Promise<void> {
|
protected async analyzeEegs(): Promise<void> {
|
||||||
const domain = this.domain() as Domain;
|
const { run_id } = await this.api.invoke(analyze, { domain: this.domain() as Domain });
|
||||||
const { run_id } =
|
await this.follow(run_id, 'Análisis de EEG');
|
||||||
kind === 'train'
|
}
|
||||||
? await this.api.invoke(train, { domain, body: this.asOf() ? { as_of: this.asOf() } : {} })
|
|
||||||
: await this.api.invoke(score, { domain });
|
private async follow(run_id: string, label: string): Promise<void> {
|
||||||
const label = kind === 'train' ? 'Entrenamiento' : 'Cálculo de riesgos';
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const status = (await this.api.invoke(runStatus, { run_id }))['status'] as string;
|
const status = (await this.api.invoke(runStatus, { run_id }))['status'] as string;
|
||||||
this.run.set({ kind: label, status });
|
this.run.set({ kind: label, status });
|
||||||
@@ -130,4 +149,13 @@ export class Gobernanza {
|
|||||||
}
|
}
|
||||||
this.refreshed.update((n) => n + 1);
|
this.refreshed.update((n) => n + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async start(kind: 'train' | 'score'): Promise<void> {
|
||||||
|
const domain = this.domain() as Domain;
|
||||||
|
const { run_id } =
|
||||||
|
kind === 'train'
|
||||||
|
? await this.api.invoke(train, { domain, body: this.asOf() ? { as_of: this.asOf() } : {} })
|
||||||
|
: await this.api.invoke(score, { domain });
|
||||||
|
await this.follow(run_id, kind === 'train' ? 'Entrenamiento' : 'Cálculo de riesgos');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,4 +68,28 @@ export const LAYOUTS: Record<string, Layout> = {
|
|||||||
],
|
],
|
||||||
anchor: 'CAMA_BIRADS',
|
anchor: 'CAMA_BIRADS',
|
||||||
},
|
},
|
||||||
|
tea: {
|
||||||
|
kpis: [
|
||||||
|
'M23_PACIENTES_EVALUADOS',
|
||||||
|
'M24_CONFIRMACION_DIAGNOSTICO',
|
||||||
|
'M25_DIAS_MCHAT_DIAGNOSTICO',
|
||||||
|
'M21_DIAGNOSTICADOS_CON_EEG',
|
||||||
|
'M29_CALIDAD_EEG',
|
||||||
|
],
|
||||||
|
route: [
|
||||||
|
{
|
||||||
|
label: 'ADOS-2',
|
||||||
|
step: 'Del M-CHAT al ADOS-2',
|
||||||
|
fromSample: 'M26_DIAS_MCHAT_ADOS2',
|
||||||
|
fromStep: 'M26_DIAS_MCHAT_ADOS2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Valoración neuropediátrica',
|
||||||
|
step: 'Del ADOS-2 a la valoración neuropediátrica',
|
||||||
|
fromSample: 'M25_DIAS_MCHAT_DIAGNOSTICO',
|
||||||
|
fromStep: 'M27_DIAS_ADOS2_DIAGNOSTICO',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
anchor: 'M23_PACIENTES_EVALUADOS',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -106,6 +106,16 @@ const LABELS: Record<string, string> = {
|
|||||||
pending_biopsy: 'Pendiente de biopsia',
|
pending_biopsy: 'Pendiente de biopsia',
|
||||||
biopsy_no_result: 'Biopsia sin resultado',
|
biopsy_no_result: 'Biopsia sin resultado',
|
||||||
benign_biopsy: 'Biopsia benigna',
|
benign_biopsy: 'Biopsia benigna',
|
||||||
|
confirmed: 'Diagnóstico confirmado',
|
||||||
|
in_process: 'En proceso',
|
||||||
|
not_confirmed: 'Sin TEA',
|
||||||
|
mchat_only: 'Solo M-CHAT',
|
||||||
|
psychology: 'Psicología (ADOS-2)',
|
||||||
|
neuropediatrics: 'Neuropediatría',
|
||||||
|
eeg: 'EEG',
|
||||||
|
good: 'Bueno',
|
||||||
|
bad: 'Malo',
|
||||||
|
not_analyzed: 'Sin analizar',
|
||||||
...Object.fromEntries(
|
...Object.fromEntries(
|
||||||
['0', '1', '2', '3', '4', '4A', '4B', '4C', '5', '6'].map((c) => [c, `BI-RADS ${c}`]),
|
['0', '1', '2', '3', '4', '4A', '4B', '4C', '5', '6'].map((c) => [c, `BI-RADS ${c}`]),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ const ENTITIES: Record<Entity, string> = {
|
|||||||
identity: 'Identidad',
|
identity: 'Identidad',
|
||||||
mammography: 'Mastografía',
|
mammography: 'Mastografía',
|
||||||
breast_biopsy: 'Biopsia de mama',
|
breast_biopsy: 'Biopsia de mama',
|
||||||
|
mchat: 'M-CHAT',
|
||||||
|
ados2: 'ADOS-2',
|
||||||
|
eeg: 'Electroencefalograma',
|
||||||
};
|
};
|
||||||
const IDENTITY_FIELDS: Correction['field'][] = [
|
const IDENTITY_FIELDS: Correction['field'][] = [
|
||||||
'record_number',
|
'record_number',
|
||||||
|
|||||||
Reference in New Issue
Block a user