Initial Checking with all 820 MLMs
This commit is contained in:
182
MLMStripper/bin/Debug/FORM/FORM_NON_FORM_IV.mlm
Normal file
182
MLMStripper/bin/Debug/FORM/FORM_NON_FORM_IV.mlm
Normal file
@@ -0,0 +1,182 @@
|
||||
maintenance:
|
||||
|
||||
title:Pharmacy Non Form IVs MLM;;
|
||||
mlmname:FORM_NON_FORM_IV;;
|
||||
arden: version 2;;
|
||||
version: 4.50;;
|
||||
institution: St Clair Non Form IVs;;
|
||||
author: Robert Spence, Eclipsys Corp;;
|
||||
specialist: ;;
|
||||
date: 2007-01-26;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: This MLM sets the protected values of the non form meds forms
|
||||
|
||||
;;
|
||||
explanation: This MLM is launched on the change of the verified by pharmacy checkbox/
|
||||
|
||||
;;
|
||||
keywords: Called MLMs, Form fields, Protected, non formulary, IV
|
||||
;;
|
||||
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*******************/
|
||||
|
||||
/* Set to true if a decision.log is needed.*/
|
||||
log_execution_info := FALSE;
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
// Initialize error message
|
||||
error_message:="";
|
||||
|
||||
// Assigns fields passed in the Form object to the Field object
|
||||
field_list:= this_form.fields;
|
||||
CallingField :=this_communication.CallingFieldName;
|
||||
CallingEvent := this_communication.CallingEvent;
|
||||
FormType := this_communication.FormType;
|
||||
|
||||
|
||||
opening_msg := "Use only for IV Fluids not found through "
|
||||
|| "manual entry or Non Formulary order set.\n\n"
|
||||
|| "Verify Medication availability with Pharmacy before "
|
||||
|| "continuing with order.\n\n"
|
||||
|| "Check the Continue with non formulary IV box on the form to\n"
|
||||
|| "proceed with this order";
|
||||
|
||||
// Assing form fields to MLM fields
|
||||
Prx_Check:= last of (field_list
|
||||
where field_list.DataItemName = "PRX_Checkbox2" );
|
||||
BrandName := last of (field_list
|
||||
where field_list.DataItemName = "PRX_BRANDNAME" );
|
||||
DosageLow := last of (field_list
|
||||
where field_list.DataItemName = "DosageLow" );
|
||||
Uom := last of (field_list
|
||||
where field_list.DataItemName = "UOM" );
|
||||
IvAdditive := last of (field_list
|
||||
where field_list.DataItemName = "IVAdditive" );
|
||||
IVRate := last of (field_list
|
||||
where field_list.DataItemName = "OrderIVRate" );
|
||||
Route := last of (field_list
|
||||
where field_list.DataItemName = "OrderRouteCode" );
|
||||
Frequency := last of (field_list
|
||||
where field_list.DataItemName = "FrequencyCode" );
|
||||
StopAfter := last of (field_list
|
||||
where field_list.DataItemName = "StopAfter" );
|
||||
ReqDate := last of (field_list
|
||||
where field_list.DataItemName = "RequestedDate" );
|
||||
ReqTime := last of (field_list
|
||||
where field_list.DataItemName = "RequestedTime" );
|
||||
StopDate := last of (field_list
|
||||
where field_list.DataItemName = "StopDate" );
|
||||
StopTime := last of (field_list
|
||||
where field_list.DataItemName = "StopTime" );
|
||||
PRN := last of (field_list
|
||||
where field_list.DataItemName = "IsPRN" );
|
||||
Reason := last of (field_list
|
||||
where field_list.DataItemName = "PRNReasonText" );
|
||||
AdminIns := last of (field_list
|
||||
where field_list.DataItemName = "AdminInstructions" );
|
||||
|
||||
If CallingEvent = "FormOpen" then
|
||||
BrandName.control_read_only:=True;
|
||||
DosageLow.control_read_only:=True;
|
||||
Uom.control_read_only:=True;
|
||||
IvAdditive.control_read_only:=True;
|
||||
IVRate.control_read_only:=True;
|
||||
Route.control_read_only:=True;
|
||||
Frequency.control_read_only:=True;
|
||||
StopAfter.control_read_only:=True;
|
||||
ReqDate.control_read_only:=True;
|
||||
ReqTime.control_read_only:=True;
|
||||
StopDate.control_read_only:=True;
|
||||
StopTime.control_read_only:=True;
|
||||
PRN.control_read_only:=True;
|
||||
Reason.control_read_only:=True;
|
||||
AdminIns.control_read_only:=True;
|
||||
|
||||
this_communication.Message:= opening_msg;
|
||||
this_communication.MessageType := "Informational";
|
||||
|
||||
elseif callingevent ="FormClose" then
|
||||
If Prx_Check.Value = false then
|
||||
this_communication.DisplayForm := "Yes";
|
||||
this_communication.Message := "Please check the Continue With Non Formulary IV Field";
|
||||
this_communication.MessageType := "Error";
|
||||
endif;
|
||||
elseif CallingField = "PRX_CheckBox2" then
|
||||
If Prx_Check.Value = True then
|
||||
BrandName.control_read_only:=False;
|
||||
DosageLow.control_read_only:=False;
|
||||
Uom.control_read_only:=False;
|
||||
IvAdditive.control_read_only:=False;
|
||||
IVRate.control_read_only:=False;
|
||||
Route.control_read_only:=False;
|
||||
Frequency.control_read_only:=False;
|
||||
StopAfter.control_read_only:=False;
|
||||
ReqDate.control_read_only:=False;
|
||||
ReqTime.control_read_only:=False;
|
||||
StopDate.control_read_only:=False;
|
||||
StopTime.control_read_only:=False;
|
||||
PRN.control_read_only:=False;
|
||||
Reason.control_read_only:=False;
|
||||
AdminIns.control_read_only:=False;
|
||||
else
|
||||
BrandName.control_read_only:=True;
|
||||
DosageLow.control_read_only:=True;
|
||||
Uom.control_read_only:=True;
|
||||
IvAdditive.control_read_only:=True;
|
||||
IVRate.control_read_only:=True;
|
||||
Route.control_read_only:=True;
|
||||
Frequency.control_read_only:=True;
|
||||
StopAfter.control_read_only:=True;
|
||||
ReqDate.control_read_only:=True;
|
||||
ReqTime.control_read_only:=True;
|
||||
StopDate.control_read_only:=True;
|
||||
StopTime.control_read_only:=True;
|
||||
PRN.control_read_only:=True;
|
||||
Reason.control_read_only:=True;
|
||||
AdminIns.control_read_only:=True;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
// this_communication.DisplayForm := "Yes";
|
||||
// this_communication.Message := "MLM Field :" || CallingField || "\n" ||
|
||||
// "MLM Event :" || CallingEvent || "\n" ||
|
||||
// "Form type :" || FormType;
|
||||
// this_communication.MessageType := "Informational";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;;
|
||||
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:
|
||||
Reference in New Issue
Block a user