Initial Checking with all 820 MLMs
This commit is contained in:
121
MLMStripper/bin/Debug/FORM/FORM_MRSA_SCREENCHECKORDERS.mlm
Normal file
121
MLMStripper/bin/Debug/FORM/FORM_MRSA_SCREENCHECKORDERS.mlm
Normal file
@@ -0,0 +1,121 @@
|
||||
maintenance:
|
||||
|
||||
title: MRSA Order Check;;
|
||||
mlmname: Form_MRSA_ScreenCheckOrders;;
|
||||
arden: version 2;;
|
||||
version: 5.00;;
|
||||
institution: St. Clair Hospital;;
|
||||
author: Teresa M. Spicuzza ;;
|
||||
specialist: Eclipsys Corporation;;
|
||||
date: 2010-12-14;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: Prohibit ordering of MRSA Nasal Screen if one exists, patient has had a positive screen, or patient is not on
|
||||
a screening unit.
|
||||
;;
|
||||
explanation: This MLM will hard stop user from entering an Infection Control MRSA Nasal Screen when one already exists.
|
||||
|
||||
Change history
|
||||
|
||||
12.21.2010 TS Created
|
||||
05.04.2011 TS Added different alert messge if patient has an order pending collection.
|
||||
09.26.2016 TS Added "(OrderedWithin3 = "Yes" and NewOrderBox.Value = true and StatusCode <> "PCOL")" to eliminate
|
||||
users from ordering Nasal Screen via the Copy/Reorder function in SCM. CSR 35095
|
||||
;;
|
||||
keywords:
|
||||
MRSA, Infection Control;
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
// This MLM is passed three arguments, of types
|
||||
// communication_type, form_type and client info object respectively.
|
||||
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
(this_communication, // Communication object
|
||||
this_form, // Form object
|
||||
client_info_obj // Arden ClientInfo object
|
||||
) := argument;
|
||||
|
||||
called_by := this_communication.CallingEvent;
|
||||
ClientGuid := this_communication.ClientGUID;
|
||||
ClientVisitGuid := this_communication.ClientVisitGUID;
|
||||
ChartGuid := this_communication.ChartGuid;
|
||||
|
||||
// Assigns fields passed in the Form object to the Field object
|
||||
field_list:= this_form.fields;
|
||||
|
||||
// Get patient current location
|
||||
CurrentLocation := read last
|
||||
{"Select CurrentLocation "
|
||||
||" From cv3Clientvisit "
|
||||
||" Where Guid = " || SQL(ClientVisitGuid)
|
||||
||" and VisitStatus = {{{SINGLE-QUOTE}}}ADM{{{SINGLE-QUOTE}}}" };
|
||||
|
||||
// Obtain needed data elements from SCH_Func_MRSA_Order
|
||||
MRSA_Rules_MLM := mlm {{{SINGLE-QUOTE}}}SCH_Func_MRSA_Order{{{SINGLE-QUOTE}}};
|
||||
(ScreeningUnit, OrderedToday, OrderedWithin3, PositiveScreen, SigDTM, StatusCode, ResultValue, MRSAHistory, NursingHomeResidency, AntiInfectivewithin7)
|
||||
:= call MRSA_Rules_MLM with (ClientVisitGuid, ChartGuid, ClientGuid, CurrentLocation);
|
||||
|
||||
StopOrderBox := last of (field_list where field_list.DataItemName = "MLM Generic Free Text");
|
||||
NewOrderBox := last of (field_list where field_list.DataItemName = "MLM Generic Checkbox");
|
||||
|
||||
|
||||
//dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n SigDtm: " || SigDTM ||"\n itemevent: " || ItemEvent ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
||||
NextTestDtm := (SigDTM as time) + 3 days;
|
||||
|
||||
If OrderedWithin3 = "Yes" and StatusCode <> "PCOL" then
|
||||
ReasonMessage := "Additional MRSA Nasal Screen does not need performed " ||"\n until " || (NextTestDtm as time) || ".";
|
||||
endif;
|
||||
|
||||
If OrderedWithin3 = "Yes" and StatusCode = "PCOL" then
|
||||
ReasonMessage := "Patient has an MRSA Order pending collection; please add specimen to pending order in SCM.";
|
||||
endif;
|
||||
|
||||
If PositiveScreen = "Yes" then
|
||||
ReasonMessage := "This patient has a positive screening for MRSA, therefore this test does not need ordered.";
|
||||
endif;
|
||||
|
||||
If (PositiveScreen = "Yes") or ((OrderedWithin3 = "Yes" and NewOrderBox.Value = false)) or (OrderedWithin3 = "Yes" and NewOrderBox.Value = true and StatusCode <> "PCOL") then
|
||||
hardstop := "yes";
|
||||
else hardstop := "no";
|
||||
endif;
|
||||
|
||||
//Present user with message box and stop order from being ordered. If order allowed change value of NewOrderBox to True to eliminate
|
||||
//MLM stopping user when trying to status specimen as collected.
|
||||
StopOrderBoxValue:= StopOrderBox.value;
|
||||
If exists StopOrderBox then
|
||||
If hardstop = "yes" then
|
||||
this_communication.DisplayForm := "yes";
|
||||
this_communication.Message := ReasonMessage;
|
||||
this_communication.MessageType := "Error";
|
||||
StopOrderBoxValue.control_mandatory := TRUE;
|
||||
NewOrderBox.value := FALSE;
|
||||
else
|
||||
StopOrderBoxValue.control_mandatory := FALSE;
|
||||
NewOrderBox.value :=TRUE;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
;;
|
||||
|
||||
evoke:
|
||||
;;
|
||||
logic:
|
||||
Conclude true;
|
||||
;;
|
||||
action:
|
||||
// This MLM returns two parameters, of types
|
||||
//communication_type and form_type respectively.
|
||||
return this_communication, this_form;
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user