maintenance: title: Set the Actions for Venipuncture Alerts;; mlmname: STD_FUNC_VENIPUNCTURE_ACTIONS;; arden: version 2.5;; version: 18.4;; institution: Allscripts, Standard MLM;; author: Allscripts Healthcare Solutions, Inc.;; specialist: ;; date: 2018-10-26;; validation: testing;; /* P r o p r i e t a r y N o t i c e */ /* Unpublished (c) 2013 - 2018 Allscripts Healthcare, LLC. and/or its affiliates. All Rights Reserved. P r o p r i e t a r y N o t i c e: This software has been provided pursuant to a License Agreement, with Allscripts Healthcare, LLC. and/or its affiliates, containing restrictions on its use. This software contains valuable trade secrets and proprietary information of Allscripts Healthcare, LLC. and/or its affiliates and is protected by trade secret and copyright law. This software may not be copied or distributed in any form or medium, disclosed to any third parties, or used in any manner not provided for in said License Agreement except with prior written authorization from Allscripts Healthcare, LLC. and/or its affiliates. Notice to U.S. Government Users: This software is {{{SINGLE-QUOTE}}}Commercial Computer Software{{{SINGLE-QUOTE}}}. All product names are the trademarks or registered trademarks of Allscripts Healthcare, LLC. and/or its affiliates. */ /* P r o p r i e t a r y N o t i c e */ library: purpose: This MLM is used by the Venipuncture checking MLMs to call another MLM to create the AlertAction object and to populate them with data. ;; explanation: This MLM will do the following: 1. Call the STD_Func_Create_Alert_Action_Object MLM to create an instance of the AlertAction object. 2. Process the data that was sent to it and populate each AlertAction object. 3. Create a list of the objects and return it to the call program. ;; keywords: ;; knowledge: type: data-driven;; data: /***************Make Changes To Spelling And Flags In This Section***************/ /* Set to true if logging is needed.*/ log_execution_info := false; /********************************************************************************/ // Instantiate the variables associated with the Arguments (order_guid, //GUID of the Evoking Object matching_action_item_status_list, //List of STRINGs for the ActionItemStatus matching_order_guid_list, //List of GUIDs for the ActionItemID matching_name_list, //List of STRINGs for the ActionItemName matching_master_guid_list, //List of GUIDs for ActionEnterpriseItemID matching_short_message_list, //List of STRINGs for the ShortMessage matching_is_suspended_list ) //List of Booleans for Suspended Orders := ARGUMENT; // Declare the MLM that can be called by this MLM func_create_alert_action_object := MLM {{{SINGLE-QUOTE}}}STD_Func_Create_Alert_Action_Object{{{SINGLE-QUOTE}}}; // Execute only when this MLM is called by the editor if called_by_editor then obj := read last { Order: THIS WHERE GUID = order_guid }; EvokingObject := obj; endif; //--------------------------------------------- // Call the MLM to Create AlertAction Objects //--------------------------------------------- // Get data from the Evoking Object (evoking_catalog_item_guid, evoking_object_name):= read last {Order: OrderCatalogMasterItemGUID, Name REFERENCING EvokingObject }; // Set Values for AlertAction data evoking_object_table := "CV3Order"; action_item_table := "CV3Order"; mlm_name := "STD_VENIPUNCTURE"; alert_action_object_list := (); counter_list := 1 seqto (count matching_order_guid_list ); for JJ in counter_list do // Process Through the Lists // to Set Variables that will populate the AlertAction object action_item_name := matching_name_list[JJ]; action_item_catalog_item_guid := matching_master_guid_list[JJ]; action_item_guid := matching_order_guid_list[JJ]; action_item_status := matching_action_item_status_list [JJ]; is_suspended := matching_is_suspended_list[JJ]; short_message := matching_short_message_list[JJ]; // Create the correct action_event_list for EXISTING and UNSUBMITTED orders if action_item_status = "Existing" then //Do NOT suspend an order that is already suspended. if is_suspended then action_event_list := "DC-Cancel", "Modify"; else action_event_list := "DC-Cancel", "Modify", "Suspend"; endif; //if is_suspended elseif action_item_status = "Unsubmitted" then action_event_list := "Delete", "Modify"; endif; for action_event in action_event_list do // Create the AlertAction Object alert_action_obj:= call func_create_alert_action_object with (evoking_object_table, action_item_table) ; // Set the Shared Values for a Single Instance of the AlertAction Object alert_action_obj.EvokingEnterpriseItemID := evoking_catalog_item_guid; alert_action_obj.EvokingObjectID := order_guid; alert_action_obj.EvokingObjectName := evoking_object_name; alert_action_obj.ActionEvent := action_event; alert_action_obj.ActionItemStatus := action_item_status; alert_action_obj.ActionItemID := action_item_guid; alert_action_obj.ActionItemName := action_item_name; alert_action_obj.ActionEnterpriseItemID := action_item_catalog_item_guid; alert_action_obj.MLMName := mlm_name; alert_action_obj.ShortMessage := short_message; // Add AlertAction object to a list alert_action_object_list := alert_action_object_list, alert_action_obj; enddo; //for action_event enddo; //for JJ ;; evoke: ;; logic: conclude true; ;; action: return alert_action_object_list; ;; end: