Modifying your BMI guideline – Add assessment

This tutorial provides a step-by-step demonstration on how to add an assessment to your calculator guideline using the GDL2 Editor. We are using the BMI calculator we created in the first tutorial so start by loading that guideline or, if you have not yet created it, visit GDL2 Guideline Tutorial I – BMI and follow the steps described there to model it. 

Content

Add assessment archetype

Add first assessment rule

Add second assessment rule

Add the rest of the assessment rules

Execute the guideline

Add decimals to the BMI value

Add assessment archetype

We will add the following BMI assessment to our BMI guideline:

BMI <18,50 – underweight
– <16,00 – severe thinness
– 16,00-16,99 – moderate thinness
– 17,00-18,49 – mild thinness
—————————————–
BMI 18,50 – 24,99 – normal range
—————————————–
BMI 25,00-29,99 – overweight/pre-obese
—————————————–
BMI ≥30 – obese
– 30,00-34,99 – obese class I
– 35,00 – 39,99 – obese class II
– ≥40 – obese class III

As a first step, we add the assessment criteria to the Use description:

To assess the BMI value we will use the evaluation archetype body_mass_index_assessment. To define the output, start by dragging Archetype instatiation into the Output domain and dropping it just below the body_mass_index archetype. 

Click on Data binding and select the body mass index assessment archetype. Confirm your selection by clicking on the check mark. 

Drag the Element instantiation into the archetype, click on Element (1) and select BMI classification (2). 

Add first assessment rule

Next, we create the first assessment rule: BMI <16,00 = severe thinness. We enter the Rule tab, click on Add new rule and name it BMI severe underweight.

Drag the Attribute Comparison condition type to the Rule conditions area

Click on Element[@attribute] (1) and select Body Mass Index magnitude (2). Confirm by clicking the check mark. 

In the drop down list between Body Mass Index[@magnitude] and Expression, select the “less than” symbol (<). 

Click on Expression (1) and write 16 in the expression editor. Confirm by clicking the check mark. 

Go down to the Rule Actions section and drag the Set value action entity into the Rule Actions area. 

Click on Element (1) and select BMI classification (2). Conform by clicking the check mark. 

Click on Constant value (1) and select 0 – Underweight – severe t… from the drop down list (2). 

Below you can see the completed first rule.

Add second assessment rule

Next step is to create the second assessment rule: BMI 16,00-16,99 = moderate thinness. STo do that a new rule, called BMI moderate underweight (1), use the Attribute comparison for Body Mass Index[@attribute] (2) and select the comparison operator greater than or equals (>=) (3). 

Click on Expression and type 16 in the expression editor. 

In the same way, add another Attribute comparison that states that the BMI value should be less than or equal to 16.99 as shown below.

Use the Set value action to set the BMI classification element (1). Click on Constant value (2) and select 1 – Underweight – moderat (3) to select the classification. 

Add the rest of the assessment rules

Add the third rule: BMI 17,00-18,49 = mild thinness in the same way as for the second rule. When you are done, the rule should look like this:

Now go ahead to create the rest of the rules for normal range, overweight and obesety:

Execute the guideline

Go to the execution tab to try the guideline. Now we will have two outputs: the BMI value and the corresponding classification. You can see them in the red box below. Note that the BMI value is displayed as 25 kg/m2 (no decimals). 

Add decimals to the BMI value

Until now we have seen the BMI value without any decimals but because of the newly added assessment rules (that sort the BMI value into different classifications based on tenths) we now need the BMI value with decimals. 

To define how many decimals the BMI value should have we go to the Calculate BMI rule (1), add another Set Attribute action (2), click on Element[@attribute] (3) and select the Body Mass Index precision (4). 

In the expression editor (that opens when we click Expression) we write 2, which will correspond to the value having two decimals. 

Now that we re-execute the guideline in the Execution tab, we will see that the BMI value now is 24.69 kg/m2 (previously 25):