Initial Checking with all 820 MLMs

This commit is contained in:
2020-02-02 00:54:01 -05:00
parent c59dc6de2e
commit 840d0432f4
828 changed files with 239162 additions and 0 deletions

View File

@@ -0,0 +1,181 @@
maintenance:
title: Form_Heparin_Dose_calc;;
mlmname: Form_Heparin_Dose_calc;;
arden: version 2;;
version: 4.50;;
institution: St. Clair Hospital;;
author: Teresa M. Spicuzza (Teresa.Spicuzza@stclair.org), 412.942.1721 ;;
specialist: Eclipsys Corporation;;
date: 2006-10-27;;
validation: testing;;
library:
purpose: Caculate Heparin bolus dose based on weight.
;;
explanation: (Per T. Spicuzza, 10-26-06):
Dosing Weight in Kilograms * Bolus Concentration =
Bolus Dose (round to nearest 100)
Dose equals value of (rounded) Bolus Dose
If (rounded) Bolus Dose is 5000 or less Then
Product Concentration equals 1000
WORx Product Code equals 06466
Concentration Text equals (1000units/ml)
ElseIf (rounded) Bolus Dose is 5001 or greater
Product Concentration equals 1000
WORx Product Code equals 06466
Concentration Text equals (1000units/ml)
Endif
If Dosing Weight in Kilograms is null alert user to
Enter a Calculation Weight on the Vital Sign Flowsheet before proceeding
;;
keywords:
Heparin, bolus, weight;
;;
knowledge:
type: data-driven;;
data:
/********************Make Changes To Spelling And Flags In This Section*********************/
/********************************************************************************JAB********/
// 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;
called_by := this_communication.CallingEvent;
call_field := this_communication.CallingFieldName;
//RS Set some needed fields
if called_by_editor then
client_guid := "9000001369400200";
visit_guid := visit_obj.GUID;
chart_guid := "9000001918900170";
orderId := "1000002689073001";
called_by := "FormOpen";
else
client_guid := this_communication.ClientGUID;
visit_guid := this_communication.ClientVisitGUID;
chart_guid := this_communication.ChartGuid;
orderid := this_comm.ItemID;
endif;
//Initialize MLM pointers:
round_dose := mlm {{{SINGLE-QUOTE}}}SYS_ROUND_DOSAGE{{{SINGLE-QUOTE}}};
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
comb_ht_wt_field := first of
(field_list where field_list.DataItemName = "CombinedMeasurements");
if exists comb_ht_wt_field then
comb_ht_wt_val := comb_ht_wt_field.value;
wt := comb_ht_wt_val.weight;
ht := comb_ht_wt_val.height;
wt_type := comb_ht_wt_val.weighttype;
bsa := comb_ht_wt_val.bsa;
bmi := comb_ht_wt_val.bmi;
endif;
if not exists wt then
DoNada:=True;
else
//Units per Kg wt
bolus_conc := first of (field_list where field_list.DataItemName
= "PRX_WtBasedHeparinBolusUnitsPerKg");
//Route
dose_route := first of
(field_list where field_list.DataItemName = "OrderRouteCode");
//Dose
dose := first of
(field_list where field_list.DataItemName = "dosagelow");
//Strength
prod_conc_str := first of
(field_list where field_list.DataItemName = "PRX_CONCSTRENGTH");
//WORx Code
worx_prod_code := first of
(field_list where field_list.DataItemName = "PRX_DRUGIDCODE");
//Concentration Text
prod_conc_txt := first of
(field_list where field_list.DataItemName = "PRX_Concentration");
if exists bolus_conc then
bolus_dose := (wt as number) * (bolus_conc.value as number);
endif;
//round the dose
// per trackit 100664 problem with system rounding to 50 not 100
// RS Overridin system call and using our own integer rounding calculation
// Original code
// (error_msg, rnd_bolus_dose) := call round_dose
// with bolus_dose, dose_route.value;
// new code introduced 11/11/2008
rnd_bolus_dose := int((bolus_dose + 50)/100) * 100;
//use the rounded dose for the actual dose
if exists dose then
dose.value := rnd_bolus_dose;
endif;
If rnd_bolus_dose <= 5000 then
prod_conc_str.value := "1000";
worx_prod_code.value := "06466";
prod_conc_txt.value := "(1000units/ml)";
else
prod_conc_str.value := "1000";
worx_prod_code.value := "06466";
prod_conc_txt.value := "(1000units/ml)";
endif; // rnd_bolus_dose <= 5000
endif; // not exists wt
/* // FOR DEBUGGING PURPOSES: display a message to the user
this_communication.Message :=
"wt = "|| wt
|| "\nbolus_conc.value = " || bolus_conc.value
|| "\nbolus_dose = " || bolus_dose
|| "\ndose_route.value = " || dose_route.value
|| "\nrnd_bolus_dose = " || rnd_bolus_dose
;
this_communication.MessageType := "Informational";
*/
;;
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: