diff --git a/openapi.json b/openapi.json index 4eda5c5..b82a165 100644 --- a/openapi.json +++ b/openapi.json @@ -328,6 +328,88 @@ "title": "Correction", "type": "object" }, + "Document": { + "properties": { + "columns": { + "items": { + "type": "string" + }, + "maxItems": 12, + "minItems": 1, + "title": "Columns", + "type": "array" + }, + "parameters": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxItems": 30, + "title": "Parameters", + "type": "array" + }, + "risk_scales": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "maxItems": 40, + "title": "Risk Scales", + "type": "array" + }, + "row_stages": { + "items": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + "maxItems": 5000, + "title": "Row Stages", + "type": "array" + }, + "rows": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxItems": 5000, + "title": "Rows", + "type": "array" + }, + "timeline": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "maxItems": 5, + "title": "Timeline", + "type": "array" + }, + "title": { + "maxLength": 150, + "title": "Title", + "type": "string" + } + }, + "required": [ + "title", + "parameters", + "columns", + "rows" + ], + "title": "Document", + "type": "object" + }, "Domain": { "enum": [ "cacu", @@ -2790,6 +2872,75 @@ ] } }, + "/cacu/exports/capabilities": { + "get": { + "operationId": "capabilities", + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + } + }, + "summary": "Capabilities", + "tags": [ + "exports" + ] + } + }, + "/cacu/exports/{kind}": { + "post": { + "operationId": "export", + "parameters": [ + { + "in": "path", + "name": "kind", + "required": true, + "schema": { + "title": "Kind", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Export", + "tags": [ + "exports" + ] + } + }, "/domains": { "get": { "operationId": "domains", @@ -5107,7 +5258,7 @@ }, "/{domain}/fhir/DiagnosticReport": { "get": { - "description": "The domain's reports (each study of the catalog with a report), as known by the last\nday with data.", + "description": "The domain's reports (each study of the catalog with a report), as known by the last\nday with data (CaCu: or by `stage-cutoff`, for the stages of each sample's route).", "operationId": "search_diagnostic_report", "parameters": [ { @@ -5136,6 +5287,23 @@ "title": "Subject" } }, + { + "in": "query", + "name": "stage-cutoff", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stage-Cutoff" + } + }, { "in": "query", "name": "_count", @@ -5727,6 +5895,46 @@ "title": "Identifier" } }, + { + "description": "CaCu: completed years at the cut-off", + "in": "query", + "name": "follow-up-age-min", + "required": false, + "schema": { + "anyOf": [ + { + "maximum": 150, + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "CaCu: completed years at the cut-off", + "title": "Follow-Up-Age-Min" + } + }, + { + "description": "CaCu: completed years at the cut-off", + "in": "query", + "name": "follow-up-age-max", + "required": false, + "schema": { + "anyOf": [ + { + "maximum": 150, + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "CaCu: completed years at the cut-off", + "title": "Follow-Up-Age-Max" + } + }, { "description": "-recent or -risk-", "in": "query", diff --git a/src/app/api/fn/exports/capabilities.ts b/src/app/api/fn/exports/capabilities.ts new file mode 100644 index 0000000..de2bb68 --- /dev/null +++ b/src/app/api/fn/exports/capabilities.ts @@ -0,0 +1,29 @@ +/* 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 Capabilities$Params { +} + +export function capabilities(http: HttpClient, rootUrl: string, params?: Capabilities$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, capabilities.PATH, 'get'); + if (params) { + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +capabilities.PATH = '/cacu/exports/capabilities'; diff --git a/src/app/api/fn/exports/export.ts b/src/app/api/fn/exports/export.ts new file mode 100644 index 0000000..c53ba70 --- /dev/null +++ b/src/app/api/fn/exports/export.ts @@ -0,0 +1,34 @@ +/* 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 { Document } from '../../models/document'; + +export interface Export$Params { + kind: string; + body: Document +} + +export function export$(http: HttpClient, rootUrl: string, params: Export$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, export$.PATH, 'post'); + if (params) { + rb.path('kind', params.kind, {}); + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +export$.PATH = '/cacu/exports/{kind}'; diff --git a/src/app/api/fn/fhir/search-diagnostic-report.ts b/src/app/api/fn/fhir/search-diagnostic-report.ts index 0e9c6e6..0ae1e78 100644 --- a/src/app/api/fn/fhir/search-diagnostic-report.ts +++ b/src/app/api/fn/fhir/search-diagnostic-report.ts @@ -16,6 +16,7 @@ export interface SearchDiagnosticReport$Params { * Patient/, comma-separated */ subject?: (string | null); + 'stage-cutoff'?: (string | null); '_count'?: (number | null); '_offset'?: number; } @@ -26,6 +27,7 @@ export function searchDiagnosticReport(http: HttpClient, rootUrl: string, params if (params) { rb.path('domain', params.domain, {}); rb.query('subject', params.subject, {}); + rb.query('stage-cutoff', params['stage-cutoff'], {}); rb.query('_count', params['_count'], {}); rb.query('_offset', params['_offset'], {}); } diff --git a/src/app/api/fn/fhir/search-patient.ts b/src/app/api/fn/fhir/search-patient.ts index bf25154..c8d5e3e 100644 --- a/src/app/api/fn/fhir/search-patient.ts +++ b/src/app/api/fn/fhir/search-patient.ts @@ -34,6 +34,16 @@ export interface SearchPatient$Params { */ identifier?: (string | null); +/** + * CaCu: completed years at the cut-off + */ + 'follow-up-age-min'?: (number | null); + +/** + * CaCu: completed years at the cut-off + */ + 'follow-up-age-max'?: (number | null); + /** * -recent or -risk- */ @@ -68,6 +78,8 @@ export function searchPatient(http: HttpClient, rootUrl: string, params: SearchP rb.query('follow-up-status', params['follow-up-status'], {}); rb.query('name', params.name, {}); rb.query('identifier', params.identifier, {}); + rb.query('follow-up-age-min', params['follow-up-age-min'], {}); + rb.query('follow-up-age-max', params['follow-up-age-max'], {}); rb.query('_sort', params['_sort'], {}); rb.query('risk-horizon', params['risk-horizon'], {}); rb.query('_revinclude', params['_revinclude'], {}); diff --git a/src/app/api/functions.ts b/src/app/api/functions.ts index 422bdb6..32c6c78 100644 --- a/src/app/api/functions.ts +++ b/src/app/api/functions.ts @@ -5,6 +5,10 @@ export type { AuthCookieLogin$Params as AuthCookieLogin$Params } from './fn/auth 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 { Capabilities$Params as Capabilities$Params } from './fn/exports/capabilities'; +export { capabilities as capabilities } from './fn/exports/capabilities'; +export type { Export$Params as Export$Params } from './fn/exports/export'; +export { export$ as export$ } from './fn/exports/export'; 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'; diff --git a/src/app/api/models.ts b/src/app/api/models.ts index c0d0dac..9da6667 100644 --- a/src/app/api/models.ts +++ b/src/app/api/models.ts @@ -9,6 +9,7 @@ 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 { Document } from './models/document'; export type { Domain } from './models/domain'; export type { Entry } from './models/entry'; export type { ErrorModel } from './models/error-model'; diff --git a/src/app/api/models/document.ts b/src/app/api/models/document.ts new file mode 100644 index 0000000..77a4cd0 --- /dev/null +++ b/src/app/api/models/document.ts @@ -0,0 +1,18 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface Document { + columns: Array; + parameters: Array>; + risk_scales?: Array<{ +[key: string]: any; +}>; + row_stages?: Array>; + rows: Array>; + timeline?: Array<{ +[key: string]: string; +}>; + title: string; +}