Currently Supported Subscriptions
resource_type | event | description |
---|---|---|
Appointment | appointment_insertion | Fires upon complete or failed response from an integration when inserting an appointment into an EHR schedule. |
Appointment | appointment_created | Fires when NexHealth detects a new appointment has been created in the health record system. For appointments you create via the NexHealth API we will wait to fire this webhook until we successfully read the appointment back in on our next read cycle (~10 minutes). |
Appointment | appointment_updated | Fires when Nexhealth detects a change to an appointment object in the health record system. For appointments you update via the NexHealth API we will wait to fire this webhook until we successfully read the change back in on our next read cycle (~10 minutes). |
FormRequest | form_request_completed | Fires when a patient submits a completed form. |
Patient | patient_created | Fires when NexHealth detects a new patient has been created via API or in the health record system. |
Patient | patient_updated | Fires when NexHealth detects a change to a patient object. |
SyncStatus | sync_status_read_change | Fires when an integration's read functionality status changes between red and green or vice versa. |
SyncStatus | sync_status_write_change | Fires when an integration's write functionality status changes between red and green or vice versa. |
You can find example payloads for each subscription below.
appointment_insertion
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "Appointment",
"event_name": "appointment_insertion.complete",
"event_time": "2022-03-30T09:50:20.174Z",
"data": {
"appointment": {
"id": 125,
"misc": {
"is_booked_on_nexhealth": true
},
"note": "Peter Scott has some concerns they want to discuss about their condition",
"status": "waiting",
"deleted": false,
"is_past": true,
"end_time": "2021-12-02T09:45:00.000Z",
"referrer": null,
"timezone": "America/New_York",
"cancelled": false,
"confirmed": true,
"checkin_at": null,
"created_at": "2021-11-25T12:05:41.303Z",
"foreign_id": null,
"patient_id": 107,
"start_time": "2021-12-02T09:30:00.000Z",
"updated_at": "2021-11-25T12:05:41.303Z",
"checked_out": false,
"is_guardian": false,
"location_id": 1,
"provider_id": 104,
"unavailable": false,
"cancelled_at": null,
"confirmed_at": null,
"operatory_id": 2,
"patient_name": "Peter Scott",
"provider_name": "Albert Einstein",
"checked_out_at": null,
"institution_id": 1,
"last_sync_time": null,
"patient_missed": false,
"foreign_id_type": "nex",
"is_past_patient": true,
"timezone_offset": "-05:00",
"end_time_with_tz": "2021-12-02T04:45:00.000-05:00",
"insurance_plan_id": null,
"patient_confirmed": false,
"created_at_with_tz": "2021-11-25T07:05:41.303-05:00",
"created_by_user_id": null,
"sooner_if_possible": false,
"start_time_with_tz": "2021-12-02T04:30:00.000-05:00",
"appointment_type_id": 4,
"insurance_carrier_id": null,
"patient_confirmed_at": null,
"insurance_choice_type": null,
"is_new_clients_patient": null
}
}
}
appointment_created
Note that appointments is an array and can contain multiple appointments.
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "Appointment",
"event_name": "appointment_created",
"event_time": "2022-03-22T15:22:50.873Z",
"data": {
"appointments": [
{
"id": 250,
"misc": {
"is_booked_on_nexhealth": true
},
"note": null,
"status": "waiting",
"deleted": false,
"is_past": true,
"end_time": "2022-02-16T14:15:00.000Z",
"referrer": null,
"timezone": "America/New_York",
"cancelled": false,
"confirmed": false,
"checkin_at": null,
"created_at": "2022-02-16T11:34:23.883Z",
"foreign_id": null,
"patient_id": 180,
"start_time": "2022-02-16T14:00:00.000Z",
"updated_at": "2022-03-11T11:47:32.833Z",
"checked_out": false,
"is_guardian": false,
"location_id": 1,
"provider_id": 73,
"unavailable": true,
"cancelled_at": null,
"confirmed_at": null,
"operatory_id": 1,
"patient_name": "Ion Croitoru",
"provider_name": "Jonas Salk",
"checked_out_at": null,
"institution_id": 1,
"last_sync_time": null,
"patient_missed": false,
"foreign_id_type": "nex",
"is_past_patient": true,
"timezone_offset": "-05:00",
"end_time_with_tz": "2022-02-16T09:15:00.000-05:00",
"insurance_plan_id": null,
"patient_confirmed": false,
"created_at_with_tz": "2022-02-16T06:34:23.883-05:00",
"created_by_user_id": 180,
"sooner_if_possible": false,
"start_time_with_tz": "2022-02-16T09:00:00.000-05:00",
"appointment_type_id": 0,
"insurance_carrier_id": null,
"patient_confirmed_at": null,
"insurance_choice_type": "myself",
"is_new_clients_patient": true
}
]
}
}
appointment_updated
The following fields can trigger appointment_update events:
patient_id
start_time
end_time
cancelled
missed
confirmed
location_id
sooner_if_possible
operatory_id
checked_out
checked_out_at
provider_id
note
appointment_type_id
deleted
descriptors
The previous_attributes field identifies the update that was made.
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "Appointment",
"event_name": "appointment_updated",
"event_time": "2022-03-31T16:14:19.152Z",
"data": {
"appointment": {
"id": 244,
"misc": { "is_booked_on_nexhealth": true },
"note": null,
"status": "cancelled",
"deleted": false,
"is_past": true,
"end_time": "2022-01-24T15:30:00.000Z",
"referrer": null,
"timezone": "America/New_York",
"cancelled": true,
"confirmed": true,
"checkin_at": null,
"created_at": "2022-01-24T15:05:41.649Z",
"foreign_id": null,
"patient_id": 154,
"start_time": "2022-01-24T15:15:00.000Z",
"updated_at": "2022-03-31T16:13:13.337Z",
"checked_out": false,
"is_guardian": false,
"location_id": 1,
"provider_id": 73,
"unavailable": false,
"cancelled_at": "2022-03-31T16:13:08.226Z",
"confirmed_at": "2022-01-25T10:44:20.074Z",
"operatory_id": 1,
"patient_name": "Ion Croitoru",
"provider_name": "Jonas Salk",
"checked_out_at": null,
"institution_id": 1,
"last_sync_time": null,
"patient_missed": false,
"foreign_id_type": "nex",
"is_past_patient": true,
"timezone_offset": "-05:00",
"end_time_with_tz": "2022-01-24T10:30:00.000-05:00",
"insurance_plan_id": null,
"patient_confirmed": false,
"created_at_with_tz": "2022-01-24T10:05:41.649-05:00",
"created_by_user_id": 154,
"sooner_if_possible": false,
"start_time_with_tz": "2022-01-24T10:15:00.000-05:00",
"appointment_type_id": 0,
"insurance_carrier_id": null,
"patient_confirmed_at": null,
"insurance_choice_type": "myself",
"is_new_clients_patient": false
},
"previous_attributes": { "cancelled": false, "cancelled_at": null }
}
}
form_request_completed
{
"formrequest": {
"id": "XXgvYjHm06j85TAI1i15fU9i3vmKtFyH",
"location_id": 1000,
"appointment_id": 123456
}
}
patient_created
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "Patient",
"event_name": "patient_created",
"event_time": "2022-04-26T09:53:15.171Z",
"data": {
"patients": [
{
"id": 74,
"bio": {},
"npi": null,
"name": "1first 1last",
"email": "1email",
"pcp_id": null,
"inactive": false,
"inst_ids": [],
"prov_ids": [],
"last_name": "1last",
"last_sync": null,
"meta_type": "Patient",
"created_at": "2022-04-20T14:35:23.669Z",
"first_name": "1first",
"foreign_id": "1",
"last_visit": null,
"updated_at": "2022-04-20T14:35:23.669Z",
"doctor_name": "1first 1last",
"middle_name": null,
"profile_url": "https://storage.googleapis.com/nexassets/app/img/icon/avatar.svg",
"display_name": null,
"guarantor_id": null,
"contact_email": null,
"invalid_email": [],
"last_check_in": null,
"last_sync_time": "2022-04-20T14:35:23.669Z",
"foreign_id_type": "msg-eaglesoft-DataSource-2",
"unsubscribe_sms": false,
"unsubscribe_emails": false
}
]
}
}
patient_updated
The previous_attributes field identifies the update that was made.
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "Patient",
"event_name": "patient_updated",
"event_time": "2022-07-04T12:38:33.689Z",
"data": {
"patient": {
"id": 7,
"bio": {
"phone_number": "7244264632",
"date_of_birth": "1979-07-28"
},
"name": "Jonathan Webb",
"email": "[email protected]",
"inactive": false,
"last_name": "Webb",
"created_at": "2022-06-28T08:24:00.253Z",
"first_name": "Jonathan",
"foreign_id": null,
"updated_at": "2022-06-28T08:24:00.522Z",
"middle_name": null,
"guarantor_id": null,
"institution_id": 1,
"last_sync_time": null,
"foreign_id_type": "nex",
"unsubscribe_sms": false
},
"previous_attributes": {
"unsubscribe_sms": true
}
}
}
sync_status_read_change and sync_status_write_change
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "SyncStatus",
"event_name": "sync_status_read_change.green",
"event_time": "2022-03-22T15:06:39.001Z",
"data": {
"syncstatus": {
"emr": {
"id": 50,
"name": "dentrix"
},
"locations": [],
"read_status": "green",
"write_status": "green",
"institution_id": 1,
"read_status_at": "2022-03-22T15:04:18.177Z",
"write_status_at": "2022-03-22T15:04:18.177Z",
"sync_source_name": "MyText",
"sync_source_type": "DataSource"
}
}
}
Example Response
{
"code": false,
"description": [
[
"Description"
]
],
"error": [
[
"Error"
]
],
"data": [
{
"id": 1,
"webhook_endpoint_id": 1,
"institution_id": 1,
"resource_type": "Appointment",
"event": "appointment_insertion",
"active": true,
"created_at": "2020-06-05T20:16:57.007Z",
"updated_at": "2020-06-05T20:16:57.007Z"
}
],
"count": 2
}