Analytics DB Structure
Once the Analytics DB is active, it will include tables for all of your available templates. This encompasses templates for usage sessions and commands. The default tables created are as follows:
Template Name | Entity Type | Analytics DB Table Name | Can be deleted |
---|---|---|---|
Clinician | Caregiver | Clinician_caregiver | Yes |
DeviceType1 | Device | DeviceType1_device | Yes |
Device Log File | Generic Entity | deviceLogFile_generic-entity | Yes |
Patient | Patient | Patient_patient | No |
BioT Support | Organization User | BioTSupport_organization-user | No |
Organization Operator | Organization User | OrganizationOperator_organization-user | Yes |
Organization Admin | Organization User | OrganizationAdmin_organization-user | No |
Manufacturer Operator | Organization User | ManufacturerOperator_organization-user | Yes |
Manufacturer Admin | Organization User | ManufacturerAdmin_organization-user | No |
Organization | Organization | Organization_organization | No |
Registration Code | Registration Code | RegistrationCode_registration-code | No |
Monitoring | Usage Session | Monitoring_usage-session_DeviceType1_device | Yes |
Reboot | Command | Reboot_command_DeviceType1_device | Yes |
Observations | N/A | Observations_Patient_patient | Yes |
Observations Table
When you add any observation field to the “Patient” template, the corresponding observations table will be created.
The table Observations_Patient_patient is created only once; there are no multiple observations tables.
Tables Naming Convention
For a parent template, the table name structure will be {templateName}_{entityTypeName}_{parentTemplateName}_{parentEntityType}, for example: Monitoring_usage-session_DeviceType1_device.
For each new template, a new table will be created in the Analytics DB. Additionally, modifying templates may create child templates, which will result in the creation of additional tables, such as:
Action | Template name | Analytics DB Table Name |
---|---|---|
New device command - "command1" for "DeviceType1" | DeviceType1 | command1_command_DeviceType1_device |
New device alert - "alert1" for "DeviceType1" | DeviceType1 | alert1_device-alert_DeviceType1_device |
New patient alert - "alert2" for Patient | Patient | alert2_patient-alert_Patient_patient |
The attributes in each template will be converted into columns as follows:
Attribute type | Attribute name in template | Attribute name in Analytics DB Table | Number of columns created |
---|---|---|---|
Regular | _email | _email | 1 |
Object | _address | _address.address1,_address.address2,_address.city, _address.countryCode, _address.state, _address.zipCode | 6 |
Object | file | file.id, file.size, file.name, file.mimeType | 4 |
Object | image1 | image.id, image.size, image1.name, image1.mimeType | 4 |
Reference | _patient | _patient.id, _patient.templateName | 2 |
Each table will have the additional columns of "_id" and "_templateName" except for the Observations_Patient_patient table.
Tables Structure
There are 12 different types of tables created in the Analytics DB.
Below is a list of all columns and their data types for each table:
Organization User
Column Name | Data Type |
---|---|
_id | text |
_address.address1 | text |
_address.address2 | text |
_address.city | text |
_address.countryCode | text |
_address.state | text |
_address.zipCode | text |
_creationTime | timestamp |
_dateOfBirth | date |
_description | text |
_email | text |
_employeeId | text |
_enabled | text |
_gender | text |
_lastModifiedTime | timestamp |
_locale | text |
_mfa.enabled | bool |
_mfa.expirationInMinutes | numeric |
_name.firstName | text |
_name.lastName | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_phone | text |
_templateName | text |
Caregiver
The Caregiver table is identical to the Organization User table, with the addition of a "_degree" column, which has a text data type.
Device
Column Name | Data Type |
---|---|
_id | text |
_creationTime | timestamp |
_description | text |
_lastModifiedTime | timestamp |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_patient.id | text |
_patient.templateName | text |
_registrationCode.id | text |
_registrationCode.templateName | text |
_status._bootTime | timestamp |
_status._certificateStatus | text |
_status._connection._connected | bool |
_status._connection._ipAddress | text |
_status._connection._lastConnectedTime | timestamp |
_status._fwVersion | text |
_status._hwVersion | text |
_status._operational._message | text |
_status._operational._status | text |
_templateName | text |
Generic Entity
Column Name | Data Type |
---|---|
_id | text |
_creationTime | timestamp |
_lastModifiedTime | timestamp |
_name | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_templateName | text |
The default columns for generic entities are listed above. However, when using a generic entity, you should always modify and add more fields. For example, the default deviceLogFile_generic_entity table includes the following additional columns:
Column Name | Data Type |
---|---|
device.id | text |
device.templateName | text |
endTime | timestamp |
file.id | UUID |
file.mimeType | text |
file.name | text |
file.size | numeric |
startTime | timestamp |
Organization
Column Name | Data Type |
---|---|
_id | text |
_creationTime | timestamp |
_description | text |
_headquarters.address1 | text |
_headquarters.address2 | text |
_headquarters.city | text |
_headquarters.countryCode | text |
_headquarters.state | text |
_headquarters.zipCode | text |
_lastModifiedTime | timestamp |
_locale | text |
_name | text |
_phone | text |
_primaryAdministrator.id | text |
_primaryAdministrator.templateName | text |
_templateName | text |
_timezone | text |
Patient
Column Name | Data Type |
---|---|
_id | text |
_additionalPhone | text |
_address.address1 | text |
_address.address2 | text |
_address.city | text |
_address.countryCode | text |
_address.state | text |
_address.zipCode | text |
_canLogin | bool |
_caregiver.id | text |
_caregiver.templateName | text |
_creationTime | timestamp |
_dateOfBirth | date |
_description | text |
_email | text |
_enabled | text |
_gender | text |
_lastModifiedTime | timestamp |
_locale | text |
_mfa.enabled | bool |
_mfa.expirationInMinutes | numeric |
_name.firstName | text |
_name.lastName | text |
_nationalId | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_phone | text |
_registrationSource | text |
_templateName | text |
_username | text |
Registration Code
Column Name | Data Type |
---|---|
_id | text |
_code | text |
_creationTime | timestamp |
_lastModifiedTime | timestamp |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_templateName | text |
Usage Session
Column Name | Data Type |
---|---|
_id | text |
_creationTime | timestamp |
_device.id | text |
_device.templateName | text |
_endTime | timestamp |
_initiator | text |
_lastModifiedTime | timestamp |
_name | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_patient.id | text |
_patient.templateName | text |
_startTime | timestamp |
_state | text |
_summary._stopReason | text |
_summary._stopReasonCode | text |
_templateName | text |
Command
Column Name | Data Type |
---|---|
_id | text |
_creationTime | timestamp |
_device.id | text |
_device.templateName | text |
_endTime | timestamp |
_errorMessage | text |
_lastModifiedTime | timestamp |
_name | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_startTime | timestamp |
_state | text |
_templateName | text |
Patient Alert
Column Name | Data Type |
---|---|
_id | text |
_clearDateTime | timestamp |
_clearNotes | text |
_clearTrigger | text |
_clearedBy.id | text |
_clearedBy.templateName | text |
_creationTime | timestamp |
_lastModifiedTime | timestamp |
_name | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_patient.id | text |
_patient.templateName | text |
_setDateTime | timestamp |
_severity | text |
_state | text |
_templateName | text |
Device Alert
Column Name | Data Type |
---|---|
_id | text |
_clearDateTime | timestamp |
_clearNotes | text |
_clearTrigger | text |
_clearedBy.id | text |
_clearedBy.templateName | text |
_creationTime | timestamp |
_device.id | text |
_device.templateName | text |
_lastModifiedTime | timestamp |
_name | text |
_ownerOrganization.id | text |
_ownerOrganization.templateName | text |
_setDateTime | timestamp |
_severity | text |
_state | text |
_templateName | text |
Observations
The observations table will be created only after you have added any observations to the “Patient” template.
The JSON name for an observation field will correspond to the column name representing its data in the table.
These fields can have data types of text, numeric, or bool. The default columns, besides these, are:
Column Name | Data Type |
---|---|
patientId | text |
sessionId | text |
sourceEntityId | text |
timestamp | timestamp |
patientTemplateName | text |
_ownerOrganization.id | text |
sessionTemplateName | text |
sourceEntityTemplateName | text |
- A new column will be created for each observation defined under the patient.
- int, double, and waveform (all types) observations are saved as numeric.
- Waveform measurements are decoded, and each value is saved in a separate row.
- The timestamp is adjusted based on the frequency and size of the waveform.
- Boolean observations are saved as boolean.
Updated about 2 months ago