112 lines
3.3 KiB
Plaintext
112 lines
3.3 KiB
Plaintext
maintenance:
|
|
|
|
title: Levothyroxine Dose Check;;
|
|
mlmname: FORM_PRX_Levothyroxine;;
|
|
arden: version 2.5;;
|
|
version: 16.3;;
|
|
institution: St Clair Hospital;;
|
|
author: Teresa Spicuzza-Allscripts;;
|
|
specialist: Teresa Spicuzza;;
|
|
date: 2018-10-04;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: MLM that alerts user if they are ordering in Mg instead of mcg
|
|
|
|
;;
|
|
|
|
explanation: This MLM is called from the medication form(s) PRX_Po_Levothyroxine.
|
|
|
|
|
|
Change History
|
|
|
|
2018.10.04 - TMS CSR#: 34033 - Placed into production to reduce incorrect dosing of Levothyroxine.
|
|
|
|
|
|
|
|
;;
|
|
keywords: Called MLMs, Form fields, schedule
|
|
;;
|
|
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;
|
|
|
|
|
|
/*******************Make Changes To Spelling And Flags In This Section*******************/
|
|
|
|
/* These variables must containt he same wording as the options in the drop down list */
|
|
|
|
/***************************************************************************************/
|
|
|
|
// Initialize error message
|
|
error_message:="";
|
|
|
|
// References the LOCAL SESSION object
|
|
// local_session := cds_session.local;
|
|
standard_libs := MLM {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
|
|
|
// Obtain common fields passed in the Form object to the Field object
|
|
//commented out ones are just not being used; however left incase you need them.
|
|
field_list:= this_form.fields;
|
|
dose := last of (field_list where field_list.DataItemName = "DosageLow" );
|
|
dose_value := dose.value;
|
|
uom := last of (field_list where field_list.DataItemName = "UOM" );
|
|
UOM_value := Uom.value ;
|
|
CR := 13 formatted with "%c";
|
|
LF := 10 formatted with "%c";
|
|
CRLF:= CR||LF;
|
|
|
|
if (this_communication.CallingFieldName = "DosageLow") then
|
|
|
|
if ((Dose.value as number) < 1 and UOM.Value = "mcg" )then
|
|
|
|
If dose_value = 0.025 then newdose := 25;
|
|
elseIf dose_value = 0.05 then newdose := 50;
|
|
elseIf dose_value = 0.075 then newdose := 75;
|
|
elseIf dose_value = 0.088 then newdose := 88;
|
|
elseIf dose_value = 0.1 then newdose := 100;
|
|
elseIf dose_value = 0.112 then newdose := 112;
|
|
elseIf dose_value = 0.125 then newdose := 125;
|
|
elseIf dose_value = 0.137 then newdose := 137;
|
|
elseIf dose_value = 0.15 then newdose := 150;
|
|
elseIf dose_value = 0.175 then newdose := 175;
|
|
elseIf dose_value = 0.2 then newdose := 200;
|
|
else newdose := null;
|
|
endif;
|
|
|
|
If newdose is not null then
|
|
error_msg := "You are attempting to order in mg." || CRLF || CRLF || "Dose will be corrected to " || newdose || "mcg." ;
|
|
dose.value := newdose as number;
|
|
else
|
|
error_msg := "You are attempting to order in mg." || CRLF || CRLF || "Please correct dose to mcg." ;
|
|
dose.value := null;
|
|
endif;
|
|
this_communication.Message := error_msg;
|
|
this_communication.MessageType := "Error";
|
|
endif;
|
|
|
|
|
|
|
|
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:
|