156 lines
5.4 KiB
Plaintext
156 lines
5.4 KiB
Plaintext
maintenance:
|
|
|
|
title: Set Discharge Orders;;
|
|
mlmname: FORM_Set_Discharge_Orders;;
|
|
arden: version 2;;
|
|
version: 4.50;;
|
|
institution: St Clair ;;
|
|
author: Robert Spence, Eclipsys Corp Ext 7461;;
|
|
specialist: Peggy Karish, Eclipsys Corp Ext 7441;;
|
|
date: 2010-05-11;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Used for Discharge Order Set
|
|
;;
|
|
|
|
explanation: This MLM will deselect and protect Admit to Dr, Vital Signs, Rehab, and Isolation orders when a patient is discharged to home.
|
|
|
|
Change history
|
|
|
|
07.31.2015 DW HD# 1820549 - During 15.1 release testing we found that the form configuration change broke the MLM. Vital signs orders were not being protected.
|
|
;;
|
|
keywords: Called MLMs, Order Set, Discharge Order Set
|
|
;;
|
|
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*******************/
|
|
// Initialize error message
|
|
error_message:="";
|
|
|
|
// Assigns fields passed in the Form object to the Field object
|
|
field_list:= this_form.fields;
|
|
client_guid := this_communication.ClientGUID;
|
|
visit_guid := this_communication.ClientVisitGUID;
|
|
chart_guid := this_communication.ChartGuid;
|
|
CallingEvent := this_communication.CallingEvent;
|
|
CallingField := this_communication.CallingFieldName;
|
|
|
|
standard_libs := MLM {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
|
include standard_libs;
|
|
using "ObjectsPlusXA.SCM.Forms";
|
|
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
|
|
|
Grid_Discharge := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 46);
|
|
Grid_Discharge_List :=Grid_Discharge.value ;
|
|
|
|
Grid_Code_Status:= last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 24);
|
|
Grid_Code_Status_List :=Grid_Code_Status.value ;
|
|
|
|
|
|
Grid_Isolation:= last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 20);
|
|
Grid_Isolation_List:=Grid_Isolation.value ;
|
|
|
|
Grid_AdmitTo:= last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 61);
|
|
Grid_AdmitTo_List:=Grid_AdmitTo.value ;
|
|
|
|
Grid_Vitals:= last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 42);
|
|
Grid_Vitals_List:=Grid_Vitals.value ;
|
|
|
|
Grid_Rehab:= last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 28);
|
|
Grid_Rehab_List:=Grid_Rehab.value ;
|
|
|
|
Grid_Activity := last of (field_list WHERE field_list.DataItemName = "MultiOrderGrid"
|
|
AND field_list.Control_MultiFieldOccNum = 6);
|
|
Grid_Activity_List := Grid_Activity.Value;
|
|
|
|
Grid_Diet := last of (field_list WHERE field_list.DataItemName = "MultiOrderGrid"
|
|
AND field_list.Control_MultiFieldOccNum = 29);
|
|
Grid_Diet_List := Grid_Diet.Value;
|
|
|
|
/* Set to true if a decision.log is needed.*/
|
|
log_execution_info := false;
|
|
|
|
// Use String parse
|
|
str_parse := mlm {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}};
|
|
|
|
|
|
if CallingEvent = "FieldChange" then
|
|
If (CallingField = "MultiOrderGrid|46")then
|
|
|
|
if true in Grid_Discharge_List.IsSelected// need to read only others in this grid
|
|
then
|
|
newreadonly:=();
|
|
firstisselected := false;
|
|
for changepermod in (1 seqto (count Grid_Discharge_List.IsSelected )) do
|
|
if Grid_Discharge_List.IsSelected[changepermod] = true
|
|
then
|
|
if changepermod = 1 then firstisselected := true; endif;
|
|
newreadonly:= newreadonly,false;
|
|
else
|
|
newreadonly:= newreadonly,true;
|
|
endif;
|
|
enddo;
|
|
|
|
Grid_Discharge_List.IsReadOnly:= newreadonly;
|
|
|
|
if firstisselected = true then
|
|
Grid_Code_Status_List.IsSelected := false,false,false;
|
|
Grid_Code_Status_List.IsReadOnly := true, true, true;
|
|
//Grid_Code_Status_List.IsSelected := false,false,false,false,false,false,false;
|
|
//Grid_Code_Status_List.IsReadOnly := true, true, true, true, true, true, true;
|
|
Grid_Isolation_List.IsSelected := false;
|
|
Grid_Isolation_List.IsReadOnly := true;
|
|
Grid_AdmitTo_List.IsSelected := false;
|
|
Grid_AdmitTo_List.IsReadOnly := true;
|
|
Grid_Vitals_List.IsSelected := false,false,false,false,false,false;
|
|
Grid_Vitals_List.IsReadOnly := true, true, true, true, true, true;
|
|
Grid_Rehab_List.IsSelected := false,false,false;
|
|
Grid_Rehab_List.IsReadOnly := true, true, true;
|
|
endif;
|
|
else
|
|
Grid_Discharge_List.IsReadOnly:= false,false,false,false;
|
|
Grid_Code_Status_List.IsReadOnly := false,false,false;
|
|
//Grid_Code_Status_List.IsReadOnly :=false,false,false,false,false,false,false;
|
|
Grid_Isolation_List.IsReadOnly := false;
|
|
Grid_AdmitTo_List.IsReadOnly := false;
|
|
Grid_Vitals_List.IsReadOnly := false,false,false,false,false;
|
|
Grid_Rehab_List.IsReadOnly :=false,false,false;
|
|
endif;
|
|
|
|
|
|
endif; // calling field
|
|
|
|
|
|
endif; // calling event
|
|
|
|
;;
|
|
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:
|