Skip to main content

core.setidentifier

Home > @medplum/core > setIdentifier

setIdentifier() function

Sets a resource identifier for the given system.

Note that this method is only available on resources that have an "identifier" property, and that property must be an array of Identifier objects, which is not true for all FHIR resources.

If the identifier already exists, then the value is updated.

Otherwise a new identifier is added.

Signature:

export declare function setIdentifier(resource: Resource & {
identifier?: Identifier[];
}, system: string, value: string): void;

Parameters

Parameter

Type

Description

resource

Resource & { identifier?: Identifier[]; }

The resource to add the identifier to.

system

string

The identifier system.

value

string

The identifier value.

Returns:

void