EnteredValue
EnteredValue
Characteristic |
Description |
---|---|
Icon |
or |
Availability |
An item with a base unit selected on the Design tab for the item. |
Return type |
One of the following:
|
Description |
Returns the entered value for an item for which a base unit was selected. |
Purpose |
Some unit conversions are not absolute, which can make writing rules difficult. For example, converting mmol/L requires knowledge of a chemical’s molecular weight.
You have the following options for recording this information:
The following rule example uses EnteredUnit and EnteredValue to convert glucose from mmol/L to mg/dL, and stores that value in the itmNormalizedGlucose item. Consider that a conversion is not done if another unit is chosen; if the base unit is selected, EnteredValue and Value are the same. value = this.itmGlucose.EnteredUnit == "mmol/L" ? this.itmGlucose.EnteredValue * 18 : this.itmGlucose.Value always set this.itmNormalizedGlucose = value
You can write a similar rule to convert cholesterol, triglycerides, and other measurements. Additionally, you can replace numerical values, such as 18 and 39, with constants such as Constants.Conversions.Glucose and Constants.Conversions.Cholesterol. You define the constants in the study or a library. |