Skip to main content

General Concepts

This section gives an overview of the general concept and object used in creating the Empego's event framework.

Wrapper​

Event schema​

{
"id": "UUID",
"createdAt": "UTC_TIMESTAMP",
"eventType": "STRING",
"operation": "STRING",
"tenantKey": "UUID",
"data": {}
}

Description​

FieldTypeDescription
idUUIDThis is the event identifier. Should be used for idempotency.
createdAtUTC TimestampTimestamp of when the event was created. The format of the timestamp is yyyy-MM-dd HH:mm:ss.SSS and is always in UTC.
eventTypeStringThe event type that is sent. This can be, as an example, consultation, follow-up, patient, etc. The event types are described below.
operationStringType of operation that triggered the event.
tenantKeyUUIDThe Empego tenant identifier.
dataJSON ObjectJSON Object representing the resource that the event was created for. See event types below.

Event types​

Example​

{
"id": "3f0af711-c5e6-488a-a4bc-91f6e5009d79",
"createdAt": "2024-03-22 20:41:57.750",
"eventType": "followup",
"operation": "update",
"tenantKey": "11f81012-9519-11ee-XXXX-0244cd4cfa84",
"data": {}
}

External Patient Key​

Patients can have multiple external keys depending on the subsystem. Empego supports this in the event by providing a list of the sub-system and the keys. This external key is not something that Empego manages, it stores it in the way that is provided to us by the sub-system.

[
{
"subSystem": "STRING",
"key": "STRING"
}
]
FieldTypeDescription
subSystemStringThe subsystem where the patient key comes from.
keyStringThe key from the subsystem that is associated with Empego's patient

Example:​

[
{
"subSystem": "Drugstore Inc.",
"key": "ae0461f6-e2ab-XXXX-96915f8df40d"
}
]

Identifiable Localized Object​

An object that is used when we have an internal enum for state generation. Empego will provide the localized values used throughout the Empego frontend services.

{
"id": "STRING",
"en": "ENGLISH_STRING",
"fr": "FRENCH_STRING"
}
FieldTypeDescription
idStringEmpego's internal state
enStringEnglish localized string
frStringFrench localized string

Example​

{
"id": "ASSISTED",
"en": "Patient was assisted",
"fr": "Suivi assisté avec un employé"
}

Localized Object​

An object for localized information.

{
"en": "ENGLISH_STRING",
"fr": "FRENCH_STRING"
}
FieldTypeDescription
enStringEnglish localized string
frStringFrench localized string

Example​

{
"en": "Hypertension (HTN)",
"fr": "Hypertension artérielle (HTA)"
}

Follow-up reminder data​

An object that shows on which date the follow-up reminder is sent

{
"followUpReminderSentAt": "YYYY-MM-DD HH:MM:SS.mmm"
}
FieldTypeDescription
followUpReminderSentAtUTC TimestampDate at which the follow-up reminder wassent