Subscribe to the Digitization Completion Event

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:

EventDescription
NEW_SUBMISSIONThe Imageset was successfully processed, and a Submission was created.
REJECT_IMAGESETThe Imageset was rejected.
SPLIT_IMAGESETAs 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:

FieldDescription
idUnique identifier in UUID format
transactionIdTransaction identifier
eventTypeTitleName of the event type (see table above)
versionData model version. The current version is 1.0
payloadJSON object with data (description of the JSON fields below)
createdAtEvent creation date
deliveredAtDate the event was received by the recipient

The payload field contains the following fields:

FieldDescription
iidUnique 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
sidUnique UUID of the submission generated as a result of digitization (only for NEW_SUBMISSION events)
rejectionReasonIdID of the rejection reason (only for REJECT_IMAGESET events): see the reference
commentAdditional 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

rejectionReasonIdTitle
1Unsupported language
2Not a lab report
3Low image quality
5No tests recognized
6Tests written by hand
7Unsupported structure
8Unsupported type of analysis
23Other unsupported tests or tests where no biomarkers were recognized
24Unsupported biomaterial
29Other
30Insufficient information
31Biomarker names, values, or units not specified
32Biomaterial not specified
33Sampling location not specified
34Not a laboratory or instrumental test
35Multiple people, dates, or studies on one sheet
36Low image quality
38Error during document upload
40Multiple values of the same biomarker on the sheet
41Uploaded file was uploaded before