Initial Checking with all 820 MLMs
This commit is contained in:
94
MLMStripper/bin/Debug/SCH/SCH_DISCONTINUE_HELD_ORDERS.mlm
Normal file
94
MLMStripper/bin/Debug/SCH/SCH_DISCONTINUE_HELD_ORDERS.mlm
Normal file
@@ -0,0 +1,94 @@
|
||||
maintenance:
|
||||
|
||||
title: Discontinue of held ordersRelease check for orders without schedules;;
|
||||
filename: SCH_Discontinue_Held_Orders;;
|
||||
arden: version 4.5;;
|
||||
version: 2.00;;
|
||||
institution: St Clair;;
|
||||
author: Teresa Spicuzza;;
|
||||
specialist: Don Warnick;;
|
||||
date: 2010-10-19;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: When discontinuing a held order, alert the user
|
||||
;;
|
||||
explanation: Returns a message box to the user when a held order is discontinued.
|
||||
|
||||
change history
|
||||
|
||||
10.19.2010 DW Created
|
||||
08.27.2018 TMS HD #3351839 Added logic to ignore alert if order being discontinued is part of the Anesthesia Post Op Orders.
|
||||
|
||||
;;
|
||||
keywords: Discontinue, hold, order
|
||||
;;
|
||||
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;
|
||||
|
||||
// Set the text for this variable to indicate whether to send the message or not.
|
||||
send_alert := "DoNotSend";
|
||||
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// local_session := cds_session.local;
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
visit_alert:= destination { Alert: Warning, "DC/Cancel Held Order", high, chart, "DC/Cancel Held Order", 14005, send_alert};
|
||||
|
||||
on_order_Cancel := event { OrderCancel Any Order };
|
||||
on_order_DC := event { OrderDiscontinue Any Order };
|
||||
|
||||
(backup_obj) := read last {Order: Backup REFERENCING EvokingObject};
|
||||
(Bk_VisitStatus) := read last {Order: OrderStatusCode REFERENCING backup_obj};
|
||||
|
||||
if Bk_VisitStatus = "HOLD" then
|
||||
|
||||
SurgOrder:= read last {" Select uod.value from CV3Order o
|
||||
join CV3OrderUserData uod on uod.OrderGUID = o.GUID
|
||||
where o.guid = " || evokingobject.guid ||" and o.ClientGUID = " ||EVOKINGOBJECT.ClientGUID ||" and o.ClientVisitGuid = " || EVOKINGOBJECT.ClientVisitGUID || "
|
||||
and ((uod.UserDataCode = {{{SINGLE-QUOTE}}}MLM_OpsuOrderfor AutoDC{{{SINGLE-QUOTE}}} or uod.UserDataCode = {{{SINGLE-QUOTE}}}MLM_SurgOrderfor AutoDC{{{SINGLE-QUOTE}}}) and uod.Value = {{{SINGLE-QUOTE}}}1{{{SINGLE-QUOTE}}})
|
||||
and o.TypeCode in ({{{SINGLE-QUOTE}}}Medication{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}Other{{{SINGLE-QUOTE}}})
|
||||
and o.OrderStatusCode not in ({{{SINGLE-QUOTE}}}DISC{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}COMP{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CANC{{{SINGLE-QUOTE}}})"};
|
||||
|
||||
endif;
|
||||
|
||||
;;
|
||||
evoke: on_order_DC or on_order_Cancel ;
|
||||
;;
|
||||
logic:
|
||||
/*
|
||||
if local_session.SessionReleseOrderAlertFired is null then
|
||||
local_session.SessionReleseOrderAlertFired := "has fired";
|
||||
conclude true;
|
||||
endif;
|
||||
|
||||
*/
|
||||
if Bk_VisitStatus = "HOLD" and SurgOrder is null then
|
||||
|
||||
conclude true;
|
||||
|
||||
endif;
|
||||
|
||||
;;
|
||||
action:
|
||||
|
||||
|
||||
|
||||
write "You are discontinuing a held order. \n\n {{+B}}Go Back:{{-B}} This is a held order that needs an administration date/ time change; select Go Back and use the Release and Change Date function. \n\n {{+B}}Proceed:{{-B}} If the intention is to discontinue this order for example it is a duplicate order; select Proceed. " at visit_alert;
|
||||
// dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "You are discontinuing a held order." ,"Discontinue Held Order Reminder","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
||||
|
||||
;;
|
||||
|
||||
end:
|
||||
Reference in New Issue
Block a user