Overview

Nabla Connect is an integration protocol between Nabla and any EHR, that leverages API calls between Nabla's server and your EHR's server. From a high-level standpoint, it enables end users (healthcare providers) to seamlessly initiate Nabla encounters directly from the EHR, carrying over essential context, and facilitating note export back to the EHR.

Specifically, this involves:

Readiness

Nabla Connect is already available. Some implementation details of the documentation you are reading might change. However, there won't be any differences from a high-level standpoint. Your feedback is valuable and we would love to know if Nabla Connect is well suited for your setup, or if we improve some parts to make it fit better.

Flow Description

The following schema presents the two main steps of the Nabla Connect flow.

Nabla Connect high-level schema (1).png

From a user perspective the flow looks like this:

This is roughly the path the user would follow:

image.png

Requirements

On your side, you will have to:

Technical details

Nabla will expose APIs that your EHR server has to call to push data to us (referred as "incoming" APIs), and in return, we expect you to expose an endpoint we will call to return some data (referred as "outgoing" APIs). These API calls are authenticated and secured as described further in this document.

Incoming APIs (EHR → Nabla)

Incoming APIs are api calls we expect to receive from you. This typically includes the initial encounter creation call.

<aside> <img src="/icons/link_lightgray.svg" alt="/icons/link_lightgray.svg" width="40px" />

The <baseUrl> for all APIs is [https://<region>.api.nabla.com/v1/connect/server](https://app.nabla.com/api/<REGION>/v1/connect/server)
<region> is us or eu

</aside>

Authentication

We expect you to authenticate your request with an access token generated by our server. To get this access token, we want you to follow our Server API authentication flow, using OAuth Clients. In short:

For more details, you can refer to the server authentication docs:

Server authentication

APIs

Outgoing APIs (Nabla → EHR)

Outgoing APIs are api calls you will receive from us.

We expect you to verify that the request is correctly signed by us.

These APIs typically correspond to when we want to export our generations to you, so that you can store it, and display it in your EHR. This typically includes the note Nabla generates.

You can configure the callback URL (*<callback_url>*) on which you will be called on the Admin page.

image.png

image.png

Authentication

You can get the signature secret on the Admin page.

image.png

We use an HMAC Signature Verification. HMAC (Hash-based Message Authentication Code) verification is a lightweight but robust way to ensure that outgoing api calls genuinely originate from Nabla and have not been tampered with in transit.

Each callback request to your endpoint includes the following headers:

The signature is calculated using the HMAC-SHA256 algorithm based on:

These signatures are included in the x-nabla-callback-signature header.

To securely validate a callback on your server, implement the following:

  1. Extract the timestamp and signature headers.
  2. Reject the request if the timestamp is older than 60 seconds (to prevent replay attacks).
  3. Concatenate the timestamp and the request body.
  4. Compute the HMAC using the shared secret key and SHA-256.
  5. Compare your computed HMAC with each signature in the header.
  6. Reject with HTTP 401 if no match is found.
  7. Reject the request if the callback event ID has already been processed (to enforce idempotency).

Here's a JavaScript sample code for the signature verification described above:

For more details on HMAC-SHA256 please refer to RFC-2104 and RFC-4231.

APIs

All requests Nabla will send to your EHR a callback on a predefined url you provide us. The payload is polymorphic, the schema depends on the type field.

{
  "request_uuid": string, # unique uuid to identify the request
  "type": "NOTE_EXPORT|PATIENT_INSTRUCTIONS_EXPORT|...", # type 
  # ...
}