328 lines
17 KiB
Plaintext
328 lines
17 KiB
Plaintext
maintenance:
|
|
|
|
title: FORM_SET_HEMORRHAGIC_STROKE_OS;;
|
|
mlmname: FORM_SET_HEMORRHAGIC_STROKE_OS;;
|
|
arden: version 2.5;;
|
|
version: 15.10;;
|
|
institution: St Clair Hospital;;
|
|
author: Shivprasad Jadhav, Allscripts ;;
|
|
specialist: Dr. Janardhan Chavan, Allscripts;;
|
|
date: 2016-05-09;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: When user selects any UDDI or gets checked from user, then respective item should get selected from below grid,
|
|
and there are some orders which should be grayed out for this details please refer to Details Tab and Screen Shot tab
|
|
;;
|
|
|
|
explanation: This MLM is called from Hemorrhagic Stroke Order Set
|
|
|
|
Change history
|
|
------------------------------------------------------------------------------------
|
|
06.01.2017 SSJ CSR 35323: Created for Hemorrhagic Stroke Order Set
|
|
06.21.2018 TMS CSR 36420: Add copy of Hemorrhagic Stroke Order Set to allow prechecking of
|
|
Warfarin Reversal or NOAC Reversal to enable correct logic on called order
|
|
set depending upon option selected on Parent Order Set.
|
|
|
|
;;
|
|
keywords: Called MLMs, Hemorrhagic Stroke
|
|
;;
|
|
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;
|
|
PrimaryObjdetail:=this_communication.PrimaryObj;
|
|
OrderSetName := PrimaryObjdetail.OrderSetName;
|
|
|
|
/*******************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:="";
|
|
BaseMLM := MLM {{{SINGLE-QUOTE}}}FORM_MEDICAL_IMAGING_INDICATIONS_FOR_OS{{{SINGLE-QUOTE}}} ;
|
|
enable_chkbx_mlm := mlm {{{SINGLE-QUOTE}}}FORM_Func_Disable_OS_Checkboxes{{{SINGLE-QUOTE}}};
|
|
|
|
exceptFld := ();
|
|
FFPSel := 0 ;
|
|
|
|
// Assigns fields passed in the Form object to the Field object
|
|
field_list:= this_form.fields;
|
|
CallingEvent := this_communication.CallingEvent;
|
|
CallingField := this_communication.CallingFieldName;
|
|
|
|
//Define fields
|
|
Chk_Phyto := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 1 );
|
|
Chk_KCentra1 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 2 );
|
|
Chk_FFP1 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 3 );
|
|
|
|
Chk_KCentra2 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 4 );
|
|
Chk_FFP2 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 5 );
|
|
|
|
Chk_Idaruci := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 6 );
|
|
Chk_FFP3 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 7 );
|
|
|
|
Chk_Prota := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 8 );
|
|
Chk_FFP4 := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 9 );
|
|
|
|
Order_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 62 );
|
|
Order2_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 68 );
|
|
FFP_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 69 );
|
|
Order_Grid_Value := Order_Grid.Value;
|
|
Order2_Grid_Value := Order2_Grid.Value;
|
|
FFP_Grid_Value := FFP_Grid.Value;
|
|
|
|
G_Phyto := first of ( Order_Grid_Value WHERE Order_Grid_Value.Name = "Phytonadione:" );
|
|
G_Prota := first of ( Order_Grid_Value WHERE Order_Grid_Value.Name Matches Pattern "Protamine%" );
|
|
G_Prothro := Order2_Grid_Value[1] ; //Name = "Prothrombin Complex Concentrate for Emergent Warfarin Reversal" For Warfarin Reversal
|
|
G_Prothro2 := Order2_Grid_Value[2] ; //Name = "Prothrombin Complex Concentrate for Emergent Warfarin Reversal" For NOAC Reversal
|
|
G_Idaruci := Order2_Grid_Value[3] ; //Name = "Idarucizumab 5gm"
|
|
G_FFP := FFP_Grid_Value[1] ; // Name = "FFP Orders"
|
|
|
|
|
|
|
|
if ( CallingEvent = "FormOpen" ) then
|
|
//To Call Base MLM
|
|
(this_communication, this_form) := call BaseMLM WITH this_communication, this_form, client_info_obj;
|
|
|
|
for item IN Order_Grid_Value do
|
|
item.IsReadonly := true;
|
|
enddo;
|
|
for item IN Order2_Grid_Value do
|
|
item.IsReadonly := true;
|
|
enddo;
|
|
for item IN FFP_Grid_Value do
|
|
item.IsReadonly := False;
|
|
enddo;
|
|
endif;
|
|
|
|
if ( CallingEvent = "FieldChange" ) then
|
|
|
|
|
|
//********** Phytonadione ********************
|
|
if ( CallingField = "PRX_Checkbox1|1" ) then
|
|
fieldValue := Chk_Phyto.Value;
|
|
|
|
exceptFld := exceptFld, CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
Chk_FFP4.DataItemName || "|" || Chk_FFP4.Control_MultiFieldOccNum ;
|
|
If Chk_FFP1.Value = True Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP2.Value = True Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP3.Value = True Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If FFPSel = 0 Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; EndIf;
|
|
|
|
if ( fieldValue = true ) then
|
|
|
|
G_Phyto.IsSelected := true ;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
G_Phyto.IsSelected := False;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
//************** KCentra Order **************
|
|
if ( CallingField = "PRX_Checkbox1|2" ) then
|
|
fieldValue := CHK_KCentra1.Value;
|
|
exceptFld := exceptFld, CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
Chk_FFP4.DataItemName || "|" || Chk_FFP4.Control_MultiFieldOccNum ;
|
|
If Chk_FFP1.Value = True Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP2.Value = True Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP3.Value = True Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If FFPSel = 0 Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; EndIf;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_Prothro.IsSelected := True;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
G_Prothro.IsSelected := False;
|
|
|
|
if ( CHK_KCentra2.Value = false ) then
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
endif;
|
|
|
|
|
|
if ( CallingField = "PRX_Checkbox1|4" ) then
|
|
fieldValue := CHK_KCentra2.Value;
|
|
exceptFld := exceptFld, CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
Chk_FFP4.DataItemName || "|" || Chk_FFP4.Control_MultiFieldOccNum ;
|
|
If Chk_FFP1.Value = True Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP2.Value = True Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP3.Value = True Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If FFPSel = 0 Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; EndIf;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_Prothro2.IsSelected := True;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
G_Prothro2.IsSelected := False;
|
|
|
|
if ( CHK_KCentra1.Value = false ) then
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
endif;
|
|
|
|
//************** Idarucizumab 2.5 Grams ********************
|
|
if ( CallingField = "PRX_Checkbox1|6" ) then
|
|
fieldValue := Chk_Idaruci.Value;
|
|
|
|
exceptFld := exceptFld, CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
Chk_FFP4.DataItemName || "|" || Chk_FFP4.Control_MultiFieldOccNum;
|
|
If Chk_FFP1.Value = True Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP2.Value = True Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If Chk_FFP3.Value = True Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; FFPSel :=1 ; EndIf;
|
|
If FFPSel = 0 Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; EndIf;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_Idaruci.IsSelected := true;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
G_Idaruci.IsSelected := false;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
//************** Fresh Frozen Plasma ********************
|
|
if ( CallingField = "PRX_Checkbox1|3" ) then
|
|
fieldValue := Chk_FFP1.Value;
|
|
exceptFld := exceptFld, CHK_Phyto.DataItemName || "|" || CHK_Phyto.Control_MultiFieldOccNum,
|
|
CHK_KCentra1.DataItemName || "|" || CHK_KCentra1.Control_MultiFieldOccNum,
|
|
CHK_KCentra2.DataItemName || "|" || CHK_KCentra2.Control_MultiFieldOccNum,
|
|
CHK_Idaruci.DataItemName || "|" || CHK_Idaruci.Control_MultiFieldOccNum,
|
|
CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
CHK_FFP4.DataItemName || "|" || CHK_FFP4.Control_MultiFieldOccNum ;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_FFP.IsSelected := true;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
if ( Chk_FFP2.Value = false And Chk_FFP3.Value = false and Chk_FFP4.Value = false ) then
|
|
G_FFP.IsSelected := False;
|
|
endif;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld ;
|
|
|
|
endif;
|
|
endif;
|
|
if ( CallingField = "PRX_Checkbox1|5" ) then
|
|
fieldValue := Chk_FFP2.Value;
|
|
exceptFld := exceptFld, CHK_Phyto.DataItemName || "|" || CHK_Phyto.Control_MultiFieldOccNum,
|
|
CHK_KCentra1.DataItemName || "|" || CHK_KCentra1.Control_MultiFieldOccNum,
|
|
CHK_KCentra2.DataItemName || "|" || CHK_KCentra2.Control_MultiFieldOccNum,
|
|
CHK_Idaruci.DataItemName || "|" || CHK_Idaruci.Control_MultiFieldOccNum,
|
|
CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
CHK_FFP4.DataItemName || "|" || CHK_FFP4.Control_MultiFieldOccNum ;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_FFP.IsSelected := true;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
if ( Chk_FFP1.Value = false And Chk_FFP3.Value = false and Chk_FFP4.Value = false ) then
|
|
G_FFP.IsSelected := False;
|
|
endif;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld ;
|
|
|
|
endif;
|
|
endif;
|
|
|
|
if ( CallingField = "PRX_Checkbox1|7" ) then
|
|
fieldValue := Chk_FFP3.Value;
|
|
exceptFld := exceptFld, CHK_Phyto.DataItemName || "|" || CHK_Phyto.Control_MultiFieldOccNum,
|
|
CHK_KCentra1.DataItemName || "|" || CHK_KCentra1.Control_MultiFieldOccNum,
|
|
CHK_KCentra2.DataItemName || "|" || CHK_KCentra2.Control_MultiFieldOccNum,
|
|
CHK_Idaruci.DataItemName || "|" || CHK_Idaruci.Control_MultiFieldOccNum,
|
|
CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
CHK_FFP4.DataItemName || "|" || CHK_FFP4.Control_MultiFieldOccNum ;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_FFP.IsSelected := true;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
if ( Chk_FFP1.Value = false And Chk_FFP2.Value = false and Chk_FFP4.Value = false ) then
|
|
G_FFP.IsSelected := False;
|
|
endif;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
if ( CallingField = "PRX_Checkbox1|9" ) then
|
|
fieldValue := Chk_FFP4.Value;
|
|
exceptFld := exceptFld, CHK_Phyto.DataItemName || "|" || CHK_Phyto.Control_MultiFieldOccNum,
|
|
CHK_KCentra1.DataItemName || "|" || CHK_KCentra1.Control_MultiFieldOccNum,
|
|
CHK_KCentra2.DataItemName || "|" || CHK_KCentra2.Control_MultiFieldOccNum,
|
|
CHK_Idaruci.DataItemName || "|" || CHK_Idaruci.Control_MultiFieldOccNum,
|
|
CHK_Prota.DataItemName || "|" || CHK_Prota.Control_MultiFieldOccNum,
|
|
CHK_FFP4.DataItemName || "|" || CHK_FFP4.Control_MultiFieldOccNum ;
|
|
If Chk_FFP1.Value = True Then exceptFld := exceptFld,Chk_FFP1.DataItemName || "|" || Chk_FFP1.Control_MultiFieldOccNum; EndIf;
|
|
If Chk_FFP2.Value = True Then exceptFld := exceptFld,Chk_FFP2.DataItemName || "|" || Chk_FFP2.Control_MultiFieldOccNum; EndIf;
|
|
If Chk_FFP3.Value = True Then exceptFld := exceptFld,Chk_FFP3.DataItemName || "|" || Chk_FFP3.Control_MultiFieldOccNum; EndIf;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_FFP.IsSelected := true;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
|
|
if ( Chk_FFP1.Value = false And Chk_FFP2.Value = false and Chk_FFP3.Value = false ) then
|
|
G_FFP.IsSelected := False;
|
|
endif;
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
|
|
endif;
|
|
endif;
|
|
|
|
//********** Protamine ********************
|
|
if ( CallingField = "PRX_Checkbox1|8" ) then
|
|
fieldValue := Chk_Prota.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
G_Prota.IsSelected := true ;
|
|
//rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
G_Prota.IsSelected := False;
|
|
|
|
//rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
endif; //End FieldChange
|
|
|
|
;;
|
|
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:
|