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,251 @@
maintenance:
title: Intravenous Infliximab Physician Orders;;
mlmname: FORM_Set_Infliximab_Dosing;;
arden: version 2.5;;
version: 16.30;;
institution: St Clair Hospital;;
author: Teresa Spicuzza, Allscripts ext 7448;;
specialist: Teresa Spicuzza, Allscripts ext 7448;;
date: 2018-11-07;;
validation: testing;;
library:
purpose: Used for Intravenous Infliximab (Remicade) or Infliximab-dyyb (Inflectra) Physician Order Set.
;;
explanation: This MLM is called from the Intravenous Infliximab (Remicade) or Infliximab-dyyb (Inflectra) Physician Order Set
Change history
11.07.2018 TMS CSR 36315: Initial build
01.25.2019 TMS CSR 36315: Removed hard stop when no infliximab is entered
;;
keywords: Called MLMs, Infliximab, Remicade, Infliximab-dyyb, Inflectra)
;;
knowledge:
type: data-driven;;
data:
// 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;
/*******************Make Changes To Spelling And Flags In This Section*******************/
/* Set to true if a decision.log is needed.*/
log_execution_info := FALSE;
standard_libs := MLM {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
include standard_libs;
/***************************************************************************************/
// Initialize error message
error_message:="";
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
CR := 13 formatted with "%c";
LF := 10 formatted with "%c";
CRLF:= CR||LF;
TAB := 9 formatted with "%c";
MgPerKg:= last of (field_list where field_list.DataItemName = "PRX_DosePerKg" and field_List.Control_MultiFieldOccNum = 1);
FixedDose:= last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 1);
OrderedDose := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 2);
CalcDose:= last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 2);
TitrateButton:= last of (field_list where field_list.DataItemName = "PRX_Generic_CB" and field_List.Control_MultiFieldOccNum = 1);
DosingInfo:= last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 3);
OrderGrid:= last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 1);
OrderGrid_List := OrderGrid.Value;
RateInfo := last of (field_list where field_list.DataItemName = "AdminInstructions" and field_List.Control_MultiFieldOccNum = 1);
DosingInfo_List := DosingInfo.value;
ReasonMessage := "Please select either Infliximab (Remicade)Order" ||CRLF || "or Infliximab-dyyb (Inflectra)Order to continue.";
DoseInfo1:= last of (field_list where field_list.DataItemName = "PRX_Dosing_Info" and field_List.Control_MultiFieldOccNum = 1);
DoseInfo2:= last of (field_list where field_list.DataItemName = "PRX_Dosing_Info" and field_List.Control_MultiFieldOccNum = 2);
//OrderSetComplete := last of (field_list where field_list.DataItemName = "PRX_Generic_Text_Box" and field_List.Control_MultiFieldOccNum = 2);
//OrderSetComplete.Control_Mandatory := True;
EntryTime := (now as time) ;
GiveMinute := extract minute EntryTime;
GiveHour := extract hour EntryTime;
StandardRate := "Infuse at 125 mL/hr over 2 hours";
Remicade := first of (OrderGrid_List where OrderGrid_List.Name = "Infliximab:");
Inflectra := first of (OrderGrid_List where OrderGrid_List.Name = "Infliximab-dyyb:");
TitrateRate := "Infuse at 10 mL/hr for 15 minutes" || CRLF
|| TAB || " 20 mL/hr for 15 minutes" || CRLF
|| TAB || " 40 mL/hr for 15 minutes" || CRLF
|| TAB || " 80 mL/hr for 15 minutes" || CRLF
|| TAB || "150 mL/hr for 30 minutes" || CRLF
|| TAB || "250 mL/hr Until the end of therapy";
Info2 := "Titration recommended per providers order: "|| CRLF ||CRLF
|| TAB ||"Infuse at: " || TAB ||" 10 mL/hr for 15 minutes, then" || TAB || TAB ||" 20 mL/hr for 15 minutes, then " || CRLF
|| TAB ||TAB || " 40 mL/hr for 15 minutes, then " || TAB ||" 80 mL/hr for 15 minutes, then " || CRLF
|| TAB ||TAB || "150 mL/hr for 30 minutes, then " || TAB || "250 mL/hr Until the end of therapy";
Info1 := "Standard Infusion Rate:" || CRLF || CRLF
|| TAB || "Infuse at 125 mL/hr over 2 hours";
DoseInfo1.value := Info1;
DoseInfo2.value := Info2;
// Get patient weight
comb_ht_wt_field := first of (field_list where field_list.DataItemName = "CombinedMeasurements");
If exists comb_ht_wt_field then comb_ht_wt_val := comb_ht_wt_field.value;
wt := comb_ht_wt_val.weight;
weightvalue := (wt as number);
needweight := false;
Endif;
If weightvalue is null or weightvalue = 0 then
needweight := true;
AlertingFixedDose := 1500;
else
AlertingFixedDose := ((wt as number) * 10) + 100;
endif;
If CallingEvent = "FieldChange" and CallingField = "CombinedMeasurements|1"
and MgPerKg.value is not null
and FixedDose.value is null then
RawDose := (wt as number) * (MgPerKg.value as number);
OrderedDose.value := int((RawDose + 5)/10) * 10;
endif;
DosingInfo_List.IsReadOnly := (true, true);
If CallingEvent = "FieldChange" and CallingField = "PRX_DosePerKg|1" then
If FixedDose.value is not null then
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "You have already entered a value for FIXED Dosing."
||" \n\n Choose YES to continue with the entered FIXED Dose."
||" \n\n Choose NO to continue with WEIGHT BASED Dosing." ,"Alert","YesNo" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
if((dialogResult as string) = "Yes") then
MgPerKg.value := null;
If (FixedDose.value as number) > (AlertingFixedDose as number) then
dialogResult3 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " The dose you entered, " || FixedDose.value || " mg, is higher than the" || CRLF ||
"recommended dosing for Infliximab. Please verify dose. ", "High Dose Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
endif;
OrderedDose.value := FixedDose.value;
elseif ((dialogResult as string) = "No") then
FixedDose.value := null;
endif;
endif;
If FixedDose.value is null then
If Needweight = true then
dialogResult2 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " Please enter a weight to"|| CRLF ||
"calculate Weight Based Dosing.", "Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
Else
If (MgPerKg.value as number) > 10 then
dialogResult3 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " The dose you entered, " || MgPerKg.value || " mg/kg, is higher than the" || CRLF ||
"recommended dosing for Infliximab. Please verify dose. ", "High Dose Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
endif;
RawDose := (wt as number) * (MgPerKg.value as number);
OrderedDose.value := int((RawDose + 5)/10) * 10;
endif;
endif;
endif;
If CallingEvent = "FieldChange" and CallingField = "DosageLow|1" then
If MgPerKg.value is not null then
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "You have already entered a value for WEIGHT BASED Dosing."
||" \n\n Choose YES to continue with WEIGHT BASED Dosing."
||" \n\n Choose NO to continue with the entered FIXED Dose." ,"Alert","YesNo" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
if((dialogResult as string) = "Yes") then
If Needweight = true then
dialogResult2 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " Please enter a weight to"|| CRLF ||
"calculate Weight Based Dosing.", "Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
Else
If (MgPerKg.value as number) > 10 then
dialogResult2 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " The dose you entered, " || MgPerKg.value || " mg/kg, is higher than the" || CRLF ||
"recommended dosing for Infliximab. Please verify dose. ", "High Dose Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
endif; RawDose := (wt as number) * (MgPerKg.value as number);
OrderedDose.value := int((RawDose + 5)/10) * 10;
FixedDose.value := null;
endif;
elseif ((dialogResult as string) = "No") then
MgPerKg.value := null;
endif;
endif;
If MgPerKg.value is null then
If (FixedDose.value as number) > (AlertingFixedDose as number) then
dialogResult3 := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " The dose you entered, " || FixedDose.value || " mg, is higher than the" || CRLF ||
"recommended dosing for Infliximab. Please verify dose. ", "High Dose Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
endif;
OrderedDose.value := FixedDose.value;
endif;
endif;
If CallingEvent = "FieldChange" and CallingField = "PRX_Generic_CB|1" then
If TitrateButton.value = true then
RateInfo.value := TitrateRate;
Else RateInfo.value := StandardRate;
endif;
endif;
If CallingField = "MultiOrderGrid|1" then
If Remicade.IsSelected = true then
Inflectra.IsSelected := false;
Inflectra.IsReadOnly := true;
Elseif Inflectra.IsSelected = true then
Remicade.IsSelected := false;
Remicade.IsReadOnly := true;
else
Remicade.IsSelected := false;
Remicade.IsReadOnly := false;
Inflectra.IsSelected := false;
Inflectra.IsReadOnly := false;
endif;
endif;
If Remicade.IsSelected = False and Inflectra.IsSelected = False then
hardstop := "no";
// changed to remove hardstop as they enter pre med orders before the patient is arrived and weighed and then
// go back into the order set to enter the infliximab. TMS 01/25/2019
// hardstop := "yes";
else hardstop := "no";
endif;
ReasonMessage := "Please select Infliximab (Remicade) or Infliximab-dyyb (Inflectra) to continue.";
If callingevent = "FormClose" then
If hardstop = "yes" then //Present user with message box and stop order set from being submitted.
this_communication.DisplayForm := "yes";
this_communication.Message := ReasonMessage;
this_communication.MessageType := "Error";
else
Med_Order_Mgt := mlm {{{SINGLE-QUOTE}}}FORM_SET_Rx_Medication_Order_Mgt{{{SINGLE-QUOTE}}};
(this_communication, this_form) := call Med_Order_Mgt with this_communication, this_form, client_info_obj;
endif;
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: