Skip to content

Enabled Vital Signs

Enabled Vital Signs is a list of vital signs that are set to be measured in the course of a specific session. The Enabled Vital Signs list is the intersection of all vital signs that are supported according to the following criteria:

  • Device - vital signs that are supported by the current device.
  • Measurement Mode - vital signs that are supported by the current measurement mode (face/finger/polar).
  • License - vital signs that are determined by the current license, as specified in Binah's license agreement.

Receiving Enabled Vital Signs

The application can receive information regarding the enabled vital signs by implementing onEnabledVitalSigns as part of SessionInfoListener:

Swift
func onSessionStateChange(sessionState: SessionState) {
    // Receive session state updates
}

func onWarning(warningData: WarningData) {
    // Receive warnings
}

func onError(errorData: ErrorData) {
    // Receive errors
}

func onLicenseInfo(licenseInfo: LicenseInfo) {
    // Receive license info 
}

func onEnabledVitalSigns(enabledVitalSigns: SessionEnabledVitalSigns) { 
    // Receive the enabled vital signs for the session
}
func onSessionStateChange(sessionState: SessionState) {
    // Receive session state updates
}

func onWarning(warningData: WarningData) {
    // Receive warnings
}

func onError(errorData: ErrorData) {
    // Receive errors
}

func onLicenseInfo(licenseInfo: LicenseInfo) {
    // Receive license info 
}

func onEnabledVitalSigns(enabledVitalSigns: SessionEnabledVitalSigns) { 
    // Receive the enabled vital signs for the session
}
Objective-C
- (void)onSessionStateChangeWithSessionState:(BNHSessionState *)sessionState {
    // Receive session state updates
}

- (void)onWarningWithData:(BNHWarningData *)warningData {
    // Receive warnings
}

- (void)onErrorWithData:(BNHErrorData *)errorData {
    // Receive errors
}

- (void)onLicenseInfoWithInfo:(BNHLicenseInfo *)licenseInfo {
    // Receive license info
}

- (void)onEnabledVitalSignsWithEnabledVitalSigns:(BNHEnabledVitalSigns *)enabledVitalSigns {
    // Receive the enabled vital signs for the session
}
- (void)onSessionStateChangeWithSessionState:(BNHSessionState *)sessionState {
    // Receive session state updates
}

- (void)onWarningWithData:(BNHWarningData *)warningData {
    // Receive warnings
}

- (void)onErrorWithData:(BNHErrorData *)errorData {
    // Receive errors
}

- (void)onLicenseInfoWithInfo:(BNHLicenseInfo *)licenseInfo {
    // Receive license info
}

- (void)onEnabledVitalSignsWithEnabledVitalSigns:(BNHEnabledVitalSigns *)enabledVitalSigns {
    // Receive the enabled vital signs for the session
}

Checking if a Vital Sign is Enabled

The following code can be used to determine the supported vital signs:

Swift
func onEnabledVitalSigns(enabledVitalSigns: SessionEnabledVitalSigns) {
    DispatchQueue.main.async {
        // Checking if pulse rate is enabled
        print("Is pulse rate enabled: \(enabledVitalSigns.isEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the specific device:
        print("Is pulse rate device enabled: \(enabledVitalSigns.isDeviceEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the measurement mode:
        print("Is pulse rate mode enabled: \(enabledVitalSigns.isMeasurementModeEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the license:
        print("Is pulse rate license enabled: \(enabledVitalSigns.isLicenseEnabled(VitalSignTypes.pulseRate))")
    }
}
func onEnabledVitalSigns(enabledVitalSigns: SessionEnabledVitalSigns) {
    DispatchQueue.main.async {
        // Checking if pulse rate is enabled
        print("Is pulse rate enabled: \(enabledVitalSigns.isEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the specific device:
        print("Is pulse rate device enabled: \(enabledVitalSigns.isDeviceEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the measurement mode:
        print("Is pulse rate mode enabled: \(enabledVitalSigns.isMeasurementModeEnabled(VitalSignTypes.pulseRate))")

        // Checking if pulse rate is enabled for the license:
        print("Is pulse rate license enabled: \(enabledVitalSigns.isLicenseEnabled(VitalSignTypes.pulseRate))")
    }
}
Objective-c
- (void)onEnabledVitalSigns:(BNHSessionEnabledVitalSigns *)enabledVitalSigns {
    dispatch_async(dispatch_get_main_queue(), ^{
        // Checking if pulse rate is enabled
        NSLog(@"Is pulse rate enabled: %d", [enabledVitalSigns isEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the specific device:
        NSLog(@"Is pulse rate device enabled: %d", [enabledVitalSigns isDeviceEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the measurement mode:
        NSLog(@"Is pulse rate mode enabled: %d", [enabledVitalSigns isMeasurementModeEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the license:
        NSLog(@"Is pulse rate license enabled: %d", [enabledVitalSigns isLicenseEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);
    });
}
- (void)onEnabledVitalSigns:(BNHSessionEnabledVitalSigns *)enabledVitalSigns {
    dispatch_async(dispatch_get_main_queue(), ^{
        // Checking if pulse rate is enabled
        NSLog(@"Is pulse rate enabled: %d", [enabledVitalSigns isEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the specific device:
        NSLog(@"Is pulse rate device enabled: %d", [enabledVitalSigns isDeviceEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the measurement mode:
        NSLog(@"Is pulse rate mode enabled: %d", [enabledVitalSigns isMeasurementModeEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);

        // Checking if pulse rate is enabled for the license:
        NSLog(@"Is pulse rate license enabled: %d", [enabledVitalSigns isLicenseEnabledWithVitalSignType:BNHVitalSignTypes.pulseRate]);
    });
}