110 lines
2.8 KiB
Plaintext
110 lines
2.8 KiB
Plaintext
maintenance:
|
|
|
|
title: Form_Demerol_Item_code;;
|
|
mlmname: Form_Demerol_Item_code;;
|
|
arden: version 2;;
|
|
version: 4.50;;
|
|
institution: St. Clair Hospital;;
|
|
author: Teresa Spicuzza ;;
|
|
specialist: Eclipsys Corporation;;
|
|
date: 2006-01-20;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Populate Worx order code based on demerol dose.
|
|
;;
|
|
explanation: This checks the ordered dose
|
|
of morphine and populates the worx product code with
|
|
corresponding value.
|
|
|
|
Value is based on high dose if present
|
|
Else low dose (mandatory on form) is used
|
|
|
|
;;
|
|
keywords:
|
|
Demerol, dose, worx code;
|
|
;;
|
|
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;
|
|
|
|
//Dose
|
|
lodose := first of
|
|
(field_list where field_list.DataItemName = "dosagelow");
|
|
hidose := first of
|
|
(field_list where field_list.DataItemName = "dosagehigh");
|
|
|
|
|
|
//WORx Code
|
|
worx_prod_code := first of
|
|
(field_list where field_list.DataItemName = "PRX_DRUGIDCODE");
|
|
|
|
if exists lodose then
|
|
lodose_value := lodose.value;
|
|
endif;
|
|
|
|
if exists hidose then
|
|
hidose_value := hidose.value;
|
|
endif;
|
|
|
|
if hidose_value > 0 then
|
|
dose_value := hidose_value;
|
|
else
|
|
dose_value := lodose_value;
|
|
endif;
|
|
|
|
If dose_value <= 50 then
|
|
worx_prod_code.value := "04472";
|
|
elseif
|
|
dose_value <=75 and dose_value >50 then
|
|
worx_prod_code.value := "04473";
|
|
elseif
|
|
dose_value >75 then
|
|
worx_prod_code.value := "04474";
|
|
else
|
|
worx_prod_code.value := "04474";
|
|
|
|
endif; //
|
|
|
|
|
|
/* // 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:', N'0ca0fddb-15d5-4f06-8279-851b59923223', 2, N'Form_Demerol_Item_code', N'2', N'4.50', CAST(N'2006-01-20T00:00:00.000' AS DateTime), NULL)
|