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 commmon cases where a Communication resource is created with a payload.

Signature:

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

Parameters

ParameterTypeDescription
resourceResourceThe FHIR resource to comment on.
textstringThe text of the comment.
optionsRequestInit(Optional) Optional fetch options.

Returns:

Promise<Communication>

The result of the create operation.