Skip to main content

core.evalfhirpathtyped

Home > @medplum/core > evalFhirPathTyped

evalFhirPathTyped() function

Evaluates a FHIRPath expression against a resource or other object.

Signature:

export declare function evalFhirPathTyped(expression: string | FhirPathAtom, input: TypedValue[], variables?: Record<string, TypedValue>, cache?: LRUCache<FhirPathAtom> | undefined): TypedValue[];

Parameters

Parameter

Type

Description

expression

string | FhirPathAtom

The FHIRPath expression to evaluate.

input

TypedValue[]

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:

TypedValue[]

The result of the FHIRPath expression against the resource or object.