Files
St.Clair/MLMStripper/bin/Debug/STD/STD_FUNC_DUP_SUPPRESS_CHECKING.mlm

185 lines
6.4 KiB
Plaintext

maintenance:
title: Suppress Duplicate Order Checking Within an Order Set;;
mlmname: STD_FUNC_DUP_SUPPRESS_CHECKING;;
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: The purpose of this MLM is to determine which OrderSetGUID and OrderSubsetGUID
should be avoided so that the orders in the PARENT and/or CHILD Order Set
will NOT be retrieved. When an order is NOT retrieved, then duplicate order
checking is suppressed for that order.
;;
explanation:
RULE 1. If the IsDupCheckingSuppressed is TRUE in the PARENT ORDER SET
Then exclude ALL the orders in the CURRENT order SET
for both the PARENT & CHILD ORDER SETS.
Returns the Parent{{{SINGLE-QUOTE}}}s OrderSetGUID with a GUID,
but the Child{{{SINGLE-QUOTE}}}s OrderSubsetGUID is an empty list.
RULE 2. ELSE IF the IsDupCheckingSuppressed is FALSE or NULL in the PARENT ORDER SET
and the Order Set is NOT a Linked-Set (i.e. order set type <> 4)
and the IsDupCheckingSuppressed is TRUE in the CHILD ORDER SET
and EXCLUDE all the orders in the CURRENT order SET
for the CHILD ORDER SET ONLY.
Returns the Parent{{{SINGLE-QUOTE}}}s OrderSetGUID as an empty list,
and the Child{{{SINGLE-QUOTE}}}s OrderSubsetGUID has a GUID.
RULE 3. ELSE Do NOT EXCLUDE ANY Orders from Duplicate Order Checking.
Returns the Parent{{{SINGLE-QUOTE}}}s OrderSetGUID as an empty list
and the Child{{{SINGLE-QUOTE}}}s OrderSubsetGUID as an empty list.
;;
keywords:
;;
knowledge:
type: data-driven;;
data:
(order_name, //String--the name of the Evoking Order
order_guid ) //GUID--the GUID of the Evoking Order
:= ARGUMENT;
/***************Make Changes To Spelling And Flags In This Section***************/
/* Set to true if logging is needed.*/
log_execution_info := false;
/********************************************************************************/
/* This block executes only when this MLM is called by the editor */
if called_by_editor
then
// Set the EvokingObject to object that is used by the STD_Duplicate MLM
// so that the EvokingObjects are the same.
// This is NOT necessary to do during run-time because there is only
// one EvokingObject.
EvokingObject := read last
{ Order: THIS
WHERE Name = order_name
and GUID = order_guid
};
endif;
// Get Information from the Evoking Order
(o_order_name,
o_order_significant_dtm,
o_order_set_name,
o_order_set_type,
o_order_set_GUID,
o_order_subset_name,
o_order_subset_type,
o_order_subset_GUID,
o_order_set_obj,
o_order_subset_obj ) := read last
{Order: Name, SignificantDtm,
OrderSetName, OrderSetType, OrderSetGUID,
OrderSubsetName, OrderSubsetType, OrderSubsetGUID,
OrderSet,
OrderSubset
Referencing EvokingObject};
// Get Information from the Parent Order Set
if exist o_order_set_obj
then
(os_parent_order_set_name,
os_parent_start_dtm,
os_parent_GUID,
os_parent_order_catalog_set_obj ) := read last
{OrderSet: OrderSetName, StartDtm, GUID, OrderCatalogSet
Referencing o_order_set_obj };
(ocs_parent_name,
ocs_parent_GUID,
ocs_parent_type,
ocs_parent_is_dup_checking_suppressed,
ocs_parent_duplicate_policy_GUID ) := read last
{OrderCatalogSet: Name, GUID, Type,
IsDupCheckingSuppressed, DuplicatePolicyGUID
Referencing os_parent_order_catalog_set_obj };
endif; //if exist o_order_set_obj
// Get Information from the Child Order Set
if exist o_order_subset_obj
then
(os_child_order_set_name,
os_child_start_dtm,
os_child_GUID,
os_child_order_catalog_set_GUID,
os_child_order_catalog_set_obj ) := read last
{OrderSet: OrderSetName, StartDtm, GUID, OrderCatalogSetGUID, OrderCatalogSet
Referencing o_order_subset_obj };
(ocs_child_name,
ocs_child_GUID,
ocs_child_type,
ocs_child_is_dup_checking_suppressed,
ocs_child_duplicate_policy_GUID ) := read last
{OrderCatalogSet: Name, GUID, Type,
IsDupCheckingSuppressed, DuplicatePolicyGUID
Referencing os_child_order_catalog_set_obj };
endif; //if exist o_order_subset_obj
;;
evoke:
;;
logic:
//-----------------------------------
// RULE 1--Exclude ALL Orders in Set
//-----------------------------------
If ocs_parent_is_dup_checking_suppressed
then
avoid_parent_order_set_GUID := o_order_set_GUID;
avoid_child_order_set_GUID := ();
//------------------------------------------
//RULE 2--Exclude Orders in Child Order Set
//------------------------------------------
ElseIf
(NOT ocs_parent_is_dup_checking_suppressed
OR ocs_parent_is_dup_checking_suppressed is NULL)
AND o_order_set_type <> 4
AND ocs_child_is_dup_checking_suppressed
then
avoid_parent_order_set_GUID := ();
avoid_child_order_set_GUID := o_order_subset_GUID;
//----------------------------------
//RULE 3--Do NOT exclude ANY Orders
//----------------------------------
Else
avoid_parent_order_set_GUID := ();
avoid_child_order_set_GUID := ();
endif; // if ocs_parent_is_dup_checking_suppressed
//Alway Conclude True to Return an Answer
Conclude True;
;;
action:
RETURN
avoid_parent_order_set_GUID, //OrderSetGUID or an empty list
avoid_child_order_set_GUID; //OrderSubsetGUID or an empty list
;;
end: