Files
St.Clair/MLMStripper/bin/Debug/FORM/FORM_SET_KCENTRA.mlm

191 lines
8.6 KiB
Plaintext

maintenance:
title: Form_Kcentra;;
mlmname: Form_Set_Kcentra;;
arden: version 2.5;;
version: 6.10;;
institution: SCH ;;
author: Shivprasad Jadhav;;
specialist: Shivprasad Jadhav, Allscripts;;
date: 2015-01-15;;
validation: testing;;
library:
purpose: Ø On the grid “Select on the basis of INR” user should be able to select only one “4F-PCC” i.e. if the user select any “4F-PCC” then the other should get disabled;;
explanation:
Change History
-----------------
07.07.2015 SJ CSR# 32480 : Created
11.09.2015 TMS Updated MLM to only populate order set information boxes, No other functionality.
Moved to production 11/9/2015 CSR 32480
05.02.2018 TMS CSR 36420 Updated MLM to include button for allowing physician to choose between
Warfarin reversal using INR values or NOAC reversal using 50 units/kg. Updated
info boxes with dose capping values and calculation info for NOACs
06.26.2018 TMS CSR 36420 Updated message when no weight available if referenced from another order
set and precheck Warfarin reversal or NOAC reversal when called from hemorrhagic stroke
order set based upon selection on parent order set.
;;
keywords:
;;
citations:
;;
knowledge:
type: data-driven;;
data:
standard_libs := MLM {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
include standard_libs;
(this_communication, // Communication object
this_form, // Form object
client_info_obj //Arden ClientInfo object
) := argument;
field_list:= this_form.Fields;
Client_GUID := this_communication.ClientGUID;
ClientVisit_GUID := this_communication.ClientVisitGUID;
Chart_GUID := this_communication.ChartGUID;
form_name := this_form.Name;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
Primary_object := this_communication.PrimaryObj;
ParentOrderSet := this_communication.ParentOrderSetGUID;
OrderSetName := Primary_Object.OrderSetName;
Indication := First of ( field_list where field_list.DataItemName = "AdminInstructions" And field_list.Control_MultiFieldOccNum = 1 ) ;
ContraInd := First of ( field_list where field_list.DataItemName = "AdminInstructions" and field_list.Control_MultiFieldOccNum = 2 ) ;
NOACIndication := First of ( field_list where field_list.DataItemName = "AdminInstructions" And field_list.Control_MultiFieldOccNum = 3 ) ;
WarfarinReversal := Last of ( field_list where field_list.DataItemName = "PRX_WarfarinReversal" And field_list.Control_MultiFieldOccNum = 1 ) ;
NOACReversal := last of ( field_list where field_list.DataItemName = "PRX_NOACReversal" And field_list.Control_MultiFieldOccNum = 1 ) ;
VitaminK_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 49 );
VitaminK_Grid_Value := VitaminK_Grid.Value;
VitaminK := first of ( VitaminK_Grid_Value WHERE VitaminK_Grid_Value.Name = "Phytonadione:" );
KCentra_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 50 );
KCentra_Grid_Value := Kcentra_Grid.Value;
Kcentra := first of ( Kcentra_Grid_Value WHERE Kcentra_Grid_Value.Name = "4F-PCC" );
Lab_CB1 := first of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckbox" AND field_list.Control_MultiFieldOccNum = 1 );
Lab_CB1_Value := Lab_CB1.value;
PT_INR1 := first of ( Lab_CB1_Value WHERE Lab_CB1_Value.Name = "Prothrombin/INR" );
Lab_CB2 := first of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckbox" AND field_list.Control_MultiFieldOccNum = 2 );
Lab_CB2_Value := Lab_CB2.value;
PT_INR2 := first of ( Lab_CB2_Value WHERE Lab_CB2_Value.Name = "Prothrombin/INR" );
HtWt := First of ( field_list where field_list.DataItemName = "CombinedMeasurements" AND field_list.Control_MultiFieldOccNum = 1 );
Val_Wt := HtWt.Value.WEIGHT;
// check weight Value for Patient and Give warning message
Wt := Val_Wt ;
If (Wt is 0 and callingevent = "FormOpen") then
If this_communication.ParentOrderSetGUID is null then
Void := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Please enter a weight for this patient" ,"Sunrise Clinical Manager", "OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}},"Warning" as {{{SINGLE-QUOTE}}}MessageBoxIcon{{{SINGLE-QUOTE}}};
else
Void := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Please open the order set and enter a weight for this patient" ,"Sunrise Clinical Manager", "OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}},"Warning" as {{{SINGLE-QUOTE}}}MessageBoxIcon{{{SINGLE-QUOTE}}};
endif;
Endif;
CR := 13 formatted with "%c";
LF := 10 formatted with "%c";
CRLF:= CR||LF;
TAB := 9 formatted with "%c";
if ( CallingEvent = "FormOpen" ) then
Indication.Value := "Emergent reversal of warfarin when INR is >= 2 AND patient has life-threatening bleeding AND/OR need for emergent surgery or invasive intervention." || CRLF
|| TAB || "INR 2 to 3.9: " || TAB || "25 units/kg" || TAB || "Dose not to exceed 2500 units." || CRLF
|| TAB || "INR 4 to 5.9: " || TAB || "35 units/kg" || TAB || "Dose not to exceed 3500 units." || CRLF
|| TAB || "INR 6 or greater:" || TAB || "50 units/kg" || TAB || "Dose not to exceed 5000 units. ";
ContraInd.Value := "Disseminated Intravascular Coagulation (DIC) "|| CRLF
|| "History of Heparin-Induced Thrombocytopenia (HIT) " || CRLF
|| "Hypersensitivity to any components of Prothrombin Complex Concentrate " ;
NOACIndication.Value := "For Apixaban, Edoxaban, Rivaroxaban. NOT indicated for Dabigatran" || CRLF || CRLF
|| TAB || "50 units/kg" || TAB || "Dose not to exceed 5000 units." ;
VitaminK.IsReadOnly := True;
KCentra.IsReadOnly := True;
If ParentOrderSet is not null and OrderSetName = "Prothrombin Complex Concentrate for Emergent Anticoagulant Reversal" then
WarfarinReversal.Value := true;
Elseif ParentOrderSet is not null and OrderSetName = "Prothrombin Complex Concentrate for Emergent Anticoagulant Reversal" then
NoacReversal.value := true;
Endif;
EndIf; /// Form Opening Event End
If ( CallingEvent = "FormOpen" ) or (CallingEvent = "FieldChange") then
If ((CallingField = "PRX_WarfarinReversal|1" and WarfarinReversal.Value= True)
or (CallingEvent = "FormOpen" and WarfarinReversal.Value = True)) then
NoacReversal.value := false;
VitaminK.IsReadOnly := False;
KCentra.IsReadOnly := False;
VitaminK.IsSelected := True;
KCentra.Isselected := True;
PT_INR1.Isselected := True;
PT_INR2.Isselected := True;
elseif ((CallingField = "PRX_NoacReversal|1" and NOACReversal.Value = True)
or (CallingEvent = "FormOpen" and NOACReversal.Value = True)) then
WarfarinReversal.Value := false;
VitaminK.IsReadOnly := True;
KCentra.IsReadOnly := False;
VitaminK.IsSelected := False;
KCentra.Isselected := True;
PT_INR1.Isselected := False;
PT_INR2.Isselected := False;
elseif (CallingField = "PRX_NoacReversal|1" and NOACReversal.Value = False) then
WarfarinReversal.Value := true;
VitaminK.IsReadOnly := False;
KCentra.IsReadOnly := False;
VitaminK.IsSelected := True;
KCentra.Isselected := True;
PT_INR1.Isselected := True;
PT_INR2.Isselected := True;
elseif (CallingField = "PRX_WarfarinReversal|1" and WarfarinReversal.Value =False) then
NoacReversal.value := true;
VitaminK.IsReadOnly := True;
KCentra.IsReadOnly := False;
VitaminK.IsSelected := False;
KCentra.Isselected := True;
PT_INR1.Isselected := False;
PT_INR2.Isselected := False;
else
VitaminK.IsReadOnly := True;
KCentra.IsReadOnly := True;
VitaminK.IsSelected := False;
KCentra.Isselected := False;
PT_INR1.Isselected := False;
PT_INR2.Isselected := False;
endif;
endif;
If ( CallingEvent = "FormClose" ) then
If (WarfarinReversal.Value = False and NoacReversal.Value = False) then
this_communication.DisplayForm := "Yes";
this_communication.Message := "Please select Warfarin Reversal or NOAC Reversal.";
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;
;;
priority: 50
;;
evoke:
;;
logic: conclude true;
;;
action: return this_communication, this_form;
;;
Urgency: 50;;
end: