core.createfhircastmessagepayload
Home > @medplum/core > createFhircastMessagePayload
createFhircastMessagePayload() function
Creates a serializable JSON payload for the FHIRcast protocol
Signature:
export declare function createFhircastMessagePayload<EventName extends FhircastEventVersionOptional>(topic: string, event: EventName, context: FhircastValidContextForEvent<EventName> | FhircastValidContextForEvent<EventName>[], versionId?: never): FhircastMessagePayload<EventName>;
Parameters
Parameter  | Type  | Description  | 
|---|---|---|
topic  | string  | The topic that this message will be published on. Usually a UUID.  | 
event  | EventName  | The event name, ie. "Patient-open" or "Patient-close".  | 
context  | FhircastValidContextForEvent<EventName> | FhircastValidContextForEvent<EventName>[]  | The updated context, containing new versions of resources related to this event.  | 
versionId  | never  | (Optional) The current   | 
Returns:
FhircastMessagePayload<EventName>
A serializable FhircastMessagePayload.