Appearance
User Information
For the calculation of the ASCVD Risk and Heart Age indicators, the SDK requires receiving the user information with the details of the user taking the measurement. If this information is not provided to the SDK, these indicators will not be calculated.
The user information consists of these fields:
- Sex (as classified at birth) [UNSPECIFIED / MALE / FEMALE]
- Age [years]
- Weight [Kilograms]
- Height [Centimeters]
- Smoking Status [UNSPECIFIED / SMOKER / NON_SMOKER]
The application can provide the user information as part of the session initialization.
In the following example, the sex is female, the age is 35 years, the weight is 65 kilograms, the height is 165 centimeters and the smoking status is smoker. In the example the measurement session is a face session, but it can be used in a PPG Device session as well.
TypeScript
import healthMonitorManager, {
FaceSessionOptions,
Sex,
SmokingStatus,
} from '@biosensesignal/web-sdk';
await healthMonitorManager.initialize({
licenseKey,
});
const options: FaceSessionOptions = {
input: video.current,
cameraDeviceId: cameraId,
processingTime,
onVitalSign,
onFinalResults,
onError,
onWarning,
onStateChange,
onImageData,
userInformation: {sex: Sex.MALE, age: 35, weight: 75, height: 165, smokingStatus: SmokingStatus.NON_SMOKER},
};
const faceSession = await healthMonitorManager.createFaceSession(options); If any of the user information parameters is unknown, it is recommended to provide the known parameters and to leave the others 'null'/'UNSPECIFIED'.
Important
When a session is created with user information, all measurements performed during that session use the same user information. Therefore, a new session must be created in order to update the user information.