Provide UserInfo
to SDK
In the previous guide, we have discussed what user information is required for different vital signs to be returned from the Vitals™ Cloud Service. In this guide, you will learn how to provide the collected user data to the Vitals™ SDK using the UserInfo
structure.
IMPORTANT
The UserInfo
is provided to the Vitals™ SDK during the camera creation process. For better understanding, you could refer to the Create Vital Sign Camera guide for how to create the camera first before proceeding.
Target SDK
TIP
You can refer to the sample code and the API Reference for more details. Most related API(s) include: VitalSignCameraCreationProps
and UserInfo
.
You can provide the user information gathered by supplying them to the userInfo
property in the createVitalSignCamera
function. For example:
/* User Information */
const userInfo : UserInfo = {
age: 30,
gender: Gender.Male,
weight: 60.1, // optional
height: 185.9, // optional
waistCircumference: 70.1, // optional
hdl: 40.2, // optional
totalCholesterol: 180.3, // optional
alcoholic: false, // optional
antiHypertensive: false, // optional
diabetic: Diabetic.No, // optional
healthyDiet: true, // optional
historyBloodGlucose: false, // optional
historyFamilyDiabetes: HistoryFamilyDiabetes.No, // optional
parentalHypertension: ParentalHypertension.NoParentalHypertension, // optional
physicalActivity: false, // optional
smoker: false, // optional
userId: '__YOUR_USER_ID__',
}
// Update this line to provide the user info to Vitals™ SDK
const cam = createVitalSignCamera({ isActive: true, config, userInfo })
/* User Information */
const userInfo = {
age: 30,
gender: Gender.Male,
weight: 60.1, // optional
height: 185.9, // optional
waistCircumference: 70.1, // optional
hdl: 40.2, // optional
totalCholesterol: 180.3, // optional
alcoholic: false, // optional
antiHypertensive: false, // optional
diabetic: Diabetic.No, // optional
healthyDiet: true, // optional
historyBloodGlucose: false, // optional
historyFamilyDiabetes: HistoryFamilyDiabetes.No, // optional
parentalHypertension: ParentalHypertension.NoParentalHypertension, // optional
physicalActivity: false, // optional
smoker: false, // optional
userId: "__YOUR_USER_ID__",
};
// Update this line to provide the user info to Vitals™ SDK
const cam = createVitalSignCamera({ isActive: true, config, userInfo })
TIP
In the above example, the string __YOUR_USER_ID__
should be replaced by your own User ID. Please contact us to obtain your User ID, which specifies the subscription plan for the Vitals™ Cloud Service. The set of vital signs obtained from a scan varies depending on the licensed subscription plan, with each plan offering a unique set of vital signs.