Initial Checking with all 820 MLMs
This commit is contained in:
156
MLMStripper/bin/Debug/FORM/FORM_SET_MEDROL_DOSE_PAK.mlm
Normal file
156
MLMStripper/bin/Debug/FORM/FORM_SET_MEDROL_DOSE_PAK.mlm
Normal file
@@ -0,0 +1,156 @@
|
||||
maintenance:
|
||||
|
||||
title: Medrol Dose Pak Orders;;
|
||||
mlmname: FORM_Set_Medrol_Dose_Pak;;
|
||||
arden: version 2.5;;
|
||||
version: 6.10;;
|
||||
institution: St Clair Hospital;;
|
||||
author: Teresa Spicuzza, Allscripts Corp ext 7448;;
|
||||
specialist: Teresa Spicuzza, Allscripts Corp ext 7448;;
|
||||
date: 2014-10-16;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: Used for medication grids on Medrol Dose Pak Orders
|
||||
;;
|
||||
|
||||
explanation: This MLM is called from the Medrol Dose Pak Orders
|
||||
|
||||
|
||||
Change history
|
||||
|
||||
11.04.2014 TMS Created for new Medrol dose pak order set. MLM looks at current time
|
||||
and selects correct order in the grid for start time. CSR #31407
|
||||
09.12.2016 TMS Call added on FormClose to call Order Mgt MLM and to uncheck all
|
||||
methylprednisolone 4mg tab orders if the dose pack in the
|
||||
multiordercheckbox is selected to be unchecked as a duplicate. HD 2347914
|
||||
;;
|
||||
|
||||
keywords: Called MLMs, Medrol Dose Pak, Methylprednisolone
|
||||
;;
|
||||
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;
|
||||
|
||||
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
|
||||
//local_session := cds_session.local;
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
// Initialize error message
|
||||
error_message:="";
|
||||
|
||||
// Assigns fields passed in the Form object to the Field object
|
||||
field_list:= this_form.fields;
|
||||
|
||||
CallingEvent := this_communication.CallingEvent;
|
||||
CallingField := this_communication.CallingFieldName;
|
||||
|
||||
Med_Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 1);
|
||||
Med_Orders_List := Med_Orders.Value;
|
||||
|
||||
Med_Selected := true in Med_Orders_List;
|
||||
|
||||
|
||||
Dose_Pak_Order := last of (field_list where field_list.DataItemName = "MultiOrderCheckbox" and field_List.Control_MultiFieldOccNum = 1);
|
||||
Dose_Pak_Order_List := Dose_Pak_Order.Value;
|
||||
Dose_Pak_Selected := true in Dose_Pak_Order_List ;
|
||||
|
||||
|
||||
// Test time for testing only
|
||||
|
||||
// Testtime := now + 5 hours;
|
||||
// testtime := testtime + 53 minutes;
|
||||
// thishour := extract hour testtime;
|
||||
// thismin := extract minute testtime; if ThisMin < 10 then ThisMin := "0"||ThisMin; endif;
|
||||
|
||||
ThisHour := extract hour now;
|
||||
ThisMin := extract minute now; if ThisMin < 10 then ThisMin := "0"||ThisMin; endif;
|
||||
ThisTime := (ThisHour||ThisMin) as number;
|
||||
|
||||
|
||||
|
||||
|
||||
// On form open check current hour and select appropriate start time
|
||||
If CallingEvent = "FormOpen" or (CallingEvent = "FormClose" and true not in Med_Orders_list.isSelected) then
|
||||
Dose_Pak_Order_List.IsReadOnly := (True);
|
||||
If ThisTime >= 0 and ThisTime <= 700 then
|
||||
Med_Orders_List.IsSelected := (True, False, False, False, False);
|
||||
Med_Orders_List.IsReadOnly := (False, True, True, True, True);
|
||||
elseIf ThisTime > 700 and ThisTime <= 1300 then
|
||||
Med_Orders_List.isselected := (False, True, False, False, False);
|
||||
Med_Orders_List.IsReadOnly := (True, False, True, True, True);
|
||||
elseIf ThisTime > 1300 and ThisTime <= 1800 then
|
||||
Med_Orders_List.isselected := (False, False, True, False, False);
|
||||
Med_Orders_List.IsReadOnly := (True, True, False, True, True);
|
||||
elseIf ThisTime > 1800 and ThisTime <= 2100 then
|
||||
Med_Orders_List.isselected := (False, False, False, True, False);
|
||||
Med_Orders_List.IsReadOnly := (True, True, True, False, True);
|
||||
elseIf ThisTime > 2100 and ThisTime <= 2400 then
|
||||
Med_Orders_List.IsSelected := (False, False, False, False, True);
|
||||
Med_Orders_List.IsReadOnly := (True, True, True, True, False);
|
||||
Endif;
|
||||
|
||||
Endif;
|
||||
|
||||
|
||||
|
||||
If CallingEvent = "FieldChange" and true not in Med_Orders_list.isSelected then
|
||||
Med_Orders_List.IsReadOnly := (False, False, False, False, False);
|
||||
else
|
||||
protectvaluelist := ();
|
||||
for r in 1 seqto (count Med_Orders_List) do
|
||||
If Med_Orders_List.IsSelected [r] = true then
|
||||
protectvalue := "false";
|
||||
else protectvalue := "true";
|
||||
endif;
|
||||
protectvaluelist := protectvaluelist , protectvalue;
|
||||
enddo;
|
||||
|
||||
Med_Orders_List.IsReadOnly := protectvaluelist;
|
||||
Endif;
|
||||
|
||||
If CallingEvent = "FormClose" then
|
||||
|
||||
Med_Order_Mgt := mlm {{{SINGLE-QUOTE}}}FORM_SET_Rx_Medication_Order_Mgt{{{SINGLE-QUOTE}}};
|
||||
(this_communication, this_form) := call Med_Order_Mgt with this_communication, this_form, client_info_obj;
|
||||
|
||||
if false in Dose_Pak_Order_List.isselected then
|
||||
Med_Orders_List.IsSelected := (False, False, False, False, False);
|
||||
Med_Orders_List.IsReadOnly := (True, True, True, True, True);
|
||||
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:
|
||||
Reference in New Issue
Block a user