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
| Field | Type | Required | Description |
|---|---|---|---|
eventName | string | Yes | Always "OnMedicalReportFinished" |
organizationId | string | Yes | Organization ID |
userId | string | No | User ID |
timestamp | string | Yes | ISO 8601 UTC |
consultationSessionId | string | No | Consultation session ID |
medicalReport | object | Yes | Structured report object (see below) |
medicalReport.fields | array | Yes | Report field entries (see field structure below) |
medicalReport.summary | string | Yes | Free-text report summary |
medicalReport.createdAt | number | Yes | Unix timestamp (ms) of creation |
requestSignature | string | No | HMAC-SHA256 in Base64. Present if the organization has credentials configured. |
medicalReport.fields[] structure
| Field | Type | Description |
|---|---|---|
id | string | Unique field identifier (UUID) |
templateId | string | Template identifier this field belongs to (UUID) |
customName | string | Display name of the field |
customDescription | string | Description of the field |
customValue | string | The generated value/content for this field |
customType | string | Data type of the field (e.g., "string") |
customContext | string | Additional context for the field |
customHistory | array | History of previous values |
customEnumerableOptions | array | Available options for enumerable fields |
enumerableSelectionOption | string | Selection mode for enumerable fields (e.g., "SINGLE") |
order | number | Display order of the field |
createdAt | number | Unix timestamp (ms) of creation |
updatedAt | number | Unix 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