User GuideAPI Reference
ProductUse CasesResource CenterFAQAbout UsBook a DemoSign Up - It's Free
User Guide

Session Summary

A session summary is a set of predefined session attributes that the device can update during or after a session has finished.
For example, if your device measures a patient's heart rate for 1 minute, you might want to report the average heart rate or if there were any irregular heart rate values, at the end of the session.
This will allow the caregiver to get all the important data from the session without the need to open the session and review all of it.

Defining a Session Summary

The session summary is part of the device usage and is defined through the BioT console.
To learn how to define summary fields, see Adding a Device Template for more details.

Updating Summary Fields

Summary fields can be updated in 2 ways, depending on the way the session was created:

  • HTTPS API
  • MQTT

Updating via HTTPS API

Creating a session can be done using the usage session API:
Create a new Usage Session by usage type
Or by the remote session API:
Create and start a Usage Session

In both cases, the ID of the newly created session will be returned as part of the API response.

Use the following API to update the session summary attributes:
Update Usage Session

In the API call, body pass the summary attributes as part of the _summary JSON object:

{
  "_summary": {
    "summarylProp1": "some value",
    "summarylProp2": "some value"
  }
}

📘

Note

Session summary can be updated during any stage of the session: creation, running, completion.
Use the PATCH API to update a session summary and other session attributes, such as, session progress state, completion message, start and end timestamps.

Updating via MQTT

A device that communicates with BioT purely in MQTT can also update the session summary by updating the usage shadow file with the summary attributes.

When a new session is remotely created, the usage session shadow is updated with a SESSION_ACTIVE status.

From this stage, until the session is closed (inclusive), the device can add summary attributes to the data section.

To do that, send an MQTT message to:
$aws/things/<clientId>/shadow/name/<usageName>/update

For Example:

{
  "state": {
    "reported": {
      "metadata": {
        "context": "VVVJRHMgb2YgcGFpZW5kSWQgYW5kIHNlc3Npb25JZA==",
        "state": "ACTIVE"
      },
      "data": {
        "_requiredMeasurementIntervalMilliseconds": 1000,
        "summary_attribute1": "summary_attribute1_value",
        "summary_attribute2": "summary_attribute2_value"
      }
    }
  }
}

BioT will update the usage session's summary attributes with the values as updated by the device.

This action can also be done during session close:

For Example:

{
  "state": {
    "reported": {
      "metadata": {
        "context": "VVVJRHMgb2YgcGFpZW5kSWQgYW5kIHNlc3Npb25JZA==",
        "state": "IDLE"
      },
      "data": {
        "_requiredMeasurementIntervalMilliseconds": 1000,
        "summary_attribute1": "summary_attribute1_value",
        "summary_attribute2": "summary_attribute2_value"
      }
    }
  }
}