Initial Checking with all 820 MLMs
This commit is contained in:
130
MLMStripper/bin/Debug/SYS/SYS_TASK_ERROR.mlm
Normal file
130
MLMStripper/bin/Debug/SYS/SYS_TASK_ERROR.mlm
Normal file
@@ -0,0 +1,130 @@
|
||||
maintenance:
|
||||
|
||||
title: Task Error Message;;
|
||||
mlmname: SYS_TASK_ERROR;;
|
||||
arden: version 2.5;;
|
||||
version: 18.4;;
|
||||
institution: Allscripts, System 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 will evaluate the information in a virtual field of the OrderTask
|
||||
object to determine if an alert should be written to the database.
|
||||
Current alerts include:
|
||||
- Error on calculating task stop date.
|
||||
|
||||
;;
|
||||
explanation:
|
||||
;;
|
||||
keywords: task error message, stop date error
|
||||
;;
|
||||
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;
|
||||
|
||||
// Change the message within first set of quotes for different alert review short-message.
|
||||
task_alert:= destination { Alert: Reminder, "Order Stop Date Error", medium, chart,
|
||||
"Task Error Message", 1005 };
|
||||
|
||||
// Change the spelling within the quotes to match the order item-catalog.
|
||||
any_new_task:= event {OrderTaskEnter Any
|
||||
OrderTask:
|
||||
WHERE TaskAlertMessage is not NULL};
|
||||
|
||||
any_modified_task:= event {OrderTaskModify Batch
|
||||
OrderTask:
|
||||
WHERE TaskAlertMessage is not NULL};
|
||||
|
||||
any_rescheduled_task:= event {OrderTaskReschedule Batch
|
||||
OrderTask:
|
||||
WHERE TaskAlertMessage is not NULL};
|
||||
|
||||
/********************************************************************************/
|
||||
|
||||
/* Execute only when this MLM is called by the editor */
|
||||
if called_by_editor then
|
||||
task_obj:= read first
|
||||
{OrderTask: This
|
||||
WHERE OrderNameSummaryLine = "TaskMed 01 - scheduled 1 Q4H"
|
||||
};
|
||||
EvokingObject:= task_obj;
|
||||
endif;
|
||||
|
||||
// Get the Client GUID
|
||||
client_guid := read last {ClientInfo: GUID};
|
||||
|
||||
// Get information from the evoking OrderTask
|
||||
(task_name,
|
||||
task_guid,
|
||||
task_order_name_summary_line,
|
||||
task_start_dtm,
|
||||
task_order,
|
||||
task_order_guid,
|
||||
task_catalog_item_task_guid,
|
||||
task_schedule_type_code,
|
||||
task_process_type,
|
||||
task_state,
|
||||
task_processing_in_progess,
|
||||
task_is_current,
|
||||
task_back_up_obj,
|
||||
task_alert_message ) := read last
|
||||
{OrderTask: TaskName, GUID, OrderNameSummaryLine, StartDtm, Order, OrderGUID,
|
||||
CatalogItemTaskGUID, ScheduleTypeCode, ProcessType, TaskState, ProcessingInProgress,
|
||||
IsCurrent, Backup , TaskAlertMessage
|
||||
REFERENCING EvokingObject};
|
||||
|
||||
// Initialize text string
|
||||
task_message_text := "";
|
||||
|
||||
if exist task_start_dtm then
|
||||
start_dtm_formatted := task_start_dtm formatted with "%.4t";
|
||||
else
|
||||
start_dtm_formatted := "";
|
||||
endif;
|
||||
|
||||
;;
|
||||
evoke: any_new_task or any_modified_task or any_rescheduled_task;
|
||||
|
||||
;;
|
||||
logic:
|
||||
if exists task_alert_message then
|
||||
task_message_text := "There is a problem calculating the stop date "
|
||||
||"for the following order: "
|
||||
||"\n {{+B}}{{+C}} " || task_order_name_summary_line
|
||||
|| "{{-B}}{{-C}}"
|
||||
|| "\n" || " started on " || start_dtm_formatted
|
||||
|| "\n\n" || "The problem is: "
|
||||
|| "\n" || task_alert_message;
|
||||
conclude TRUE;
|
||||
|
||||
else
|
||||
conclude FALSE;
|
||||
endif;
|
||||
|
||||
;;
|
||||
action:
|
||||
write task_message_text at task_alert;
|
||||
;;
|
||||
end:
|
||||
Reference in New Issue
Block a user