ISSSTELEON WebApp
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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;
|
||||
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';
|
||||
Reference in New Issue
Block a user