Initial Checking with all 820 MLMs
This commit is contained in:
91
MLMStripper/bin/Debug/FORM/FORM_PEDIATRIC_MORPHINE_CALC.mlm
Normal file
91
MLMStripper/bin/Debug/FORM/FORM_PEDIATRIC_MORPHINE_CALC.mlm
Normal file
@@ -0,0 +1,91 @@
|
||||
maintenance:
|
||||
|
||||
title: Pediatric Morphine Conversion;;
|
||||
mlmname: Form_Pediatric_Morphine_calc;;
|
||||
arden: version 2;;
|
||||
version: 4.50;;
|
||||
institution: St. Clair Hospital;;
|
||||
author: Teresa M. Spicuzza ;;
|
||||
specialist: Eclipsys Corporation;;
|
||||
date: 2006-11-28;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: Caculate Morphine solution to mg when ordered in ml and to ml when ordered in ml.
|
||||
;;
|
||||
explanation:
|
||||
|
||||
;;
|
||||
keywords:
|
||||
Pediatric, Morphine, Conversion;
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
/********************Make Changes To Spelling And Flags In This Section*********************/
|
||||
|
||||
|
||||
/*************************************************************************************************/
|
||||
|
||||
// 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;
|
||||
|
||||
// Assigns fields passed in the Form object to the Field object
|
||||
field_list:= this_form.fields;
|
||||
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
|
||||
|
||||
OrderedDose := first of (field_list where field_list.DataItemName = "DosageLow");
|
||||
OrderedUnits := first of (field_list where field_list.DataItemName = "UOM");
|
||||
Instructions := first of (field_list where field_list.DataItemName = "PRX_NOTECOMMENT0");
|
||||
//Instructions := first of (field_list where field_list.DataItemName = "AdminInstructions");
|
||||
|
||||
If exists OrderedDose then OrderedDoseValue := OrderedDose.Value; endif;
|
||||
|
||||
If exists OrderedUnits then OrderedUnitsValue := OrderedUnits.Value; endif;
|
||||
|
||||
If OrderedUnitsValue = "ml" then
|
||||
ConversionUnits := "mg";
|
||||
ConversionDose := (OrderedDoseValue as number) * 0.4;
|
||||
|
||||
|
||||
Endif;
|
||||
|
||||
If orderedUnitsValue = "mg" then
|
||||
ConversionUnits := "ml";
|
||||
ConversionDoseRaw := ((OrderedDoseValue as number) / 0.4) ;
|
||||
ConversionDose := ((int((ConversiondoseRaw + 0.0051) * 100)) /100) ;
|
||||
Endif;
|
||||
|
||||
|
||||
If OrderedDoseValue is not null and OrderedUnitsValue is not null then
|
||||
Instructions.value := "\n\n " || OrderedDoseValue || OrderedUnitsValue ||
|
||||
" = " || ConversionDose || ConversionUnits;
|
||||
else Instructions.value := " ";
|
||||
|
||||
Endif;
|
||||
|
||||
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic:
|
||||
Conclude true;
|
||||
;;
|
||||
action:
|
||||
// This MLM returns two parameters, of types
|
||||
//communication_type and form_type respectively.
|
||||
return this_communication, this_form;
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user