Event Properties
| Field | Value |
|---|---|
event | "document.synced" |
confidential | boolean |
payload | object |
- Public Payload
- Confidential Payload
| Field | Type | Description |
|---|---|---|
documentId | string | Unique document identifier |
documentType | "legacy" | "guided" | Document generation type |
documentName | string | Document name or title |
outputLanguage | string | Output language code (e.g., “en”, “de”) |
templateType | "built-in" | "custom" | "schema-driven" | Type of template used: built-in, custom, or schema-driven |
templateId | string | Template identifier (either ref for built-in or customTemplateId for custom) |
documentLabels | Record<string, string> | Key/value labels attached to the document |
interactionId | string | Unique interaction identifier |
interactionState | InteractionState | Current state of the interaction |
Example
{
"event": "document.synced",
"confidential": false,
"payload": {
"documentId": "doc_123",
"documentType": "legacy",
"documentName": "SOAP note",
"outputLanguage": "en",
"templateType": "built-in",
"templateId": "soap",
"documentLabels": {},
"interactionId": "int_123",
"interactionState": "ongoing"
}
}
| Field | Type | Description |
|---|---|---|
document | ExternalPatientDocument | Complete document object with all sections and metadata |
interaction | ExternalInteraction | Interaction context including transcripts, documents, and facts |
document object properties
document object properties
| Field | Type | Description |
|---|---|---|
id | string | Unique document identifier |
documentType | "legacy" | "guided" | Document generation type |
name | string | Document name or title |
outputLanguage | string | Output language code (e.g., “en”, “de”) |
sections | Section[] | Document sections containing the generated content |
templateType | "built-in" | "custom" | "schema-driven" | Type of template used: built-in, custom, or schema-driven |
templateId | string | Template identifier (either ref for built-in or customTemplateId for custom) |
labels | Record<string, string> | Key/value labels attached to the document |
| Field | Type | Description |
|---|---|---|
key | string | Unique key identifying the section type |
name | string | Display name of the section |
text | string | Section content in markdown or plain text |
structuredOutput | unknown | Structured output for guided documents, null for legacy documents |
labels | Record<string, string> | Key/value labels attached to the section |
interaction object properties
interaction object properties
| Field | Type | Description |
|---|---|---|
id | string | Unique interaction identifier |
title | string | null | Interaction title |
state | InteractionState | Current state of the interaction |
startedAt | string (ISO 8601 date) | When the interaction started (ISO 8601 date string) |
transcriptCount | number | Number of transcripts in the interaction |
documentCount | number | Number of documents in the interaction |
facts | Fact[] | Facts extracted during the interaction |
| Field | Type | Description |
|---|---|---|
id | string | Unique fact identifier |
text | string | Fact text content |
group | string | Fact group/category name |
source | "core" | "system" | "user" | Source of the fact: core (AI extracted), system, or user |
isDiscarded | boolean | Whether the fact has been discarded |
Example
{
"event": "document.synced",
"confidential": true,
"payload": {
"document": {
"id": "doc_123",
"documentType": "legacy",
"name": "SOAP note",
"outputLanguage": "en",
"sections": [
{
"key": "hpi",
"name": "HPI",
"text": "...",
"structuredOutput": null,
"labels": {}
}
],
"templateType": "built-in",
"templateId": "soap",
"labels": {}
},
"interaction": {
"id": "int_123",
"title": "Visit",
"state": "ongoing",
"startedAt": "2024-01-01T00:00:00.000+00:00",
"transcriptCount": 0,
"documentCount": 0,
"facts": []
}
}
}