Skip to main content
Version: 13.x (Current)

Configuration

The Device Manager needs some configuration in order to be used effectively.

CRUD collections

To use the Device Manager you need to create the following CRUD collections:

  • devices: a CRUD collection containing all past and present enrolled devices;
  • health data type: a CRUD containing the health data type and their schema;
  • health data: a CRUD containing the health records;

Devices

This CRUD collection stores all the past and currently enrolled devices, including basic product details, and tracks the patient assigned to each device.

tip

You can create the CRUD by importing this JSON schema. Remember to set the CRUD_DEVICES_ENDPOINT environment variable with the CRUD internal endpoint.

NameTypeRequiredEncryptionDescription
deviceIdstringtruefalseUnique device identifier
deviceProviderstringtruefalseDevice prodiver (e.g. Medisanté)
deviceTypestringtruefalseDevice type (medical, wearable, etc.)
featuresArray of stringsfalsefalseFeatures supported by the device
statusstringfalsefalseDevice status (accepted values: Active, Not Active)
namestringfalsefalseHuman-friendly device name
assignedPatientIdstringfalsefalseID of the patient the device is assigned to. If the field is missing, the device can be assigned to a patient.
serialNumberstringfalsefalseDevice serial number assigned by the manufacturer

Health Data

This CRUD collection, for each health data received from a device, the raw content and metadata (type, format, etc.) and the normalized version.

tip

You can create the CRUD by importing this JSON schema. Remember to set the CRUD_HEALTH_DATA_ENDPOINT environment variable with the CRUD internal endpoint.

NameTypeRequiredEncryptionDescription
deviceIdstringtruefalseThe ID of the device being the source of the health data
patientIdstringfalsefalseThe ID of the patient the health data refers to
providerIdstringtruefalseThe ID of the provider of the device (e.g. Medisanté)
rawDataObjecttruetrueThe original data received from the device in JSON format
rawDataTypestringfalsefalseThe type of the health data received from the device (e.g. blood pressure)
rawDataFormatstringfalsefalseThe format of the health data received from the device (e.g. Medisanté JSON or FHIR)
normalizedDataObjectfalsetrueNormalized health data
normalizedDataTypestringfalsefalseThe type of the health data after normalization (e.g. systolic blood pressure)
receivedAtDatetruefalseWhen the health data was received by the provider or, if not specified, by the DM itself
recordedAtDatefalsefalseWhen the health data was recorded by the device

Health Data Types

This CRUD collection contains all the health data type specifications, including the supported data types (both raw and normalized) and normalization rules (for raw only).

tip

You can create the CRUD by importing this JSON schema. Remember to set the CRUD_HEALTH_DATA_TYPE_ENDPOINT environment variable with the CRUD internal endpoint.

NameTypeRequiredEncryptionDescription
identifierstringtruefalseUnique identifier of the data type
namestringfalsefalseHuman-friendly name of the data type
versionstringfalsefalseData type version
providerIdstringfalsefalseID of the device provider
dataTypestringfalsefalseThe type of the health data (e.g. blood pressure)
formatstringfalsefalseThe format of the health data (e.g. Medisanté JSON or FHIR)
schemaObjectfalsefalseThe JSON schema of the health data
metricsArray of stringsfalsefalseList of metrics collected included in a sample of the health data
normalizedDataTypestringfalsefalseID of the normalized data type
normalizedDataSchemaObjectfalsefalseThe JSON schema of the normalized data
normalizationRulesObjectfalsefalseNormalization rules
danger

The service currently expects the normalizedDataSchema to be as follows, otherwise some features like chart visualization may not work as expected:

{
"type": "object",
"properties": {
"period": {
"type": "object"
},
"observations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "number"
}
}
}
}
},
"required": [
"observations",
"period"
]
}

If you use a different schema the following endpoints may not work as intended:

Environment variables

NameRequiredDefaultDescription
LOG_LEVELNoinfo
CRUD_SERVICE_URLYeshttp://crud-serviceThe HTTP(S) URL of the CRUD service
CRUD_DEVICES_ENDPOINTYes/tdm-dm-devicesInternal endpoint of the devices CRUD
CRUD_HEALTH_DATA_ENDPOINTYes/tdm-dm-health-dataInternal endpoint of the health data CRUD
CRUD_HEALTH_DATA_TYPE_ENDPOINTNo/tdm-dm-health-data-typeInternal endpoint of the health data types CRUD
MONGODB_URLYes-The string to connect to MongoDB database storing information about data acquisition jobs.
DATA_ACQUISITION_JOB_COLLECTIONYesdataAcquisitionJobsThe name of the MongoDB collection for data acquisition jobs.
TMM_SERVICE_URLYeshttp://therapy-monitoring-managerThe HTTP(S) URL of the Therapy and Monitoring Manager (TMM) service.