/
BMI Calculation
© 2025 IQVIA - All Rights Reserved
BMI Calculation
Summary
This method calculates Body Mass Index using inputs from Height and Weight collection. The math for this calculation is as follows:
BMI = (Weight) / (Height)2
Form Setup
This method assumes that Height, Weight, and BMI Items are contained in the same Form; and that height and weight measurement units are defined as ‘cm’ and ‘kg’ respectively.
Item Reference
This method is attached to the BMI item reference.
Formal Expression
HEIGHT = Name of Item capturing height in CM
WEIGHT = Name of Item capturing weight in KG
var bmi = null;
var height = findFirstItemValueByName(formJson, 'HEIGHT');
var weight = findFirstItemValueByName(formJson, 'WEIGHT');
if (height && weight) { //BMI = ( Weight in Kilograms / ( Height in Meters x Height in Meters ) )
var heightMtr = (height / 100);
bmi = (Math.round((weight / (heightMtr * heightMtr)) * 10) / 10);
}
return {"value": bmi, "measurementUnitName": 'kg/m²'};
Method In Action
Alternate version getting Height from another form
var HEIGHT_FORM_STUDY_EVENT = 'Day -28 to -2';
var HEIGHT_FORM_NAME = 'Height / Weight / BMI'
var bmi = null;
var fixedNum = itemJson.item.significantDigits + 1;
var weight = findFirstItemValueByName(formJson, 'VS_WEIGHT');
// update Study Event and Form Name as needed to look up previously-collected data
var heightForm = findFormData(HEIGHT_FORM_STUDY_EVENT, HEIGHT_FORM_NAME);
var height = findFirstItemValueByName(heightForm[0],'VS_HEIGHT')
if (height && weight) { //BMI = ( Weight in Kilograms / ( Height in Meters x Height in Meters ) )
var heightMtr = (height / 100);
bmi = (Math.round((weight / (heightMtr * heightMtr)) * 10) / 10);
}
return {"value": bmi.toPrecision(fixedNum +1), "measurementUnitName": 'kg/m2'};
, multiple selections available,
Related content
Comparison to Baseline
Comparison to Baseline
More like this
Multiply and Truncate
Multiply and Truncate
Read with this
Cockcroft-Gault Equation
Cockcroft-Gault Equation
More like this
Populate Item Barcode(s) or Sample Transfer Barcode(s) from the same Form into a Specific Item
Populate Item Barcode(s) or Sample Transfer Barcode(s) from the same Form into a Specific Item
Read with this
Additive Calculation
Additive Calculation
More like this
Javascript Util Library useful in Methods and Edit Checks
Javascript Util Library useful in Methods and Edit Checks
Read with this
Exported and Printed Copies Are Uncontrolled