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,136 @@
maintenance:
title: Copy Route to WORx Route;;
filename: FORM_populate_WORxroute_with_OrderRouteCode;;
arden: version 2;;
version: 4.50;;
institution: Eclipsys, System MLM;;
author: Teresa Spicuzza, Eclipsys;;
specialist: ;;
date: 2006-06-10;;
validation: testing;;
library:
purpose: This MLM copies the value of the WORx route with the value of the OrderRouteCode
on injectable medications with multiple injectable selections.
;;
explanation: This MLM takes the data sent to CDS from Med order form fields in the Forms and
Communications objects and copies it to another field within the form.
The MLM is not run from a trigger event, but rather is called by the application.
It should be configured to run on Field change.
History:
05.30.2018 TMS CSR 36460 Add alert box for route of IM when platelet count < 50.
;;
keywords: Called MLMs, WORx, Route ;;
knowledge:
type: data-driven;;
data:
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
include standard_libs;
using "ObjectsPlusXA.SCM.Forms";
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
// This MLM is passed three arguments, of types
// communication_type, form_type and client info object respectively.
(this_communication, // Communication object
this_form, // Form object
client_info_obj //Arden ClientInfo object
) := argument;
ClientGuid := this_communication.ClientGUID;
ChartGuid := this_communication.ChartGUID;
ClientVisitGuid := this_communication.ClientVisitGUID;
/*******************Make Changes To Spelling And Flags In This Section*******************/
/* Set to true if a decision.log is needed.*/
log_execution_info := FALSE;
/***************************************************************************************/
// Initialize error message
error_message:="";
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
// This sets the value of the WORx route to the value entered for the route.
Route_field := first of (field_list where field_list.DataItemName = "OrderRouteCode" );
WORxRoute_field := first of (field_list where field_list.DataItemName = "PRX_WORx_Route");
If Route_field.value ="SQ"
then
WORxRoute_field.value := "SQ";
elseif Route_field.value = "IM"
then
WORxRoute_field.value := "IM";
LabName, LabValue, LabUom, LabDone, LabAbn := read last
{"Select top 1 bo.ItemName, bo.value, bo.UnitOfMeasure, o.performeddtm, bo.AbnormalityCode "
|| " From cv3order as o with (nolock) "
|| " join cv3basicobservation as bo with (nolock) "
|| " on o.clientguid = bo.clientguid "
|| " and o.chartguid = bo.chartguid "
|| " and o.guid = bo.orderguid "
|| " and bo.status = {{{SINGLE-QUOTE}}}F{{{SINGLE-QUOTE}}} "
|| " and bo.Active = 1 "
|| " And bo.IsHistory = 0 "
|| " join cv3ordercatalogmasteritem as ocmi with (nolock) "
|| " on ocmi.guid = o.ordercatalogmasteritemguid "
|| " and ocmi.active = 1 "
|| " where o.clientguid = " || SQL(ClientGuid)
|| " and o.performeddtm >= (DATEADD(hour, -72, getdate())) "
|| " and bo.itemname = {{{SINGLE-QUOTE}}}Platelet Count{{{SINGLE-QUOTE}}} "
|| " order by o.performeddtm desc "
};
If (LabValue as number) < 50.0 or LabAbn = "LL" then Lo_Platelet := true; else Lo_Platelet := false; endif;
If Lo_Platelet = true then
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n AVOID IM INJECTIONS. \n\n " || LabName || " is " || LabValue || " " || LabUom || " Drawn: " || LabDone ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
endif;
elseif Route_field.value = "IV PUSH"
then
WORxRoute_field.value := "IV";
elseif Route_field.value = "IVPB"
then
WORxRoute_field.value := "IV";
elseif Route_field.value = "Intradermally"
then
WORxRoute_field.value := "ID";
elseif Route_field.value = "Intrathecally"
then
WORxRoute_field.value := "IT";
elseif Route_field.value = "Intra-articular"
then
WORxRoute_field.value := "IA";
// else
// WORxRoute_field.value := "IJ";
endif;
;;
evoke: // No evoke statement
;;
logic:
conclude true;
;;
action:
// This MLM returns two parameters, of types communication_type and form_type respectively.
return this_communication, this_form;
;;
end: