Skip to main content

core.getidentifier

Home > @medplum/core > getIdentifier

getIdentifier() function

Returns the resource identifier for the given system.

If multiple identifiers exist with the same system, the first one is returned.

If the system is not found, then returns undefined.

Signature:

export declare function getIdentifier(resource: Resource, system: string): string | undefined;

Parameters

ParameterTypeDescription
resourceResourceThe resource to check.
systemstringThe identifier system.

Returns:

string | undefined

The identifier value if found; otherwise undefined.