Files
St.Clair/MLMStripper/bin/Debug/FORM/FORM_SET_ED_ADMIT_LABS.mlm

191 lines
7.2 KiB
Plaintext

maintenance:
title: Admission order set Labs and Notifications;;
mlmname: FORM_Set_ED_Admit_Labs;;
arden: version 2.5;;
version: 5.00;;
institution: St Clair Hospital;;
author: Teresa Spicuzza, Eclipsys Corp Ext 7448;;
specialist: Peggy Karish, Eclipsys Corp ext 7441;;
date: 2010-08-09;;
validation: testing;;
library:
purpose: Used for ED admission Order set to auto select
additional orders when other orders are selected.
;;
explanation: This MLM is called from the ED Admission OS
Change history
;;
keywords: Called MLMs,
;;
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;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
Notify_Order_Grid:= first of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 55);
Instruct_Order_Grid:= first of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 48);
StatLab_Order_CBox:= first of (field_list where field_list.DataItemName = "MultiOrderCheckbox" and field_List.Control_MultiFieldOccNum = 2);
AmLab_Order_CBox:= first of (field_list where field_list.DataItemName = "MultiOrderCheckbox" and field_List.Control_MultiFieldOccNum = 3);
HourlyLab_Order_CBox:= first of (field_list where field_list.DataItemName = "MultiOrderCheckbox" and field_List.Control_MultiFieldOccNum = 5);
RepeatLab_Order_CBox:= first of (field_list where field_list.DataItemName = "MultiOrderCheckbox" and field_List.Control_MultiFieldOccNum = 4);
NotifyGridList := Notify_Order_Grid.IsSelected;
Notify_Grid := Notify_Order_Grid.Value;
Instruct_Grid := Instruct_Order_Grid.Value;
AmLab_List := AmLab_Order_CBox.Value;
HourlyLab_List := HourlyLab_Order_CBox.Value;
RepeatLab_List := RepeatLab_Order_CBox.Value;
StatLab_List := StatLab_Order_CBox.Value;
CheckedLabs := ("CBC (Includes Diff)", "Hemoglobin and Hematocrit", "CBC No Diff (Hemogram Only)","CBC with Manual Diff");
Found_Lab_Order2:= (StatLab_List where StatLab_List.IsSelected) ;
Found_Lab_Order3:= (AmLab_List where AmLab_List.IsSelected) ;
Found_Lab_Order4:= (RepeatLab_List where RepeatLab_List.IsSelected) ;
Found_Lab_Order5:= (HourlyLab_List where HourlyLab_List.IsSelected) ;
Found_Lab_Order2Amy:= first of (StatLab_List where StatLab_List.Name = ("Amylase Plasma/Serum")) ;
Found_Lab_Order2Lip:= first of (StatLab_List where StatLab_List.Name = ("Lipase")) ;
Found_Lab_Order3Amy:= first of (AmLab_List where AmLab_List.Name = ("Amylase Plasma/Serum")) ;
Found_Lab_Order3Lip:= first of (AmLab_List where AmLab_List.Name = ("Lipase")) ;
labsordered := Found_Lab_Order2.name, Found_Lab_Order3.name, Found_Lab_Order4.name,Found_Lab_Order5.name;
foundhemo := labsordered is in checkedlabs;
foundit := (true);
checkthebox := foundit is in foundhemo;
NotifyGridListValue := ();
If CallingField = "MultiOrderCheckbox|2" or CallingField = "MultiOrderCheckbox|3" or
CallingField = "MultiOrderCheckbox|4" or CallingField = "MultiOrderCheckbox|5" then
if (checkthebox = (true)) then
NotifyGridListValue := (True); else
NotifyGridListValue := (False);
endif;
for k in (1 seqto (count Notify_grid)) do
if k <> 1 then
if Notify_Grid.IsSelected [k] = True then
NotifyGridListValue := NotifyGridListValue, True;
else NotifyGridListValue := NotifyGridListValue, False;
endif;
else NotifyGridListValue := NotifyGridListValue;
endif;
enddo;
Notify_Grid.IsSelected := NotifyGridListValue;
NotifyGridList := NotifyGridListValue;
endif;
If CallingField = "MultiOrderCheckbox|2" or CallingField = "MultiOrderCheckbox|3" then
If (Found_Lab_Order2amy.IsSelected = True) and (Found_Lab_Order2amy.IsReadOnly = False) and
(Found_Lab_Order2lip.IsReadOnly = False) and
(Found_Lab_Order2lip.IsSelected = False) then
Found_Lab_Order2lip.IsSelected := True;
Found_Lab_Order2lip.IsReadOnly := True;
endif;
If (Found_Lab_Order2amy.IsSelected = False) and (Found_Lab_Order2amy.IsReadOnly = False) and
(Found_Lab_Order2lip.IsReadOnly = True)
and (Found_Lab_Order2lip.IsSelected = True) then
Found_Lab_Order2lip.IsSelected := False;
Found_Lab_Order2lip.IsReadOnly := False;
endif;
If (Found_Lab_Order2lip.IsSelected = True) and (Found_Lab_Order2lip.IsReadOnly = False) and
(Found_Lab_Order2amy.IsReadOnly = False)
and (Found_Lab_Order2amy.IsSelected = False) then
Found_Lab_Order2amy.IsSelected := True;
Found_Lab_Order2amy.IsReadOnly := True;
endif;
If (Found_Lab_Order2lip.IsSelected = False) and (Found_Lab_Order2lip.IsReadOnly = False) and
(Found_Lab_Order2amy.IsReadOnly = True)
and (Found_Lab_Order2amy.IsSelected = True) then
Found_Lab_Order2amy.IsSelected := False;
Found_Lab_Order2amy.IsReadOnly := False;
endif;
If (Found_Lab_Order3amy.IsSelected = True) and (Found_Lab_Order3amy.IsReadOnly = False) and
(Found_Lab_Order3lip.IsReadOnly = False) and
(Found_Lab_Order3lip.IsSelected = False) then
Found_Lab_Order3lip.IsSelected := True;
Found_Lab_Order3lip.IsReadOnly := True;
endif;
If (Found_Lab_Order3amy.IsSelected = False) and (Found_Lab_Order3amy.IsReadOnly = False) and
(Found_Lab_Order3lip.IsReadOnly = True)
and (Found_Lab_Order3lip.IsSelected = True) then
Found_Lab_Order3lip.IsSelected := False;
Found_Lab_Order3lip.IsReadOnly := False;
endif;
If (Found_Lab_Order3lip.IsSelected = True) and (Found_Lab_Order3lip.IsReadOnly = False) and
(Found_Lab_Order3amy.IsReadOnly = False)
and (Found_Lab_Order3amy.IsSelected = False) then
Found_Lab_Order3amy.IsSelected := True;
Found_Lab_Order3amy.IsReadOnly := True;
endif;
If (Found_Lab_Order3lip.IsSelected = False) and (Found_Lab_Order3lip.IsReadOnly = False) and
(Found_Lab_Order3amy.IsReadOnly = True)
and (Found_Lab_Order3amy.IsSelected = True) then
Found_Lab_Order3amy.IsSelected := False;
Found_Lab_Order3amy.IsReadOnly := False;
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: