Skip to main content

HS.FHIRServer.API.Data.AbstractEndpointEvent

abstract class HS.FHIRServer.API.Data.AbstractEndpointEvent extends HS.HC.Callback.Event

@API.Object Base class for the events that report a change to a FHIR Server or Bulk FHIR Coordinator (BFC) endpoint.
An event is passed to a registered callback handler whenever an endpoint is created, updated or deleted. Handlers receive one of the two concrete classes, which document how to register, which operations fire events and what their snapshots contain:
- HS.FHIRServer.API.Data.EndpointEvent for FHIR Server endpoints
- HS.BulkFHIR.API.Data.EndpointEvent for BFC endpoints

Every successful endpoint operation produces exactly one event. The event identifies the action (Action) and the endpoint (EndpointUrl), and carries the endpoint's configuration before and after the operation (PreviousEndpointData, EndpointData).

A handler registered for both kinds may declare the event parameter of its HS.HC.Callback.Handler OnCallback method as this class and use these members for either; only the two snapshots differ in shape, and the event's class says which kind it is.

The handler runs in the operation's process after the operation has committed, with the caller's privileges, and cannot fail or undo the operation. If it returns an error status or throws, the operation still succeeds and the failure is returned to the caller as a warning through the pCallbackStatus Output parameter of the method that fired the event.

Property Inventory

Method Inventory

Parameters

parameter ACTIONCREATED = Created;
The endpoint was created.
PreviousEndpointData is absent; EndpointData is the new endpoint.
parameter ACTIONDELETED = Deleted;
The endpoint was removed.
PreviousEndpointData is the endpoint before removal. EndpointData is absent unless the endpoint is retained in a removed state, in which case it is the retained endpoint; the concrete classes say when that happens.
parameter ACTIONUPDATED = Updated;
The endpoint was changed. Any change to an existing endpoint is an update, including enabling, disabling, reconfiguring, activating and deactivating it; compare the two snapshots to see what changed.
PreviousEndpointData is the endpoint before the change; EndpointData is the endpoint after it.
parameter CALLBACKCONTEXT;
Context to pass to HS.HC.Callback.Manager Register to receive this event. Abstract here; each concrete class supplies its own value.

Properties

property Action as %String (VALUELIST = ",Created,Updated,Deleted");
What happened to the endpoint: ACTIONCREATED, ACTIONUPDATED or ACTIONDELETED.
Property methods: ActionDisplayToLogical(), ActionGet(), ActionIsValid(), ActionLogicalToDisplay(), ActionLogicalToOdbc(), ActionNormalize(), ActionSet()
property EndpointData as %DynamicObject;
The endpoint's configuration as it is after the operation. Absent (empty string) when the endpoint no longer exists, such as after a deletion that removes it.
The object is the configuration in the form the product's own API uses, passed through unmodified; the concrete class names the API that defines it.
Property methods: EndpointDataGet(), EndpointDataGetObject(), EndpointDataGetObjectId(), EndpointDataGetSwizzled(), EndpointDataIsValid(), EndpointDataNewObject(), EndpointDataSet(), EndpointDataSetObject(), EndpointDataSetObjectId(), EndpointDataUnSwizzle()
property EndpointUrl as %String;
The endpoint URL (e.g. "/fhir/r4"), as it was before the operation.
Property methods: EndpointUrlDisplayToLogical(), EndpointUrlGet(), EndpointUrlIsValid(), EndpointUrlLogicalToDisplay(), EndpointUrlLogicalToOdbc(), EndpointUrlNormalize(), EndpointUrlSet()
property PreviousEndpointData as %DynamicObject;
The endpoint's configuration as it was before the operation. Absent (empty string) when the endpoint did not yet exist, that is, on ACTIONCREATED.
Same form as EndpointData.
Property methods: PreviousEndpointDataGet(), PreviousEndpointDataGetObject(), PreviousEndpointDataGetObjectId(), PreviousEndpointDataGetSwizzled(), PreviousEndpointDataIsValid(), PreviousEndpointDataNewObject(), PreviousEndpointDataSet(), PreviousEndpointDataSetObject(), PreviousEndpointDataSetObjectId(), PreviousEndpointDataUnSwizzle()

Methods

method GetActionName(pLocalize As %Boolean = 0) as %String
Returns Action as display text.
@Input pLocalize When true, the text is translated to the session language; otherwise the stored value is returned.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab