Initial Checking with all 820 MLMs
This commit is contained in:
207
MLMStripper/bin/Debug/STD/STD_FUNC_DRUG_INTERACTION_ACTIONS.mlm
Normal file
207
MLMStripper/bin/Debug/STD/STD_FUNC_DRUG_INTERACTION_ACTIONS.mlm
Normal file
@@ -0,0 +1,207 @@
|
||||
maintenance:
|
||||
|
||||
title: Process Actions on Alerts for Drug Interactions;;
|
||||
mlmname: STD_FUNC_DRUG_INTERACTION_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 Drug Interaction 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;
|
||||
|
||||
/********************************************************************************/
|
||||
|
||||
(aoa_evoking_drug_list, //Drugs that have interactions
|
||||
evoking_combined_med_type_list, //Evoking Data Values for a Regular or IV additives
|
||||
aoa_interaction_severity_list, //Interacting Severities
|
||||
aoa_interacting_drug_list, //Drugs that interact with the evoking drugs
|
||||
aoa_concomit_order_name_list, //All containing orders
|
||||
aoa_concomit_order_guid_list, //All orders including additives
|
||||
aoa_concomit_order_catalog_item_guid_list,
|
||||
aoa_concomit_item_type_list, // Regular or IVAdditive
|
||||
aoa_concomit_item_status_list, // Evoking, Unsubmitted, or Existing
|
||||
aoa_concomit_is_suspended_list,
|
||||
evoking_catalog_item_guid,
|
||||
evoking_order_guid,
|
||||
evoking_order_name)
|
||||
:= Argument;
|
||||
|
||||
// Declare the MLM that can be called
|
||||
func_create_alert_action_object := MLM {{{SINGLE-QUOTE}}}STD_Func_Create_Alert_Action_Object{{{SINGLE-QUOTE}}};
|
||||
|
||||
// Declare string constants
|
||||
Additive_string := "Additive";
|
||||
DC_Cancel_string := "DC-Cancel";
|
||||
Delete_string := "Delete";
|
||||
Evoking_string := "Current Order";
|
||||
Existing_string := "Existing";
|
||||
IVSolution_string := "IVSolution";
|
||||
Modify_string := "Modify";
|
||||
Regular_string := "Regular";
|
||||
Suspend_string := "Suspend";
|
||||
Unsubmitted_string := "Unsubmitted";
|
||||
Status_Unsubmitted_string := "Unsubmitted Order";
|
||||
Status_Unapprove_string := "Unapproved";
|
||||
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic:
|
||||
//-----------------------------------------------------
|
||||
// Process The Lists to Extract Data To Create Actions
|
||||
//-----------------------------------------------------
|
||||
// Initialize
|
||||
alert_action_list := ();
|
||||
|
||||
// Loop through the list of interacting drugs
|
||||
action_index_list := 1 seqto count (aoa_evoking_drug_list);
|
||||
for AA in action_index_list do
|
||||
|
||||
// Get the drug-drug interaction pair and its severity
|
||||
aoa_evoking_drug := aoa_evoking_drug_list[AA];
|
||||
aoa_interacting_drug := aoa_interacting_drug_list[AA];
|
||||
aoa_interaction_severity := aoa_interaction_severity_list[AA];
|
||||
aoa_evoking_med_type := evoking_combined_med_type_list[AA];
|
||||
|
||||
//--------------------//
|
||||
// Create the Actions //
|
||||
//--------------------//
|
||||
// Loop through the sublist of drugs //
|
||||
sub_index_list := 1 seqto count aoa_concomit_order_guid_list;
|
||||
for BB in sub_index_list do
|
||||
aoa_order_guid := aoa_concomit_order_guid_list[BB];
|
||||
aoa_catalog_item_guid := aoa_concomit_order_catalog_item_guid_list[BB];
|
||||
aoa_med_type := aoa_concomit_item_type_list[BB];
|
||||
aoa_status_type := aoa_concomit_item_status_list[BB];
|
||||
aoa_is_suspended := aoa_concomit_is_suspended_list[BB];
|
||||
aoa_action_item_name := aoa_concomit_order_name_list[BB];
|
||||
|
||||
// Only process EXISTING and UNSUBMITTED Orders, NOT EVOKING
|
||||
if aoa_status_type <> Evoking_string
|
||||
then
|
||||
//---------------------------------------------------//
|
||||
// Create the ShortMessage for the Actions on Alerts //
|
||||
//---------------------------------------------------//
|
||||
//Add the front part of the message.
|
||||
If aoa_evoking_med_type = Regular_string
|
||||
then
|
||||
short_message := "The current order for "
|
||||
|| aoa_evoking_drug ||" has a drug interaction with ";
|
||||
elseif aoa_evoking_med_type = IVSolution_string
|
||||
then
|
||||
short_message := "The current order for "
|
||||
|| aoa_evoking_drug ||" has a drug interaction with ";
|
||||
elseif aoa_evoking_med_type = Additive_string
|
||||
then
|
||||
short_message := "The current order has an IV-additive, "
|
||||
|| aoa_evoking_drug ||", that has a drug interaction with ";
|
||||
endif; //aoa_evoking_med_type
|
||||
|
||||
//Add the middle part of the message.
|
||||
if aoa_med_type = Regular_string
|
||||
then short_message := short_message || aoa_interacting_drug ;
|
||||
elseif aoa_med_type = IVSolution_string
|
||||
then short_message := short_message || aoa_interacting_drug ;
|
||||
elseif aoa_med_type = Additive_string
|
||||
then short_message := short_message || "the IV-additive, "
|
||||
|| aoa_interacting_drug ;
|
||||
endif; //if aoa_med_type
|
||||
|
||||
//Add the back part of the message.
|
||||
short_message := short_message
|
||||
|| ". The severity is: "|| aoa_interaction_severity ||".";
|
||||
|
||||
//----------------------------------------------//
|
||||
// Create the Alert Action Objects and Populate //
|
||||
//----------------------------------------------//
|
||||
// Create the Modify, Delete, DC-Cancel, and Suspend actions
|
||||
// and Apply the following business rules
|
||||
// 1. Any order any be modified.
|
||||
// 2. Only Unsubmitted orders can be deleted
|
||||
// 3. Only Existing orders can be dc-cancelled
|
||||
// 4. Do not suspend an order, if the order is already suspended.
|
||||
|
||||
// Create the correct action_event_list for EXISTING and
|
||||
// UNSUBMITTED orders
|
||||
if (aoa_status_type = Status_Unsubmitted_string or aoa_status_type = Status_Unapprove_string)
|
||||
then
|
||||
aoa_action_item_status := Unsubmitted_string;
|
||||
action_event_list := Delete_string, Modify_string;
|
||||
else // existing
|
||||
aoa_action_item_status := Existing_string;
|
||||
|
||||
//Do NOT suspend an order that is already suspended.
|
||||
if aoa_is_suspended
|
||||
then action_event_list := DC_Cancel_string, Modify_string;
|
||||
else action_event_list := DC_Cancel_string, Modify_string,
|
||||
Suspend_string;
|
||||
endif; //if is_suspended
|
||||
endif;
|
||||
|
||||
for aoa_action_event in action_event_list do
|
||||
|
||||
/* Create the Alert Action object and partially populate it */
|
||||
instance := call func_create_alert_action_object
|
||||
with "CV3Order", "CV3Order";
|
||||
|
||||
/* Finish populating the Alert Action object */
|
||||
instance.EvokingEnterpriseItemID := (evoking_catalog_item_guid as string);
|
||||
instance.EvokingObjectID := (evoking_order_guid as string);
|
||||
instance.EvokingObjectName := evoking_order_name;
|
||||
instance.ActionItemStatus := aoa_action_item_status;
|
||||
instance.ActionEvent := aoa_action_event;
|
||||
instance.ActionItemID := (aoa_order_guid as string);
|
||||
instance.ActionItemName := aoa_action_item_name;
|
||||
instance.ActionEnterpriseItemID := (aoa_catalog_item_guid as string);
|
||||
instance.mlmname := "STD_Drug_Interaction";
|
||||
instance.ShortMessage := short_message;
|
||||
|
||||
// Save the Alert Action objects to a List
|
||||
alert_action_list := alert_action_list, instance;
|
||||
enddo; //for aoa_action_event
|
||||
endif; //if aoa_status_type
|
||||
enddo; //for BB
|
||||
enddo; //for AA
|
||||
|
||||
// Always Conclude True to Return objects
|
||||
Conclude true;
|
||||
;;
|
||||
action:
|
||||
return alert_action_list;
|
||||
;;
|
||||
end:
|
||||
Reference in New Issue
Block a user