OnMedicalReportFinished


Triggered when a structured medical report finishes processing.

Payload

{
  "eventName": "OnMedicalReportFinished",
  "organizationId": "1111111",
  "userId": "1111111",
  "timestamp": "2026-03-31T19:06:58.667Z",
  "consultationSessionId": "medical-consultation-u1234-1234567890-abc123",
  "medicalReport": {
    "fields": [
      {
        "id": "3ef6969c-c62d-43fb-9cf6-7d270f1cd4a1",
        "customHistory": [],
        "customContext": "",
        "templateId": "285b5a84-9a1e-4b3c-9a3f-0711ba7bc4a7",
        "createdAt": 1776123550031,
        "customType": "string",
        "order": 1,
        "enumerableSelectionOption": "SINGLE",
        "customEnumerableOptions": [],
        "customValue": "mock value.",
        "customName": "mock value",
        "customDescription": "mock value",
        "updatedAt": 1776123550031
      },
      {
        "customHistory": [],
        "customContext": "",
        "templateId": "285b5a84-9a1e-4b3c-9a3f-0711ba7bc4a7",
        "customType": "string",
        "id": "5c14f3f4-8d43-4307-b7ca-f1802ffe4363",
        "enumerableSelectionOption": "SINGLE",
        "customEnumerableOptions": [],
        "createdAt": 1776123559943,
        "customValue": "mock value.",
        "customName": "mock value",
        "updatedAt": 1776123559943,
        "customDescription": "mock value",
        "order": 2
      }
    ],
    "summary": "Consultation summary...",
    "createdAt": 1711900000000
  },
  "requestSignature": "abcdef1234567890"
}

Field description

FieldTypeRequiredDescription
eventNamestringYesAlways "OnMedicalReportFinished"
organizationIdstringYesOrganization ID
userIdstringNoUser ID
timestampstringYesISO 8601 UTC
consultationSessionIdstringNoConsultation session ID
medicalReportobjectYesStructured report object (see below)
medicalReport.fieldsarrayYesReport field entries (see field structure below)
medicalReport.summarystringYesFree-text report summary
medicalReport.createdAtnumberYesUnix timestamp (ms) of creation
requestSignaturestringNoHMAC-SHA256 in Base64. Present if the organization has credentials configured.

medicalReport.fields[] structure

FieldTypeDescription
idstringUnique field identifier (UUID)
templateIdstringTemplate identifier this field belongs to (UUID)
customNamestringDisplay name of the field
customDescriptionstringDescription of the field
customValuestringThe generated value/content for this field
customTypestringData type of the field (e.g., "string")
customContextstringAdditional context for the field
customHistoryarrayHistory of previous values
customEnumerableOptionsarrayAvailable options for enumerable fields
enumerableSelectionOptionstringSelection mode for enumerable fields (e.g., "SINGLE")
ordernumberDisplay order of the field
createdAtnumberUnix timestamp (ms) of creation
updatedAtnumberUnix timestamp (ms) of last update

Signature string

The medicalReport object is serialized as JSON. The fields are signed in the following order:

organizationId|userId|timestamp|consultationSessionId|{"fields":[...],"summary":"...","createdAt":...}|API_KEY