core.medplumclient.createcomment | Medplum

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 [​](/content/docs/sdk/core.medplumclient.createcomment#parameters "Direct link to Parameters"/index.html)

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 >

The result of the create operation.