Skip to main content

core.parsesearchrequest

Home > @medplum/core > parseSearchRequest

parseSearchRequest() function

Parses a search URL into a search request.

Signature:

export declare function parseSearchRequest<T extends Resource = Resource>(url: T['resourceType'] | URL | string, query?: Record<string, string[] | string | undefined>): SearchRequest<T>;

Parameters

ParameterTypeDescription
urlT['resourceType'] | URL | stringThe original search URL or the FHIR resource type.
queryRecord<string, string[] | string | undefined>(Optional) Optional collection of additional query string parameters.

Returns:

SearchRequest<T>

A parsed SearchRequest.