maintenance: title: simplified body mass index;; mlmname: BodyMassIndexSimple;; arden: Version 2.9;; version: 1.00;; institution: Medexter Healthcare;; author: ;; specialist: ;; date: 2017-05-03;; validation: testing;; library: purpose: simple body mass index classification;; explanation: simplified calculation of body mass index;; keywords: BMI, body mass index;; citations: ;; links: en.wikipedia.org/wiki/Body_mass_index;; knowledge: type: data_driven;; data: // parameters are passed as arguments: // Age, age in years, // Weight, weight in kilograms // Height, height in meters (age, weight, height) := argument; ;; priority: ;; evoke: ;; logic: // calculation of BMI result := (weight / (height ** 2)); // Classification - the classification is only valid for patients older than 19 if age is less than 19 years then classification := null; elseif result is less than 18.5 then classification := localized 'under'; elseif result is less than 25 then classification := localized 'normal'; else classification := localized 'over'; endif; // construct the localized message result_msg := result formatted with localized 'msg' || classification; // if there is a classification, execute the action slot conclude classification is present; ;; action: return result_msg; ;; urgency:;; resources: default: en;; language: en 'msg' : "The patient's BMI %.1f is classified as "; 'under' : "Underweight"; 'normal' : "Normal (healthy weight)"; 'over' : "Overweight" ;; end: