Calibration Functionality

Overview

The Shen.AI SDK introduces a calibration feature to enhance blood pressure measurement accuracy. By integrating user-provided readings from an external blood pressure monitor, the SDK adjusts its measurements for improved precision.

Initialization Modes

The SDK supports three modes, defined by the initializationMode parameter:

1. MEASUREMENT (Standard Mode)

  • Default mode, following the standard measurement process.
  • No calibration data is required or applied.

2. CALIBRATION (Calibration Mode)

  • Activates the calibration workflow, guiding users through:
    • Calibration onboarding instructions.
    • Four manual data entry steps for external blood pressure readings.
    • Three SDK-based measurements, each with a two-minute limit.
  • Calibration results are stored per user (userId). If not provided, results are saved under the default user ID.

3. CALIBRATED_MEASUREMENT (Calibrated Measurement Mode)

  • Uses previously stored calibration data (if available).
  • The SDK:
    • Loads the stored calibration data.
    • Conducts a normal measurement process.
    • Adjusts the results for improved accuracy.
  • If no calibration data is found, the SDK falls back to standard measurement mode.

lib/main.dart
import 'package:shenai_sdk/shenai_sdk.dart';
 
var API_KEY = ""
var USER_ID = ""
 
final settings = InitializationSettings(
    initializationMode: InitializationMode.calibration, 
);
 
final _initResult = await ShenaiSdk.initialize(API_KEY, USER_ID, settings);

To see more about SDK initialization settings, visit the Initialization page.

Usage Instructions

  1. Set initializationMode in the SDK configuration.
  2. Ensure users complete the full calibration process.
  3. Use Calibrated Measurement Mode to apply stored calibration adjustments.

Note: When the Calibration workflow finishes successfully, the SDK sends a userFlowFinished event.

Important Notes

  • User-Specific Calibration: Calibration data is linked to userId. Ensure correct IDs for different users.
  • Time-Limited SDK Measurements: Calibration mode requires SDK measurements to stay within two minutes.
  • Fallback to Standard Mode: If calibration is not performed, the SDK reverts to standard mode without adjustments.

This feature ensures greater accuracy and reliability in blood pressure readings for users who complete the calibration process.

;