Skip to main content

core.setprimaryprovider

Home > @medplum/core > setPrimaryProvider

setPrimaryProvider() function​

Marks one participant as the appointment's primary provider, and no other.

A downstream system that accepts one provider per appointment should be sent the primary.

Signature:

export declare function setPrimaryProvider(participants: readonly AppointmentParticipant[], primary: Reference | undefined): AppointmentParticipant[];

Parameters​

Parameter

Type

Description

participants

readonly AppointmentParticipant[]

The appointment's participants.

primary

Reference | undefined

The actor to mark, or undefined to mark nobody.

Returns:

AppointmentParticipant[]

The participants, with the mark moved onto primary and any other type kept.