Initial Checking with all 820 MLMs
This commit is contained in:
231
MLMStripper/bin/Debug/FORM/FORM_HEPARIN_DOSE_CALC_CAP.mlm
Normal file
231
MLMStripper/bin/Debug/FORM/FORM_HEPARIN_DOSE_CALC_CAP.mlm
Normal file
@@ -0,0 +1,231 @@
|
||||
maintenance:
|
||||
|
||||
title: Form_Heparin_Dose_calc_Cap;;
|
||||
mlmname: Form_Heparin_Dose_calc_Cap;;
|
||||
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: Calculate 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 ‘(1,000units/ml)’
|
||||
Endif
|
||||
|
||||
If Dosing Weight in Kilograms is null alert user to
|
||||
‘Enter a Calculation Weight on the Vital Sign Flowsheet before proceeding’
|
||||
|
||||
Change history
|
||||
02.26.2010 TS Changed Worx code on >5000 units and <5000 units to a new product (same product).
|
||||
07.06.2011 TS changed dose cap from 4000 units to 5000 units.
|
||||
;;
|
||||
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;
|
||||
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* RS: 06/12 get location */
|
||||
/*--------------------------------------*/
|
||||
|
||||
|
||||
|
||||
FromOrderSet := first of
|
||||
(field_list where field_list.DataItemName = "MLM_From Order Set");
|
||||
|
||||
EdLocFld := first of (field_list
|
||||
where field_list.DataItemName = "ED Location");
|
||||
|
||||
|
||||
IF (EDLocFld.Value = "") or (EDLocFld.Value is Null) then
|
||||
//Retrieve Patient{{{SINGLE-QUOTE}}}s Current Location
|
||||
LocName:= read last
|
||||
{"SELECT currentlocation "
|
||||
|| " FROM cv3clientvisit "
|
||||
|| " WHERE ClientGUID = " || SQL(client_guid )
|
||||
|| " And GUID = " || SQL(visit_guid)};
|
||||
EdLocFld.Value := LocName;
|
||||
endif;
|
||||
/*---------------------------------------------------*/
|
||||
|
||||
If EdLocFld.Value matches pattern "ER%" then
|
||||
IsED := True;
|
||||
else
|
||||
IsED := False;
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
comb_ht_wt_field := first of
|
||||
(field_list where field_list.DataItemName = "CombinedMeasurements");
|
||||
|
||||
test_ht_wt_val := comb_ht_wt_field.value;
|
||||
wt2 := test_ht_wt_val.weight;
|
||||
testex := exists comb_ht_wt_field ;
|
||||
|
||||
|
||||
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
|
||||
|
||||
tester:=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;
|
||||
|
||||
|
||||
|
||||
// Cap the rounded bolus dose. If greater than 5000, set to 5000
|
||||
if rnd_bolus_dose > 5000 then
|
||||
rnd_bolus_dose := 5000;
|
||||
endif;
|
||||
|
||||
//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
|
||||
|
||||
/*this_communication.Message :=
|
||||
" Calling field is " || call_field || "\n" ||
|
||||
" Order set field = " || FromOrderSet.value || "\n" ||
|
||||
" W2 = " || wt2 || "\n" ||
|
||||
" test_ht_wt_val = " || test_ht_wt_val || "\n" ||
|
||||
" Exist ht_wt? = "|| testex
|
||||
;
|
||||
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:
|
||||
Reference in New Issue
Block a user