Previous Topic

Next Topic

Book Contents

_CalculateWaistHipRatio

Calculates the waist-to-hip ratio.

Syntax

_CalculateWaistHipRatio(waist,hip)

Parameters

Parameters for _CalculateWaistHipRatio

Parameter

Definition

Data type

waist

Waist measurement of the subject.

Float

hip

Hip measurement of the subject.

Float

Returns

Waist-to-hip ratio (Float).

Notes

Exceptions

An exception of type Argument Exception is returned if the hip measurement equals zero. This exception results in:

Example

The following rule is attached to the Vital Signs form and does not need any objects from outside the form. The form includes a waistCircumference item to record the measurement of waist circumference and a hipCircumference item to record the measurement of hip circumference. Both allow the value to be recorded in centimeters or inches, but both values are normalized to centimeters.

Note: Oracle recommends that you include rule logic to clear the calculated value if a referenced item value is cleared. For example, if a rule calculates BMI based on the values entered in the Height and Weight items, the rule should clear the BMI value if the data in the Height item is deleted. For an example of the appropriate rule logic, see Sample data-entry rules that use methods.

evaluate on Form Submission

value = _CalculateWaistHipRatio(this.waistCircumference.Value, this.hipCircumference.Value)

always

set this.whRatio.Value = value

Send Feedback