maintenance: title: Set Calcitonin Nasal Spray;; mlmname: FORM_Set_Calcitonin_Nasal;; arden: version 2;; version: 4.50;; institution: St Clair Admissions;; author: Robert Spence, Eclipsys Corp Ext 7461;; specialist: Teresa Spicuzza, Eclipsys Corp ext 7448;; date: 2008-05-20;; validation: testing;; library: purpose: Used for Calcitonin Nasal Spray order set to gray out left or right nostril orders per pharmacy ;; explanation: This MLM is called from the Calcitonin Nasal Spray order set on field change of one of 3 grids. ;; keywords: Called MLMs, Calcitonin Nasal Spray, 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*******************/ /* 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; //////////////// Grid1_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 1); Grid1_List := Grid1_fld.Value; Grid1Pos1 := first of(Grid1_List); Grid1Pos2 := last of(Grid1_List); /////////////// Grid2_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 2); Grid2_List := Grid2_fld.Value; Grid2Pos1 := first of(Grid2_List); Grid2Pos2 := last of(Grid2_List); /////////////// Grid3_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 3); Grid3_List := Grid3_fld.Value; Grid3Pos1 := first of(Grid3_List); Grid3Pos2 := last of(Grid3_List); /////////////// If CallingField = "MultiOrderGrid|1" then If Grid1Pos1.IsSelected = True then Grid1_List.IsReadOnly := (False, True); Grid2_List.IsSelected := (False, True); Grid2_List.IsReadOnly := (True, True); Grid3_List.IsSelected := (True, False); Grid3_List.IsReadOnly := (True,True); elseif ((Grid1Pos1.IsSelected = False) and (Grid1Pos2.IsSelected = False)) then Grid1_List.IsReadOnly := (False,False); Grid2_List.IsReadOnly := (False,False); Grid2_List.IsSelected := (False, False); Grid3_List.IsSelected := (False, False); Grid3_List.IsReadOnly := (False,False); elseif Grid1Pos2.IsSelected = True then Grid1_List.IsReadOnly := (True, False); Grid2_List.IsSelected := (True, False); Grid2_List.IsReadOnly := (True, True); Grid3_List.IsSelected := (False, True); Grid3_List.IsReadOnly := (True,True); endif; elseif CallingField ="MultiOrderGrid|2" then If Grid2Pos1.IsSelected = True then Grid2_List.IsReadOnly := (False, True); Grid3_List.IsSelected := (False, True); Grid3_List.IsReadOnly := (True,True); elseif ((Grid1Pos2.IsSelected = False) and (Grid2Pos2.IsSelected = False)) then Grid2_List.IsReadOnly := (False,False); Grid3_List.IsSelected := (False, False); Grid3_List.IsReadOnly := (False,False); elseif Grid2Pos2.IsSelected = True then Grid2_List.IsReadOnly := (True, False); Grid3_List.IsSelected := (True, False); Grid3_List.IsReadOnly := (True,True); endif; elseif CallingField ="MultiOrderGrid|3" then If Grid3Pos1.IsSelected = True then Grid3_List.IsReadOnly := (False, True); elseif ((Grid3Pos2.IsSelected = False) and (Grid3Pos2.IsSelected = False)) then Grid3_List.IsReadOnly := (False,False); elseif Grid3Pos2.IsSelected = True then Grid3_List.IsReadOnly := (True, 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: