About webhooks
Webhooks allow you to get programmatic notifications and data from Datavant Site Connect when changes to the EHR connection data occur.
Rather than requiring you to pull information via our API, webhooks will push information to your endpoint. When one of those events is triggered (for example a new patient is added), Datavant Site Connect will send the notification or data as an HTTP POST
request, with a JSON body, to the endpoint(s) you specify.
The Datavant Site Connect webhook process works by sending a JSON of the Datavant Site Connect data element (Patient, Encounter, Charge, etc.) for each of your practice connections.
Triggers
Currently, the webhook process is triggered for the following events for each connection:
-
New Record: When a new record is introduced to the source EMR / PM system. For example, when a practice registers a new patient
-
Updated Record: When a record within an existing source element is modified. For example, when a practice updates a date/time for an existing appointment.
Payload
Our webhook payload consists of 2 keys: elements and data.
-
Element: This represents which of Datavant Site Connect's data elements is represented within the payload.
-
Date: The JSON Payload.
The key difference between the webhook payload and the Datavant Site Connect Standard Data Model is the timestamps being returned. The JSON payload replaces the Datavant Site Connect timestamps with the source system timestamps. Additionally, the last column of the payload will contain an Updated or New Indicator.
Example Payload:
{
"element": "demographic",
"data": "client_id|client_patient_id|first_name|middle_name|last_name|prefix|suffix|ssn|dob|other_id|account_id|gender|race|ethnicity|primary_language|phone_number|phone_ext|phone_type|second_number|second_ext|second_type|first_email|second_email|death_indication|death_date|address_type|address_line_1|address_line_2|city|state|zip|pcp_id|event_type\nTEST01|1112223|BILL||GATES|||000000000|1112223|1112223|1112223|M|2131-1|U||5555555555|||5555555555||M|nill.gates@gmail.com||N|||123 MSN Way||Seattle|WA|98101-0000||Updated"
}
Note: Line breaks within the DATA portion of the payload are represented with a '/n' at each break.
Backloads
Datavant Site Connect will provide an initial full demographic backload to allow you to join your webhook payload data back to a demographic record. Backloaded data is sent to your Datavant Site Connect data lake and is made available via an unload to your Datavant Site Connect S3 environment or the Datavant Site Connect API.
We understand you may need a backload of other Datavant Site Connect data elements besides demographics. These additional elements and how far back to backload can be discussed and arranged with your Client Success Manager.
Setup
To enable webhooks, simply provide your Client Success Manager with a webhook URL. If you choose, you may also provide an API key to authenticate to your endpoint.
Webhooks Policy
Policy | Description | Constraint |
---|---|---|
minDelayTarget |
The minimum delay for a retry.
Unit: Seconds |
1 to maximum delay
Default: 20 |
maxDelayTarget |
The maximum delay for a retry.
Unit: Seconds |
Minimum delay to 3,600
Default: 20 |
numRetries |
The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries. |
0 to 100
Default: 3 |
numNoDelayRetries |
The number of retries to be done immediately, with no delay between them. |
0 or greater
Default: 0 |
numMinDelayRetries |
The number of retries in the pre-backoff phase, with the specified minimum delay between them. |
0 or greater
Default: 0 |
numMaxDelayRetries |
The number of retries in the post-backoff phase, with the maximum delay between them. |
0 or greater
Default: 0 |
backoffFunction |
The model for backoff between retries. |
One of four options:
Default: linear |
maxReceivesPerSecond |
The maximum number of deliveries per second, per subscription. |
1 or greater
Default: No throttling |