core.evalfhirpath
Home > @medplum/core > evalFhirPath
evalFhirPath() function
Evaluates a FHIRPath expression against a resource or other object.
Signature:
export declare function evalFhirPath(expression: string | FhirPathAtom, input: unknown, variables?: Record<string, TypedValue>, cache?: LRUCache<FhirPathAtom> | undefined): unknown[];
Parameters
Parameter | Type | Description |
|---|---|---|
expression | string | FhirPathAtom | The FHIRPath expression to evaluate. |
input | unknown | The resource or object to evaluate the expression against. |
variables | Record<string, TypedValue> | (Optional) A map of variables for eval input. |
cache | LRUCache<FhirPathAtom> | undefined | (Optional) Cache for parsed ASTs. |
Returns:
unknown[]
The result of the FHIRPath expression against the resource or object.