Skip to main content

core.medplumclient.createcomment

Home > @medplum/core > MedplumClient > createComment

MedplumClient.createComment() method

Creates a FHIR Communication resource with the provided data content.

This is a convenience method to handle common cases where a Communication resource is created with a payload.

Signature:

createComment(resource: Resource, text: string, options?: MedplumRequestOptions): Promise<WithId<Communication>>;

Parameters

Parameter

Type

Description

resource

Resource

The FHIR resource to comment on.

text

string

The text of the comment.

options

MedplumRequestOptions

(Optional) Optional fetch options.

Returns:

Promise<WithId<Communication>>

The result of the create operation.