Skip to main content

core.gettypedpropertyvalue

Home > @medplum/core > getTypedPropertyValue

getTypedPropertyValue() function

Returns the value of the property and the property type. Some property definitions support multiple types. For example, "Observation.value[x]" can be "valueString", "valueInteger", "valueQuantity", etc. According to the spec, there can only be one property for a given element definition. This function returns the value and the type.

Signature:

export declare function getTypedPropertyValue(input: TypedValue, path: string, options?: GetTypedPropertyValueOptions): TypedValue[] | TypedValue | undefined;

Parameters

Parameter

Type

Description

input

TypedValue

The base context (FHIR resource or backbone element).

path

string

The property path.

options

GetTypedPropertyValueOptions

(Optional) (optional) Additional options

Returns:

TypedValue[] | TypedValue | undefined

The value of the property and the property type.