To receive a webhook at the end of the digitization process, you need to contact the representatives of Ornament to set up the integration on our side.
You will need to provide the endpoint to which the webhook will be sent, and (optionally) an authorization header that should be passed in the requests.
After setting up the integration, the following events will be sent to the specified endpoint:
Event | Description |
---|---|
NEW_SUBMISSION | The Imageset was successfully processed, and a Submission was created. |
REJECT_IMAGESET | The Imageset was rejected. |
SPLIT_IMAGESET | As a result of processing, additional Imagesets were generated. This can happen if one Imageset contains lab results for different dates. |
The data sent in the body of the webhook contains the following fields:
Field | Description |
---|---|
id | Unique identifier in UUID format |
transactionId | Transaction identifier |
eventTypeTitle | Name of the event type (see table above) |
version | Data model version. The current version is 1.0 |
payload | JSON object with data (description of the JSON fields below) |
createdAt | Event creation date |
deliveredAt | Date the event was received by the recipient |
The payload field contains the following fields:
Field | Description |
---|---|
iid | Unique UUID of the imageset, which matches the value of the imagesetIid field from the response to the request for sending the file set for digitization |
sid | Unique UUID of the submission generated as a result of digitization (only for NEW_SUBMISSION events) |
rejectionReasonId | ID of the rejection reason (only for REJECT_IMAGESET events): see the reference |
comment | Additional text comment (only for REJECT_IMAGESET events) |
You can use these events to initiate the retrieval of digitization or interpretation results.
Sample Webhooks Payload by Event Type
NEW_SUBMISSION
{
"id": "f65b3086-9243-4376-a24e-2d5b998af2c3",
"transactionId": 1,
"eventTypeTitle": "NEW_SUBMISSION",
"version": "1.0",
"payload": {
"iid": "21bd0ade-8af4-4e3b-b7e1-c0ee9e109576",
"sid": "3bbc593c-87de-46d9-af07-ef5bff8f13f4"
},
"createdAt": 1622822216
}
REJECT_IMAGESET
{
"id": "c72f88a7-f24e-4388-82bd-68e60a064f4c",
"transactionId": 4,
"eventTypeTitle": "REJECT_IMAGESET",
"version": "1.0",
"payload": {
"iid": "10b3a54b-48cf-66c8-98aa-5747e7c17309",
"comment": null,
"rejectionReasonId": 34
},
"createdAt": 1623154137
}
⚠️ Note:
If a file is uploaded again (duplicate), you will receive a REJECT webhook that contains the iid
from the original file and rejectionReasonId = 41
.
Nevertheless, biomarkers from duplicated files will still be digitized and added to the user profile.
SPLIT_IMAGESET
{
"iids": [
"d2399510-a630-4d77-a2c7-7aa6f900a4b6",
"96e22592-566c-4067-bd64-25b0328080cb"
],
"event": "new_sorted_imagesets",
"origin_imageset_iid": "6760bc6e-1420-4cd3-9a25-858668c68596"
}
Rejection Reasons
rejectionReasonId | Title |
---|---|
1 | Unsupported language |
2 | Not a lab report |
3 | Low image quality |
5 | No tests recognized |
6 | Tests written by hand |
7 | Unsupported structure |
8 | Unsupported type of analysis |
23 | Other unsupported tests or tests where no biomarkers were recognized |
24 | Unsupported biomaterial |
29 | Other |
30 | Insufficient information |
31 | Biomarker names, values, or units not specified |
32 | Biomaterial not specified |
33 | Sampling location not specified |
34 | Not a laboratory or instrumental test |
35 | Multiple people, dates, or studies on one sheet |
36 | Low image quality |
38 | Error during document upload |
40 | Multiple values of the same biomarker on the sheet |
41 | Uploaded file was uploaded before |