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,660 @@
maintenance:
title: Set Heparin NurseOrders;;
mlmname: FORM_SET_ED_Common_Orders;;
arden: version 2;;
version: 4.50;;
institution: St Clair Admissions;;
author: Robert Spence, Eclipsys Corp Ext 7461;;
specialist: Teresa Spicuzza, Eclipsys Corp ext 7448;;
date: 2008-05-20;;
validation: testing;;
library:
purpose: Used for medication grids that holds heparin in Blood Formation Coagulation Order Set
;;
explanation: This MLM is called from the Blood Formation Coagulation With heparin order set
Change history
03.25.2009 DW Added session object code to recall the answer to the pregnancy questions and populate them on other forms during the session
09.27.2010 TMS Added routine for Hold session date handling
11.24.2010 DW Altered to enter escort order if MI item with the escort class has been selected
07.20.2011 TMS Added handling for additional instruction in orderset
06.20.2012 TMS Added additional call to FORM_MEDICAL_IMAGING_INDICATIONS_FOR_OS{{{SINGLE-QUOTE}}} on form open to retrieve diabetic health issues and
iodine allergies to autopopulate questions on order set form when found. CSR 22904
02.09.2015 TMS Commented out references to Spontaneous Aerosol paging to support new process using transmission policies. CSR 33099
04.26.2016 TMS Add call on form Close to Medication Order Management MLM CSR 33465
;;
keywords: Called MLMs, Blood Formation , ED
;;
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;
/***************************************************************************************/
// Initialize error message
error_message:="";
// Use String parse
str_parse := mlm {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}};
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
client_guid := this_communication.ClientGUID;
visit_guid := this_communication.ClientVisitGUID;
chart_guid := this_communication.ChartGuid;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
//--------------------------------------------------------------------------
local_session := cds_session.local;
//--------------------------------------------------------------------------
Pregnancy_History := last of (field_list where field_list.DataItemName = "MI_LV_MI Yes No Pregnacy" and field_List.Control_MultiFieldOccNum = 1);
indications1 := last of (field_list where field_list.DataItemName = "ED_MI_ClinInd1" and field_List.Control_MultiFieldOccNum = 1 );
indications2 := last of (field_list where field_list.DataItemName = "ED_MI_ClinInd2" and field_List.Control_MultiFieldOccNum = 1 );
comb_ht_wt_fld := first of (field_list
where field_list.DataItemName = "CombinedMeasurements");
///////////////// Lab base lines
Labs_fld := last of (field_list where field_list.DataItemName = "MultiOrderCheckBox"
and field_List.Control_MultiFieldOccNum = 14);
Labs_List := Labs_fld.Value;
//Find the three checkboxes that may need to be ordered with this protocol
Found_Base_CBC:= first of (Labs_list where Labs_list.Name = "CBC (Includes Diff)");
Found_Base_INR:= first of (Labs_list where Labs_list.Name = "Prothrombin/INR");
Found_Base_APTT:= first of (Labs_list where Labs_list.Name = "APTT");
CheckAPTT:=False;
CheckCBC:=False;
CheckINR:=False;
//////////////////////////////// Nursing notes
Mlt_Order_Line:= first of (field_list where field_list.DataItemName = "MultiOrderInline"
and field_List.Control_MultiFieldOccNum = 1);
Mlt_List := Mlt_Order_Line.Value;
/////////////////////////// Protocol quick select check boxes, only one enables at a time.
Card_Prot_W_Bolus := first of (field_list where field_list.DataItemName = "PRX_Heparin_CCM_withBolus");
Card_Prot_N_Bolus := first of (field_list where field_list.DataItemName = "PRX_Heparin_CCM_w-oBolus");
Weight_Prot_W_Bolus := first of (field_list where field_list.DataItemName = "PRX_Heparin_WB_withBolus");
Weight_Prot_N_Bolus := first of (field_list where field_list.DataItemName = "PRX_Heparin_WB_w-oBolus");
///////////////// Cardiac Protocol With Bolus Grid
CP_WB_Grid := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 7);
CP_WB_List :=CP_WB_Grid.Value;
Fnd_CP_WB := first of (CP_WB_List where CP_WB_List.Name = "Heparin Inj.");
Fnd_CP_WB.IsReadOnly := True;
///////////// Cardiac Protocol With No Bolus Grid
CP_NB_Grid := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 8);
CP_NB_List :=CP_NB_Grid.Value;
Fnd_CP_NB := first of (CP_NB_List where CP_NB_List.Name = "Heparin 25,000 Units+ D5W 500ml");
Fnd_CP_NB.IsReadOnly := True;
/////////////Weight based protocol with bolus Grid
WP_WB_Grid := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 9);
WP_WB_List :=WP_WB_Grid.Value;
Fnd_WP_WB := first of (WP_WB_List where WP_WB_List.Name = "Heparin Inj -");
Fnd_WP_WB.IsReadOnly := True;
///////////// Weight based protocol with no bolus Grid
WP_NB_Grid := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 10);
WP_NB_List :=WP_NB_Grid.Value;
Fnd_WP_NB := first of (WP_NB_List where WP_NB_List.Name = "Heparin 25,000 Units + D5W 500ml");
Fnd_WP_NB.IsReadOnly := True;
/////////////////////////Lab daily orders
Lab_Daily := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 11);
Lab_Daily_List := Lab_Daily.Value;
Fnd_APTT := first of (Lab_Daily_List where Lab_Daily_List.Name = "APTT");
primreqdate:= last of (field_list where field_list.DataItemName = "RequestedDate"
and field_List.Control_MultiFieldOccNum = 1);
secreqdate:= last of (field_list where field_list.DataItemName = "RequestedDate"
and field_List.Control_MultiFieldOccNum = 2);
thirdreqdate:= last of (field_list where field_list.DataItemName = "RequestedDate"
and field_List.Control_MultiFieldOccNum = 3);
fourthreqdate:= last of (field_list where field_list.DataItemName = "RequestedDate"
and field_List.Control_MultiFieldOccNum = 4);
fifthreqdate:= last of (field_list where field_list.DataItemName = "RequestedDate"
and field_List.Control_MultiFieldOccNum = 5);
ED_Loc:= last of (field_list where field_list.DataItemName = "ED Location");
////////////// Lab daily reminder orders
Lab_Rem := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 12);
Lab_Rem_List := Lab_Rem.Value;
Fnd_Daily := first of (Lab_Rem_List where Lab_Rem_List.Name = "Daily Orders:");
/////////////////////// Comment section to hold list of CBC per associated to the grid
prx_comment := last of (field_list where field_list.DataItemName = "PRX_NOTECOMMENT0");
//////////// Order from and two summary, mapped to daily order reminders
Order_From := last of (field_list where field_list.DataItemName = "NUR_DateField");
Order_To := last of (field_list where field_list.DataItemName = "NUR_ToDate");
// 2.9.2015 removed logic for respiratory page - replaced with new process - TMS
/////////////// Respiratory Page Fields
//Associate Mapped Fields
/*
SpecInst_fld := last of (field_list where field_list.DataItemName = "SpecialInstructions");
//*** Get values from First grid
//*** SA (Albuterol/Atrovent/Xopenex)
SAAAX_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 4);
SAAAX_list :=SAAAX_fld.Value;
SAAAX_Sel :=SAAAX_list.IsSelected;
ED_Resp_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
and field_List.Control_MultiFieldOccNum = 5);
ED_Resp_List := ED_Resp_fld.Value;
ED_Resp_Ord := first of (ED_Resp_List where ED_Resp_List .Name = "ED Respiratory Page");
*/
If CallingEvent = "FieldChange" Then
If CallingField = "PRX_Heparin_CCM_withBolus|1" then
If Card_Prot_W_Bolus.Value = True
then
Card_Prot_N_Bolus.control_read_only := True;
Weight_Prot_W_Bolus.control_read_only := True;
Weight_Prot_N_Bolus.control_read_only := True;
Fnd_CP_WB.IsSelected := True;
Fnd_CP_NB.IsSelected := True;
Mlt_List.IsSelected := (True,False,True,True,True,True,True,True,True);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,True,True,True,True,True);
Fnd_Daily.IsSelected := True;
else
Card_Prot_N_Bolus.control_read_only := False;
Weight_Prot_W_Bolus.control_read_only := False;
Weight_Prot_N_Bolus.control_read_only := False;
Fnd_CP_WB.IsSelected := False;
Fnd_CP_NB.IsSelected := False;
Mlt_List.IsSelected := (False,False,False,False,False,False,False,False,False);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,False,False,False,False,False);
Fnd_Daily.IsSelected := False;
endif;
elseif CallingField = "PRX_Heparin_CCM_w-oBolus|1" then
If Card_Prot_N_Bolus.Value = True
then
Card_Prot_W_Bolus.control_read_only := True;
Weight_Prot_W_Bolus.control_read_only := True;
Weight_Prot_N_Bolus.control_read_only := True;
Fnd_CP_NB.IsSelected := True;
Mlt_List.IsSelected := (True,False,True,True,True,True,True,True,True);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,True,True,True,True,True);
Fnd_Daily.IsSelected := True;
else
Card_Prot_W_Bolus.control_read_only := False;
Weight_Prot_W_Bolus.control_read_only := False;
Weight_Prot_N_Bolus.control_read_only := False;
Fnd_CP_NB.IsSelected := False;
Mlt_List.IsSelected := (False,False,False,False,False,False,False,False,False);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,False,False,False,False,False);
Fnd_Daily.IsSelected := False;
endif;
elseif CallingField = "PRX_Heparin_WB_withBolus|1" then
If Weight_Prot_W_Bolus.Value = True
then
Card_Prot_W_Bolus.control_read_only := True;
Card_Prot_N_Bolus.control_read_only := True;
Weight_Prot_N_Bolus.control_read_only := True;
Fnd_WP_WB.IsSelected:=True;
Fnd_WP_NB.IsSelected:=True;
Mlt_List.IsSelected := (False,True,True,True,True,True,True,True,True);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,True,True,True,True,True);
Fnd_Daily.IsSelected := True;
else
Card_Prot_W_Bolus.control_read_only := False;
Card_Prot_N_Bolus.control_read_only := False;
Weight_Prot_N_Bolus.control_read_only := False;
Fnd_WP_WB.IsSelected:=False;
Fnd_WP_NB.IsSelected:=False;
Mlt_List.IsSelected := (False,False,False,False,False,False,False,False,False);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,False,False,False,False,False);
Fnd_Daily.IsSelected := False;
endif;
elseif CallingField = "PRX_Heparin_WB_w-oBolus|1" then
If Weight_Prot_N_Bolus.Value = True
then
Card_Prot_W_Bolus.control_read_only := True;
Card_Prot_N_Bolus.control_read_only := True;
Weight_Prot_W_Bolus.control_read_only := True;
Fnd_WP_NB.IsSelected:=True;
Mlt_List.IsSelected := (False,True,True,True,True,True,True,True,True);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,True,True,True,True,True);
Fnd_Daily.IsSelected := True;
this_communication.DisplayForm := "Yes";
this_communication.Message := "You have selected {{{SINGLE-QUOTE}}}Weight Based Protocol - No Bolus Dose{{{SINGLE-QUOTE}}}\n\n" ||
"If you do not wish to order a bolus dose Select OK and continue,\n" ||
"If you intended to order the bolus dose:\n" ||
" - Select OK and “Weight Based Protocol With Bolus Dose";
this_communication.MessageType := "Error";
else
Card_Prot_W_Bolus.control_read_only := False;
Card_Prot_N_Bolus.control_read_only := False;
Weight_Prot_W_Bolus.control_read_only := False;
Fnd_WP_NB.IsSelected:=False;
Mlt_List.IsSelected := (False,False,False,False,False,False,False,False,False);
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,False,False,False,False,False);
Fnd_Daily.IsSelected := False;
endif;
ElseIf CallingField = "RequestedDate|1" then
//Set the four remaining order set date fields based on the starting date
yr := extract year now;
mn := extract month now; if mn < 10 then mn := "0" || mn; endif;
dd := extract day now; if dd < 10 then dd := "0" || dd; endif;
today:= yr || "-" || mn || "-" || dd || "T00:00:00";
tomorrow := (today as time) +1 day;
tom_list := call str_parse with tomorrow, " ";
tom_dte := first(tom_list);
lesstomorrow := primreqdate.value < tomorrow;
If lesstomorrow = true then
this_communication.DisplayForm := "Yes";
this_communication.Message := "You may not enter a date earlier than tomorrow (" || tom_dte || ")"
;
this_communication.MessageType := "Error";
primreqdate.value := tomorrow;
endif;
// Hold Session - Date handling. Instead of date (T is found) or(T+(#) is found)
PlusLocation := FIND "+" IN STRING primreqdate.value;
TLocation := FIND "T" IN STRING primreqdate.value;
If TLocation = 1 and PlusLocation = 0 then primreqdate.value := (now as time); endif;
If PlusLocation > 0 then
PlusDays := SUBSTRING 1 CHARACTERS STARTING AT LENGTH OF primreqdate.value FROM primreqdate.value ;
primreqdate.value := (now as time) +(PlusDays as number) day;
endif;
startdate:= primreqdate.value;
Order_From.value := primreqdate.value;
secreqdate.value := startdate + 2 days;
thirdreqdate.value := startdate + 4 days;
fourthreqdate.value := startdate + 6 days;
fifthreqdate.value := startdate + 8 days;
Order_To.value := fifthreqdate.value;
prx_comment.value:= primreqdate.value || "," || secreqdate.value || "," || thirdreqdate.value || "," ||
fourthreqdate.value || "," || fifthreqdate.value;
// 2.9.2015 removed logic for respiratory page - replaced with new process - TMS
/*
elseif CallingField = "MultiOrderGrid|4" then
If (true in SAAAX_list.IsSelected) then
Albuterol_1 := Last(First 1 from SAAAX_Sel);
Albuterol_2 := Last(First 2 from SAAAX_Sel);
Albuterol_Atrovent_1 := Last(First 3 from SAAAX_Sel);
Atrovent_1 := Last(First 4 from SAAAX_Sel);
Atrovent_2 := Last(First 5 from SAAAX_Sel);
Xopenex_1 := Last(First 6 from SAAAX_Sel);
Xopenex_2 := Last(First 7 from SAAAX_Sel);
ListSA_text := "";
If (Albuterol_1 = True) or (Albuterol_2 = True) or (Albuterol_3 = True) then
ListSA_Text := ListSA_Text || "Albuterol, ";
endif;
If (Albuterol_Atrovent_1) = True then
ListSA_Text := ListSa_Text || "Albuterol /Atrovent, ";
endif;
IF (Atrovent_1 =True) or (Atrovent_2 = True) or (Atrovent_3=True) then
ListSA_Text := ListSA_Text || "Atrovent, ";
endif;
If (Xopenex_1 = True) or (Xopenex_2 = True) then
ListSA_Text := ListSA_Text || "Xopenex, ";
endif;
SpecInst_fld.Value := "SPONTANEOUS AEROSOL: " || ListSA_Text;
ED_Resp_Ord.IsSelected := True;
else
ED_Resp_Ord.IsSelected := False;
endif; //Respiratory page
*/
endif;
elseif CallingEvent = "FormOpen" then
If local_session.has_received_order_worksheet_message <> FALSE then
Pregnancy_History.value := local_session.SessionPregnancyValue;
indications1.value := local_session.SessionIndications1;
indications2.value := local_session.SessionIndications2;
// SessionIndications1Value
creatinine_calculator := mlm {{{SINGLE-QUOTE}}}FORM_Medical_Imaging_Indications_for_OS{{{SINGLE-QUOTE}}};
(this_communication, this_form) := call creatinine_calculator with this_communication, this_form, client_info_obj;
endif;
Mlt_List.IsReadOnly := (True,True,True,True,True,True,True,True);
// Mlt_List.IsSelected := (True,True,True,True,True,True,True);
If primreqdate.value = "T+1" then primreqdate.value := (now as time) +1 day; endif;
startdate:= primreqdate.value;
Order_From.value := primreqdate.value;
secreqdate.value := startdate + 2 days;
thirdreqdate.value := startdate + 4 days;
fourthreqdate.value := startdate + 6 days;
fifthreqdate.value := startdate + 8 days;
Order_To.value := fifthreqdate.value;
prx_comment.value:= primreqdate.value || "," || secreqdate.value || "," || thirdreqdate.value || "," ||
fourthreqdate.value || "," || fifthreqdate.value;
Lab_Daily_List.IsReadOnly:= (False,True,True,True,True,True);
Fnd_Daily.IsReadOnly := True;
// Add call to Indications MLM
MedImageInd := MLM {{{SINGLE-QUOTE}}}FORM_MEDICAL_IMAGING_INDICATIONS_FOR_OS{{{SINGLE-QUOTE}}};
IndMLM := call MedImageInd with (this_communication, // Communication object
this_form, // Form object
client_info_obj //Arden ClientInfo object
) ;
elseif CallingEvent = "FormClose" then
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;
Escort_MLM := mlm {{{SINGLE-QUOTE}}}Form_Func_Escort_Order{{{SINGLE-QUOTE}}};
EscortQuestion := call Escort_MLM with this_form,this_communication;
local_session.SessionIndications1:= indications1.value;
local_session.SessionIndications2:= indications2.value;
local_session.SessionPregnancyValue := Pregnancy_History.value;
if Pregnancy_History.value is null then Pregnancy_History.value := local_session.SessionPregnancyValue; endif; // carry forward from form to os
if local_session.has_received_order_worksheet_message = FALSE then local_session.has_received_order_worksheet_message := TRUE; else; endif;
If (Card_Prot_W_Bolus.Value = True) or (Card_Prot_N_Bolus.Value = True) or
(Weight_Prot_W_Bolus.Value = True) or (Weight_Prot_N_Bolus.Value = True) then
comb_ht_wt_val := comb_ht_wt_fld.Value;
wt := comb_ht_wt_val.weight;
if (wt is null) or (wt = 0) then
this_communication.DisplayForm := "Yes";
this_communication.Message := "To Complete The Heparin Protocol:\n\n Please Enter A Weight For This Patient";
this_communication.MessageType := "Error";
else
If (Found_Base_CBC.IsSelected =false) or (Found_Base_INR.IsSelected = false) or (Found_Base_APTT.IsSelected= false) then
If Found_Base_CBC.ISSelected = False then
CBC_Val := read last
{"Select top 1 o.Name"
|| " From cv3order as o with (nolock) "
|| " join cv3ordercatalogmasteritem as ocmi with (nolock) "
|| " on ocmi.guid = o.ordercatalogmasteritemguid "
|| " and ocmi.active = 1 "
|| " and ocmi.name in ({{{SINGLE-QUOTE}}}CBC (Includes Diff){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC No Diff (Hemogram Only){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC with Manual Diff{{{SINGLE-QUOTE}}}) "
|| " where o.clientguid = " || SQL(client_guid)
|| " and o.chartguid = " || SQL(chart_guid)
|| " and o.requesteddtm >= (DATEADD(hour, -24, getdate())) "
|| " and o.requesteddtm <= getdate() "
|| " and o.OrderStatusLevelNum > 15 "
|| " and o.OrderStatusLevelNum not in (69, 70) "
|| " order by o.requesteddtm desc "
};
If exists CBC_Val then
CheckCBC:=False;
else
CheckCBC:=True;
Found_Base_CBC.ISSelected :=True;
endif;
endif;
// Now for INR
If Found_Base_INR.ISSelected = False then
INR_Val := read last
{"Select top 1 o.Name"
|| " From cv3order as o with (nolock) "
|| " join cv3ordercatalogmasteritem as ocmi with (nolock) "
|| " on ocmi.guid = o.ordercatalogmasteritemguid "
|| " and ocmi.active = 1 "
|| " and ocmi.name in ({{{SINGLE-QUOTE}}}Prothrombin/INR{{{SINGLE-QUOTE}}}) "
|| " where o.clientguid = " || SQL(client_guid)
|| " and o.chartguid = " || SQL(chart_guid)
|| " and o.requesteddtm >= (DATEADD(hour, -24, getdate())) "
|| " and o.requesteddtm <= getdate() "
|| " and o.OrderStatusLevelNum > 15 "
|| " and o.OrderStatusLevelNum not in (69, 70) "
|| " order by o.requesteddtm desc "
};
If exists INR_Val then
CheckINR:=False;
else
Found_Base_INR.ISSelected :=True;
CheckINR:=True;
endif;
endif;
// Now for APTT
If Found_Base_APTT.ISSelected = False then
APTT_Val := read last
{"Select top 1 o.Name"
|| " From cv3order as o with (nolock) "
|| " join cv3ordercatalogmasteritem as ocmi with (nolock) "
|| " on ocmi.guid = o.ordercatalogmasteritemguid "
|| " and ocmi.active = 1 "
|| " and ocmi.name in ({{{SINGLE-QUOTE}}}APTT{{{SINGLE-QUOTE}}}) "
|| " where o.clientguid = " || SQL(client_guid)
|| " and o.chartguid = " || SQL(chart_guid)
|| " and o.requesteddtm >= (DATEADD(hour, -24, getdate())) "
|| " and o.requesteddtm <= getdate() "
|| " and o.OrderStatusLevelNum > 15 "
|| " and o.OrderStatusLevelNum not in (69, 70) "
|| " order by o.requesteddtm desc "
};
If exists APTT_Val then
CheckAPTT:=False;
else
Found_Base_APTT.ISSelected :=True;
CheckAPTT:=True;
endif;
endif;
//////////////////////
// Now find if there are already CBC{{{SINGLE-QUOTE}}}s ordered in the future...
// Reset the check boxes if they are.
formlist := call str_parse with prx_comment.value, ",";
end_date := fifthreqdate.value + 1 day;
CBC_daily_dates :=();
CBC_daily_dates := read
{"Select distinct top 20 convert(char(6),o.requesteddtm,110) +convert(char(4), o.requesteddtm,20) + {{{SINGLE-QUOTE}}} 00:00:00{{{SINGLE-QUOTE}}}"
|| " From cv3order as o with (nolock) "
|| " join cv3ordercatalogmasteritem as ocmi with (nolock) "
|| " on ocmi.guid = o.ordercatalogmasteritemguid "
|| " and ocmi.active = 1 "
|| " and ocmi.name in ({{{SINGLE-QUOTE}}}CBC (Includes Diff){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC No Diff (Hemogram Only){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC with Manual Diff{{{SINGLE-QUOTE}}}) "
|| " where o.clientguid = " || SQL(client_guid)
|| " and o.chartguid = " || SQL(chart_guid)
|| " and o.requesteddtm >= " || SQL(primreqdate.value)
|| " and o.requesteddtm < " || SQL(end_date)
|| " and o.OrderStatusLevelNum > 15 "
|| " and o.OrderStatusLevelNum not in (69, 70) "
|| " and o.orderstatuscode <> {{{SINGLE-QUOTE}}}MASTR{{{SINGLE-QUOTE}}} "};
If exist(CBC_daily_dates) then
Reset_CBC_Grid:= ();
singledate := "";
index_list := 1 seqto (count formlist) ;
for J in index_list do
singledate := formlist[J];
Reset_CBC_Grid:= Reset_CBC_Grid, singledate not in CBC_daily_dates;
enddo;
Lab_Daily_List.IsSelected := (Fnd_APTT.IsSelected,Reset_CBC_Grid);
endif; //If exist
endif; // one of four values = true
// 2.9.2015 removed logic for respiratory page - replaced with new process - TMS
//marker for ed respiratory page data note, grid needs at least one true to do this logic
/*
If (true in SAAAX_list.IsSelected) then
Albuterol_1 := Last(First 1 from SAAAX_Sel);
Albuterol_2 := Last(First 2 from SAAAX_Sel);
Albuterol_Atrovent_1 := Last(First 3 from SAAAX_Sel);
Atrovent_1 := Last(First 4 from SAAAX_Sel);
Atrovent_2 := Last(First 5 from SAAAX_Sel);
Xopenex_1 := Last(First 6 from SAAAX_Sel);
Xopenex_2 := Last(First 7 from SAAAX_Sel);
ListSA_text := "";
If (Albuterol_1 = True) or (Albuterol_2 = True) or (Albuterol_3 = True) then
Spontaneous:=True;
ListSA_Text := ListSA_Text || "Albuterol, ";
endif;
If (Albuterol_Atrovent_1) = True then
Spontaneous := True;
ListSA_Text := ListSa_Text || "Albuterol /Atrovent, ";
endif;
IF (Atrovent_1 =True) or (Atrovent_2 = True) or (Atrovent_3=True) then
Spontaneous:=True;
ListSA_Text := ListSA_Text || "Atrovent, ";
endif;
If (Xopenex_1 = True) or (Xopenex_2 = True) then
Spontaneous := True;
ListSA_Text := ListSA_Text || "Xopenex, ";
endif;
SpecInst_fld.Value := "SPONTANEOUS AEROSOL: " || ListSA_Text;
endif; //Respiratory page
*/
endif; // If checked
endif; // wt is null
endif; // calling event
;;
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: