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

ParameterTypeDescription
resourceResource & { identifier?: Identifier[]; }The resource to add the identifier to.
systemstringThe identifier system.
valuestringThe identifier value.

Returns:

void