maintenance: title: Form Diluent based on selected Dose;; mlmname: FORM_DILUENT_FROM_DOSE;; arden: version 2;; version: 5.00;; institution: St.Clair;; author: Ankit Mistry;; specialist: Ankit Mistry;; date: 2017-08-16;; validation: testing;; library: purpose: Used to set Dilunt Data based on Entered Dose If Then DosageLow >= 1 and DosageLow < 501 BaseSolution.Name = 0.9% NaCl 100ml . BaseSolution.Dose = 100 BaseSolution.UOM = mL DosageLow >= 501 and DosageLow < 1700 BaseSolution.Name = 0.9% NaCl 250ml . BaseSolution.Dose = 250 BaseSolution.UOM = mL DosageLow >= 1700 BaseSolution.Name = 0.9% NaCl 500ml . BaseSolution.Dose = 500 BaseSolution.UOM = mL ;; explanation: This MLM was developed to Auto Populate Dilunt Data based on Entered Dose. Change history 08-07-2017 AMistry - New MLM Created. ;; keywords: ;; knowledge: type: data-driven;; data: // This MLM is passed three arguments, of types // communication_type, form_type and client info object respectively. (this_communication, // Communication object this_form, // Form object client_info_obj //Arden ClientInfo object ) := argument; field_list:= this_form.fields; zz := field_list.Records__; zzz := this_communication.PrimaryObj.Records__; Dosage_Obj := FIRST OF ( field_list WHERE field_list.DataItemName = "DosageLow" ); DosageValue := Dosage_Obj.Value AS NUMBER; BaseSolution_Obj := FIRST OF ( field_list WHERE field_list.DataItemName = "BaseSolution" ); BaseSolutionValue := BaseSolution_Obj.Value; If DosageValue >= 1 AND DosageValue < 501 then BaseSolutionValue.Name := "0.9% NaCl 100ml ."; BaseSolutionValue.Dose := "100"; BaseSolutionValue.uom := "mL"; ElseIf DosageValue >= 501 AND DosageValue < 1700 then BaseSolutionValue.Name := "0.9% NaCl 250ml ."; BaseSolutionValue.Dose := "250"; BaseSolutionValue.uom := "mL"; ElseIf DosageValue >= 1700 then //BaseSolutionValue.Name := "0.9% NaCl 500ml ."; BaseSolutionValue.Name := "0.9% NaCl 500ml"; BaseSolutionValue.Dose := "500"; BaseSolutionValue.uom := "mL"; EndIf; ;; evoke: // No evoke statement ;; logic: conclude true; ;; action: // This MLM returns two parameters, of types communication_type and form_type respectively. return this_communication, this_form; ;; end: