core.getidentifier | Medplum

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

Parameter Type Description
resource Resource The resource to check.
system string The identifier system.

Returns:

string | undefined

The identifier value if found; otherwise undefined.