Event Integrations
Almost everything that happens in Noah will result in an event being sent to all clients.
Noah ES supports two different types of Event Integrations: Real Time Messaging (RTM) and Webhooks.
See an example of the implementation of RTM and Webhooks in the Sample App: Noah ES Service App
Real-Time Messaging (RTM)
This implementation is based on SignalR, which is making use of different technologies depending on operating systems, firewall setups etc.
Please see more here: API Events - Real Time Messaging API (RTM)
Webhooks
Please see more here: Webhooks
Selecting the type of event integration
The table below highlights some of the differences between RTM and Webhooks
| Real Time Messaging (RTM) | Webhooks |
---|---|---|
No changes to firewall setups required | X Usually not, since the client initiates the connection |
|
Low latency (“real time”) | X |
|
No need to deal with skipped events during transient disconnects | But SignalR tries to re-connect to some extent | X |
No risk of skipping events during high load | Can be an issue in SignalR when queue grows too big | X |
Easy catch up after downtime App does not need to be running always |
| X |
Always encrypted | Note that events mostly contains ids, and never patient data. | X |
No HTTPS setup required | X |
|
Subscribing to event types
You can set up events via the API.
Important!:
Your Request URL might receive many events and requests. Consider decoupling your ingestion of events from the processing and reaction to them.
List of Events
The list of implemented events can be found in the Swagger API Documentation
EventSubscriptions > Post > Schema > eventSubscriptions … > EventSubscriptionItem … > Array
Please see the screenshots below
Example
{
"TenantId": "730388bc-af11-468d-bd2e-cec0f273a822",
"NotificationEventSubscriptionId": "19efd771-f3f7-4287-a4da-f9f16adc0552",
"NotificationEventId": "6e665039-b4ec-41b8-96ac-614b53eeea10",
"CorrelationId": "66861d3f-37b9-441b-9f00-f60181fa49d2",
"EventType": "PatientCreated",
"TransmissionDate": "2017-03-02T14:37:07.9395339Z",
"Event": {
"ResourceId": "b93009e0-07b9-4260-bf2a-a2c02cb230c8",
"EventDate": "2017-03-02T14:37:07.9395339Z",
"References": [{
"Rel": "self",
"Href": "https://.../730388bc-af11-468d-bd2e-cec0f273a822/api/patients/b93009e0-07b9-4260-bf2a-a2c02cb230c8",
"ResourceId": "b93009e0-07b9-4260-bf2a-a2c02cb230c8"
}]
}