Initial Checking with all 820 MLMs

This commit is contained in:
2020-02-02 00:54:01 -05:00
parent c59dc6de2e
commit 840d0432f4
828 changed files with 239162 additions and 0 deletions

View File

@@ -0,0 +1,122 @@
maintenance:
title: Check for Release of Haloperidol IV orders;;
filename: SCH_Haloperidol_Held_Orders;;
arden: version 5.5;;
version: 2.00;;
institution: St Clair;;
author: Teresa Spicuzza;;
specialist: Teresa Spicuzza;;
date: 2012-06-05;;
validation: testing;;
library:
purpose: When releasing a held order for haloperidol IV, check to see if patient in monitored bed/unit, if not alert the user
;;
explanation: Returns a message box to the user when a held order for haloperidol iv is released for a patient in a non-moitored bed.
change history
06.05.2012 TMS Created CSR 30783 To Production on 9/25/2012
;;
keywords: Release, hold, order, Haloperidol, monitored bed
;;
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";
MonitoredBed := ("03 CCU","06 SP/Monitored","02 ICU","14 CVSU", "04 IMC");
(ClientVisitGuid, ClientGuid, CurrentLocation, LocationGuid, VisitStatus) := read last
{ClientVisit: GUID, ClientGUID, CurrentLocation, CurrentLocationGUID, VisitStatus };
// Get patient current accomodation
CurrentAccom := read last
{"Select ac.Code "
||" From CV3ClientVisitLocation cvl"
||" Join SXAAMAccommodation ac on ac.AccommodationID = cvl.AccommodationID "
||" Where ClientGuid = " || SQL(ClientGuid)
||" and ClientVisitGuid = " || SQL(ClientVisitGuid)
||" and cvl.Status = {{{SINGLE-QUOTE}}}CUR{{{SINGLE-QUOTE}}}" };
/* Set EvokingObject in editor */
If called_by_editor then
EvokingObject := read last { Order: This };
endif;
/* Get Order data and pointer to MedicationExtension object */
(Order_Name, HaldolReason, MedicationExtension_obj) := read last
{Order: Name, SummaryLine, MedicationExtension
REFERENCING EvokingObject };
/* Get data from the MedicationExtension object */
(HaldolRoute) := read last
{MedicationExtension: OrderRouteCode
REFERENCING MedicationExtension_obj };
//--------------------------------------------------------------------------
// local_session := cds_session.local;
//--------------------------------------------------------------------------
drug_alert:= destination {Alert} with
[alert_type := "Warning",
short_message := "Drug Requiring Monitoring",
Priority := "HIGH",
Scope := "chart",
Rule_group := "Monitored Meds",
rule_number := 18005,
send_with_order := send_alert,
display_alert := TRUE,
alert_dialog_settings := "No Override Allowed" ];
Release_Haldol_trigger:= event {OrderRelease User Order:
where TypeCode = "Medication"
and Name = "Haloperidol Inj" or Name = "Haloperidol:"};
;;
evoke: Release_Haldol_trigger;
;;
logic:
If CurrentAccom in MonitoredBed or HaldolReason matches pattern "%End of Life%" or HaldolRoute = "IM" then
conclude false; else conclude true;
endif;
;;
action:
write "You are releasing a held order for Haloperidol (Haldol) by IV Push or IVPB. Only orders for {{{SINGLE-QUOTE}}}End of Life{{{SINGLE-QUOTE}}} care may administered in a non-monitored bed. \n\n {{+B}}Go Back:{{-B}} Select Go Back and Verify patient has correct accommodation code or Indication for order is {{{SINGLE-QUOTE}}}End of Life Agitation{{{SINGLE-QUOTE}}} or Clarify order with Physician. " at drug_alert;
;;
end: