212 lines
7.1 KiB
Plaintext
212 lines
7.1 KiB
Plaintext
maintenance:
|
|
|
|
title: Generic Form Control for Order Sets;;
|
|
mlmname: FORM_Set_Wound_Care;;
|
|
arden: version 2;;
|
|
version: 5.00;;
|
|
institution: St Clair;;
|
|
author: Shawn Head, Eclipsys Corp ext 7468;;
|
|
specialist: Peggy Karish, Eclipsys Corp ext 7441;;
|
|
date: 2012-08-01;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Used to select grid items on order set forms.
|
|
;;
|
|
|
|
explanation: Following this strategy to improve CPOE turnaround
|
|
|
|
Change history
|
|
|
|
5-22-2012 STH - Copied MLM "FORM_Set_Generic_Item_Control" to use as template.
|
|
|
|
;;
|
|
keywords: Generic, FormOpen, Item select, update items, CPOE, CPOE updates, CPOE items
|
|
;;
|
|
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;
|
|
|
|
field_list:= this_form.fields;
|
|
dressingorders := ();
|
|
positionorders := ();
|
|
SkinCareorders := ();
|
|
equipmentorders := ();
|
|
Nursingorders := ();
|
|
Precautionorders := ();
|
|
Medicationorders := ();
|
|
consultorders := ();
|
|
Notifyorders := ();
|
|
|
|
|
|
/*******************Make Changes To Spelling And Flags In This Section*******************/
|
|
|
|
/* Set to true if a decision.log is needed.*/
|
|
log_execution_info := FALSE;
|
|
|
|
|
|
callinggdataitemname := "NUR_Checkbox";
|
|
|
|
//create a list of items that are added to MOG(38) which is the grid that holds all dressing orders
|
|
dressingorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (38));
|
|
|
|
//create a list of items that are added to MOG(40) which is the grid that holds all SkinCareorders
|
|
SkinCareorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (40));
|
|
|
|
//create a list of items that are added to MOG(46) which is the grid that holds all equipmentorders
|
|
equipmentorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (46));
|
|
|
|
//create a list of items that are added to MOG(45) which is the grid that holds all Nursingorders
|
|
Nursingorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (45));
|
|
|
|
//create a list of items that are added to MOG(49) which is the grid that holds all Medicationorders
|
|
Medicationorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (49));
|
|
|
|
//create a list of items that are added to MOG(48) which is the grid that holds all consultorders
|
|
consultorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (48));
|
|
|
|
//create a list of items that are added to MOG(50) which is the grid that holds all Notifyorders
|
|
Notifyorders := last of (field_list.Value where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = (50));
|
|
|
|
|
|
/***************************************************************************************/
|
|
|
|
// Use String parse
|
|
str_parse := mlm {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}}; //used to parse string data into a list
|
|
|
|
list_false_true := mlm {{{SINGLE-QUOTE}}}UTIL_LIST_FALSE_TRUE{{{SINGLE-QUOTE}}}; //used to disable/enable the update grid item(s) to the value passed in
|
|
//to the MLM. If yous end true all items are disabled if you send false all items
|
|
//are enabled. Originally developed by robert spence
|
|
|
|
setreadonly := mlm {{{SINGLE-QUOTE}}}UTIL_ITEMS_READONLY{{{SINGLE-QUOTE}}}; //used to control item specific disable/enable "readonly" option for items inside calling grid
|
|
|
|
|
|
// Initialize error message
|
|
error_message:="";
|
|
|
|
// get the list of configured items to be updates based on the form item MLMGenericItemControl
|
|
|
|
|
|
dressingorderstf := ();
|
|
SkinCareorderstf := ();
|
|
equipmentorderstf := ();
|
|
Nursingorderstf := ();
|
|
Medicationorderstf := ();
|
|
consultorderstf := ();
|
|
Notifyorderstf := ();
|
|
|
|
dressingorderstf := call list_false_true with dressingorders.IsSelected, false;
|
|
SkinCareorderstf := call list_false_true with SkinCareorders.IsSelected, false;
|
|
equipmentorderstf := call list_false_true with equipmentorders.IsSelected, false;
|
|
Nursingorderstf := call list_false_true with Nursingorders.IsSelected, false;
|
|
Medicationorderstf := call list_false_true with Medicationorders.IsSelected, false;
|
|
consultorderstf := call list_false_true with consultorders.IsSelected, false;
|
|
Notifyorderstf := call list_false_true with Notifyorders.IsSelected, false;
|
|
|
|
|
|
itemselected := ();
|
|
itemsname := ();
|
|
itemselected := (field_list.Value where field_list.DataItemName = callinggdataitemname);
|
|
itemsname := (field_list.Label where field_list.DataItemName = callinggdataitemname);
|
|
|
|
|
|
frmfieldvalues := ();
|
|
frmfieldlist := ();
|
|
frmfieldlistselected := ();
|
|
frmfieldlistname1 := ();
|
|
frmfieldlabel := ();
|
|
frmfieldoccnum := ();
|
|
|
|
frmfieldlist := (field_list where field_list.DataItemName = "MultiOrderGrid") ;
|
|
frmfieldoccnum := (field_List.Control_MultiFieldOccNum where field_list.DataItemName = "MultiOrderGrid") ;
|
|
frmfieldvalues := frmfieldlist.Value;
|
|
frmfieldlabel := frmfieldlist.Label;
|
|
frmfieldlistselected := frmfieldvalues.IsSelected;
|
|
frmfieldlistname1 := frmfieldvalues.name;
|
|
|
|
checked := ();
|
|
unchecked := ();
|
|
|
|
for x in (1 seqto count itemselected) do
|
|
if itemselected[x] = true then
|
|
checked := checked, itemsname[x];
|
|
else
|
|
unchecked := unchecked, itemsname[x];
|
|
endif;
|
|
enddo;
|
|
|
|
|
|
|
|
|
|
|
|
for x in (1 seqto count checked) do
|
|
|
|
if trim(checked[x]) = "Deep Tissue Injury" then
|
|
dressingorderstf[1] := true;
|
|
endif;
|
|
|
|
if trim(checked[x]) = "Stage 1 (Pressure Ulcer)" then
|
|
dressingorderstf[2] := true;
|
|
endif;
|
|
|
|
if trim(checked[x]) = "Stage 2 (Pressure Ulcer)" then
|
|
dressingorderstf[3] := true;
|
|
endif;
|
|
|
|
if trim(checked[x]) = "Stage 3 or 4 (Pressure Ulcer)" then
|
|
dressingorderstf[4] := true;
|
|
Medicationorderstf[1] := true;
|
|
endif;
|
|
|
|
if trim(checked[x]) is in ("Stage 1 (Pressure Ulcer)","Stage 2 (Pressure Ulcer)", "Stage 3 or 4 (Pressure Ulcer)","Deep Tissue Injury") then
|
|
SkinCareorderstf[1] := true;
|
|
consultorderstf[2] := true;
|
|
Notifyorderstf[1] := true;
|
|
Nursingorderstf[1] := true;
|
|
endif;
|
|
|
|
if trim(checked[x]) is in ("Stage 2 (Pressure Ulcer)", "Stage 3 or 4 (Pressure Ulcer)") then
|
|
equipmentorderstf[2] := true;
|
|
consultorderstf[1] := true;
|
|
Medicationorderstf[3] := true;
|
|
endif;
|
|
|
|
enddo;
|
|
|
|
|
|
dressingorders.IsSelected := dressingorderstf;
|
|
Medicationorders.IsSelected := Medicationorderstf;
|
|
SkinCareorders.IsSelected := SkinCareorderstf;
|
|
equipmentorders.IsSelected := equipmentorderstf;
|
|
Nursingorders.IsSelected := Nursingorderstf;
|
|
consultorders.IsSelected := consultorderstf;
|
|
Notifyorders.IsSelected := Notifyorderstf;
|
|
|
|
;;
|
|
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:
|