Start Analytics DB Initialization

Start Analytics DB Initialization

The following API starts the process of creating analytics DB. After the process is finished the analytics DB will be available for queries.

This API can be called when analytics DB deployment state is: [DEPLOYED] and activation state is: [INACTIVE, ACTIVE_AND_SYNC_OFF].

After this API is called the activation state will be changed to: [INITIALIZING] and when the analytics DB initialization process is finished the state will be: [ACTIVE_AND_SYNC_ON]

The database structure will be as follow:

The table name will be as follows:

For each template, a table will be created and its name will be taken from the template.analyticsDbConfiguration.name field

Observations: for each patient template, an observation table will be created and its name will be Observations_{patientTemplate.analyticsDbConfiguration.name}

Example:
If the patientTemplate.analyticsDbConfiguration.name field is "Patient" then the observation table name will be "Observations_Patient"

Basically each attribute will have a column or multiple columns (depends on the attribute type)

Examples:

Regular attribute - the column name will be taken from the attribute.analyticsDbConfiguration.name field

Object attribute - each field of the object will have a column and the name is the analyticsDbConfiguration.name of the attribute + field:

 Assuming the analyticsDbConfiguration.name of the attribute is "_address" then the column names will be _address.city, _address.state, etc.

File and Image attribute - will have 4 columns: 

 file1.id, file1.size, file1.name, file1.mimeType

Name attribute - will have 2 columns:

 _name.firstName, _name.lastName

Reference attribute - will have 2 columns:
 _patient.id, _patient.templateName

Each entity table will have additional columns except for the attribute columns:
_id, _templateName, __validTo

For observations tables, each table will consist of all observation attributes as well as the following columns: [timestamp, patientId, sessionId, sourceEntityId]
Waveform attributes are represented as integer/decimal columns with explicit value at each interval

All current tables are dropped before starting the init process.

This API requires DMS_START_ANALYTICS_DB_INITIALIZATION permission(s).

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!