diff --git a/openapi.json b/openapi.json index f14c00a..27b77e9 100644 --- a/openapi.json +++ b/openapi.json @@ -4861,7 +4861,7 @@ }, "/{domain}/fhir/Patient": { "get": { - "description": "Patients; with `follow-up-window`, the domain's follow-up list at the cut-off,\nfiltered by status and in reading order, with what the list shows of each patient\nincluded.", + "description": "Patients, or the domain's follow-up list selected by window or start.\n\nFor TEA, a cutoff or a TEA filter also selects the follow-up list. Patients without\nfollow-up episodes appear only in the plain search.", "operationId": "search_patient", "parameters": [ { @@ -4906,6 +4906,25 @@ "title": "Follow-Up-Window" } }, + { + "description": "explicit window start that overrides follow-up-window", + "in": "query", + "name": "follow-up-start", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "explicit window start that overrides follow-up-window", + "title": "Follow-Up-Start" + } + }, { "description": "default: the last day with data", "in": "query", @@ -5056,6 +5075,120 @@ ] } }, + "/{domain}/fhir/Patient/$eeg-summary": { + "get": { + "description": "EEG counts for the follow-up list. Without a window or start, use the whole history.", + "operationId": "eeg_summary", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "description": "months: the domain's follow-up list over that window up to the cut-off", + "in": "query", + "name": "follow-up-window", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "months: the domain's follow-up list over that window up to the cut-off", + "title": "Follow-Up-Window" + } + }, + { + "description": "explicit window start that overrides follow-up-window", + "in": "query", + "name": "follow-up-start", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "explicit window start that overrides follow-up-window", + "title": "Follow-Up-Start" + } + }, + { + "description": "default: the last day with data", + "in": "query", + "name": "follow-up-cutoff", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "default: the last day with data", + "title": "Follow-Up-Cutoff" + } + }, + { + "in": "query", + "name": "follow-up-status", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Follow-Up-Status" + } + } + ], + "responses": { + "200": { + "content": { + "application/fhir+json": { + "schema": { + "type": "object" + } + } + }, + "description": "FHIR" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Eeg Summary", + "tags": [ + "fhir" + ] + } + }, "/{domain}/fhir/Patient/{id}": { "get": { "operationId": "read_patient", diff --git a/src/app/api/fn/fhir/eeg-summary.ts b/src/app/api/fn/fhir/eeg-summary.ts new file mode 100644 index 0000000..c91dd76 --- /dev/null +++ b/src/app/api/fn/fhir/eeg-summary.ts @@ -0,0 +1,54 @@ +/* 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 EegSummary$Params { + domain: Domain; + +/** + * months: the domain's follow-up list over that window up to the cut-off + */ + 'follow-up-window'?: (number | null); + +/** + * explicit window start that overrides follow-up-window + */ + 'follow-up-start'?: (string | null); + +/** + * default: the last day with data + */ + 'follow-up-cutoff'?: (string | null); + 'follow-up-status'?: (string | null); +} + +export function eegSummary(http: HttpClient, rootUrl: string, params: EegSummary$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, eegSummary.PATH, 'get'); + if (params) { + rb.path('domain', params.domain, {}); + rb.query('follow-up-window', params['follow-up-window'], {}); + rb.query('follow-up-start', params['follow-up-start'], {}); + rb.query('follow-up-cutoff', params['follow-up-cutoff'], {}); + rb.query('follow-up-status', params['follow-up-status'], {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/fhir+json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + }>; + }) + ); +} + +eegSummary.PATH = '/{domain}/fhir/Patient/$eeg-summary'; diff --git a/src/app/api/fn/fhir/search-patient.ts b/src/app/api/fn/fhir/search-patient.ts index dd908e2..a2bd489 100644 --- a/src/app/api/fn/fhir/search-patient.ts +++ b/src/app/api/fn/fhir/search-patient.ts @@ -18,6 +18,11 @@ export interface SearchPatient$Params { */ 'follow-up-window'?: (number | null); +/** + * explicit window start that overrides follow-up-window + */ + 'follow-up-start'?: (string | null); + /** * default: the last day with data */ @@ -54,6 +59,7 @@ export function searchPatient(http: HttpClient, rootUrl: string, params: SearchP rb.path('domain', params.domain, {}); rb.query('_id', params['_id'], {}); rb.query('follow-up-window', params['follow-up-window'], {}); + rb.query('follow-up-start', params['follow-up-start'], {}); rb.query('follow-up-cutoff', params['follow-up-cutoff'], {}); rb.query('follow-up-status', params['follow-up-status'], {}); rb.query('_sort', params['_sort'], {}); diff --git a/src/app/api/functions.ts b/src/app/api/functions.ts index c54b2ff..4610003 100644 --- a/src/app/api/functions.ts +++ b/src/app/api/functions.ts @@ -99,6 +99,8 @@ export type { SearchObservation$Params as SearchObservation$Params } from './fn/ 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 { EegSummary$Params as EegSummary$Params } from './fn/fhir/eeg-summary'; +export { eegSummary as eegSummary } from './fn/fhir/eeg-summary'; 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';