Files
St.Clair/MLMStripper/bin/Debug/FORM/FORM_FORMCLOSE_COORD.mlm

160 lines
8.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
maintenance:
title: FormClose MLM Coordinator for order Forms;;
filename: Form_FormClose_Coord;;
arden: version 2.5;;
version: 16.3;;
institution: Allscripts ;;
author: Allscripts ;;
specialist: Allscripts;;
date: 2013-03-27;;
validation: testing;;
/* P r o p r i e t a r y N o t i c e */
/* Unpublished (c) 2013 - 2016 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 "Commercial Computer Software".
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 */
/*** Allscripts Disclaimer:
Client is responsible for all decisions, acts, and omissions of any persons in connection with the delivery of medical care or other services to any patients.
Before any Licensed Materials are placed into a live production environment, it is Clients responsibility to review and test all Licensed Materials and associated
workflows and other content, as implemented, make independent decisions about system settings and configuration based upon Clients needs, practices, standards and
environment, and reach its own independent determination that they are appropriate for such live production use. Any such use by Client (or its Authorized Users)
will constitute Clients representation that it has complied with the foregoing. Client shall ensure that all Authorized Users are appropriately trained in use of
the then-deployed release of the Software prior to their use of the Software in a live production environment. Clinical Materials are tools to assist Authorized
Users in the delivery of medical care, but should not be viewed as prescriptive or authoritative. Clinical Materials are not a substitute for, and Client shall
ensure that each Authorized User applies in conjunction with the use thereof, independent professional medical judgment. Clinical Materials are not designed for use,
and Client shall not use them, in any system that provides medical care without the participation of properly trained personnel. Any live production use of Clinical
Materials by Client (or its Authorized Users) will constitute Clients acceptance of clinical responsibility for the use of such materials.*/
library:
purpose:
Coordinate calls to multiple MLMs on FormClose for orders.
;;
explanation:
This MLM receives the three unmodified objects as arguements from the system,
and then declares and calls multiple MLMs to implement actions required
on FormClose. The three argument objects are passed to each called MLM in
turn. Modified communication and form objects are returned by each called
MLM to this FormClose Coordinator MLM.
NOTES:
1. When sent to the next called MLM, the objects contain the changes made
by the previous MLM, so the sequence of calls may be important. Each
called MLM may need to be tested for the existence of processed or changed
fields to avoid failing on a nested call
2. The called MLMs must exist in the database and must be in the Editor{{{SINGLE-QUOTE}}}s
memory (at a minimum "Loaded" and the Syntax checked) before this MLM is
processed. If they are not the Editor will display an error stating
that "The module <module anme> could not be located."
3. This MLM is initially configured to call modified "form-called" MLMs
which have the prefix "FORM_" in the filenames. The prefix is not required
for called MLMs; any valid MLM name may be used.
;;
keywords: Called MLM; FormClose Event; Order;
;;
Knowledge:
type: data-driven;;
data:
/*-------------------------------------------*/
/* form-related objects received by this MLM */
/*-------------------------------------------*/
(comm_obj, // communication type object
form_obj, // form type object
client_info_obj // client info object
) := argument;
/*-----------------------------------------------*/
/* constants and values to be used in processing */
/*-----------------------------------------------*/
field_list := form_obj.fields;
form_name := form_obj.Name;
client_name := client_info_obj.DisplayName;
/*** = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ***/
/*** Declare MLMs that will be called from this one ***/
/*** Add others as neede, sequence may be important ***/
/*** = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ***/
FORM_ID_REPEATORDERS := MLM {{{SINGLE-QUOTE}}}FORM_ID_RepeatOrders{{{SINGLE-QUOTE}}};
FORM_ACS_SAME_DAY_ORDER_REPLACEMENT := MLM {{{SINGLE-QUOTE}}}FORM_ACS_SAME_DAY_ORDER_REPLACEMENT{{{SINGLE-QUOTE}}};
FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS := MLM {{{SINGLE-QUOTE}}}FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS{{{SINGLE-QUOTE}}};
FORM_SET_RX_MEDICATION_ORDER_MGT := MLM {{{SINGLE-QUOTE}}}FORM_SET_RX_MEDICATION_ORDER_MGT{{{SINGLE-QUOTE}}};
FORM_SET_CPOE_PED_COMMONDX_CHAIN := MLM {{{SINGLE-QUOTE}}}FORM_SET_CPOE_PED_COMMONDX_CHAIN{{{SINGLE-QUOTE}}};
FORM_SET_REPEAT_LAB_ORDERS := MLM {{{SINGLE-QUOTE}}}FORM_SET_REPEAT_LAB_ORDERS{{{SINGLE-QUOTE}}};
/***--- ADD OTHER CALLED MLM DEFINITIONS HERE ---***/
// func_new_called_mlm := MLM {{{SINGLE-QUOTE}}}Any_Valid_MLM_Name"; // note "FORM_" prefix is not needed
/*** = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ***/
/*** get new communication and form values with called MLMs ***/
/*** each subsequent MLM will get forms w. updated values ***/
/*** = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ***/
if(form_name is in ("LAB Chemistry IVDM", "LAB Hematology"))then
if(NOT comm_obj.PrimaryObj.CancelOrder)then
(comm_obj, form_obj, client_info_obj) := CALL FORM_ACS_SAME_DAY_ORDER_REPLACEMENT with comm_obj, form_obj, client_info_obj;
endif;
if(NOT comm_obj.PrimaryObj.CancelOrder)then
(comm_obj, form_obj, client_info_obj) := CALL FORM_ID_REPEATORDERS with comm_obj, form_obj, client_info_obj;
endif;
endif;
if(form_name is in ("CPOE Behav Health OS","CPOE Gastro OS","CPOE Nephrology OS","CPOE Neuro OS","CPOE Pulmonary OS.","CPOE Urology OS","CPOE_HMD_CommOrder"))then
(comm_obj, form_obj, client_info_obj) := CALL FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS with comm_obj, form_obj, client_info_obj;
(comm_obj, form_obj, client_info_obj) := CALL FORM_SET_RX_MEDICATION_ORDER_MGT with comm_obj, form_obj, client_info_obj;
endif;
if(form_name is in (,"CPOE_GEN_CommDx"))then
(comm_obj, form_obj, client_info_obj) := CALL FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS with comm_obj, form_obj, client_info_obj;
(comm_obj, form_obj, client_info_obj) := CALL FORM_SET_CPOE_PED_COMMONDX_CHAIN with comm_obj, form_obj, client_info_obj;
endif;
if(form_name is in (,"Lab STAT Order Set"))then //removed "ED Diag Order" - for OS Laboratory Orders Scheduled
(comm_obj, form_obj, client_info_obj) := CALL FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS with comm_obj, form_obj, client_info_obj;
endif;
if(form_name is in ("Lab Common Order Set","Lab Com w Repeat OS"))then
(comm_obj, form_obj, client_info_obj) := CALL FORM_ACS_SAME_DAY_ORDER_REPLACEMENT_OS with comm_obj, form_obj, client_info_obj;
(comm_obj, form_obj, client_info_obj) := CALL FORM_SET_REPEAT_LAB_ORDERS with comm_obj, form_obj, client_info_obj;
endif;
/***--- ADD ANOTHER CALLED MLM DEFINITION HERE ---***/
/*
if(NOT comm_obj.PrimaryObj.CancelOrder)then
(comm_obj, form_obj) := CALL func_<see_above_definition> with comm_obj, form_obj, client_info_obj;
endif;
*/
;;
evoke:
// no evokin event for called MLM
;;
logic:
conclude true; // always, to return object values
;;
action:
//return communication and form objects
return comm_obj, form_obj;
;;
end: