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?: MedplumRequestOptions): Promise<Communication>;
Parameters
Parameter  | Type  | Description  | 
|---|---|---|
resource  | Resource  | The FHIR resource to comment on.  | 
text  | string  | The text of the comment.  | 
options  | (Optional) Optional fetch options.  | 
Returns:
Promise<Communication>
The result of the create operation.