maintenance: title: FORM_Set_FBC_Epidural_Order ;; mlmname: FORM_Set_FBC_Epidural_Order;; arden: version 2.5;; version: 6.10;; institution: St. Clair Hospital;; author: Shivprasad Jadhav;; specialist: Shivprasad jadhav, Allscripts Corporation;; date: 2015-05-14;; validation: testing;; library: purpose: MLM to check IUFD [Intra uterine fetal death] health issue and PT and APTT result within last 8 hours , if not present then autocheck PT, APTT Lab STAT order MLM which will check for last 2 hours Platelet count result when patient has pre ecmplasia and if not present then will order respective lab stat , if patient has IUFD as health issue then MLM will check within last 8 hours PT,APTT result and if not present then it will autocheck the respective lab orders. if patient doesn{{{SINGLE-QUOTE}}}t have any of these two health issue then MLM will check CBC and platelet count last 8 hours result , if not present then will autocheck Lab stat cbc order. Note : 1. MLM will only autocheck the respective lab order 2. MLM will allow user to deselect /select the lab order as when required 3. MLM will consider both , the battery lab item and its components ;; explanation: Change History ----------------- 11.05.2015 JML CSR# 33390: Created 06/28/2018 DW CSR# 36956 FBC Order Set Review - do not pre-check the CBC 01/11/2019 TMS CSR# 37271 and 37375 Updated for changes to FBC Epidural orders and to accommodate new patient controlled epidural analgesia. PT :="Prothrombin/INR" ; ;; keywords: Called MLMs ;; 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:=""; standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}}; include standard_libs; // Assigns fields passed in the Form object to the Field object field_list:= this_form.fields; clientGuid := this_communication.ClientGUID; visitGuid := this_communication.ClientVisitGUID; chartGuid := this_communication.ChartGUID; //pObj := this_communication.PrimaryObj; CallingEvent := this_communication.CallingEvent; CallingField := this_communication.CallingFieldName; item_event := this_communication.itemevent; form_type := this_communication.formtype; Labs_Stat := last of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckBox" and field_list.Control_MultiFieldOccNum = 4); Labs_Stat_Val := Labs_Stat.Value; Preeclampsia := last of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckBox" and field_list.Control_MultiFieldOccNum = 5); Preeclampsia_Val := Preeclampsia.Value; EpiduralOrders:= last of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckBox" and field_list.Control_MultiFieldOccNum = 7); EpiduralOrders_Val := EpiduralOrders.value; Fentanyl_Bupiv := first of (EpiduralOrders_Val where EpiduralOrders_Val.Name matches pattern "Fentanyl 200 mcg + BUPIv%"); Fentanyl_Ropiv := first of (EpiduralOrders_Val where EpiduralOrders_Val.Name matches pattern "Fentanyl 200 mcg + ROPIv%"); pcacontinuous:= last of (field_list where field_list.DataItemName = "PRX_PcaContinuous" and field_list.Control_MultiFieldOccNum = 1); pcacontinuous_val := pcacontinuous.value; pcaplus := last of (field_list where field_list.DataItemName = "PRX_PcaPlus" and field_list.Control_MultiFieldOccNum = 1); pcaplus_val := pcaplus.value; CRNAAdminDose := last of (field_list where field_list.DataItemName = "PRX_ZXO01" and field_list.Control_MultiFieldOccNum = 1); CRNADoseUnits := last of (field_list where field_list.DataItemName = "PRX_ZXO02" and field_list.Control_MultiFieldOccNum = 1); PtAdminDose := last of (field_list where field_list.DataItemName = "PRX_ZXO05" and field_list.Control_MultiFieldOccNum = 1); PtAdminUnits := last of (field_list where field_list.DataItemName = "PRX_ZXO06" and field_list.Control_MultiFieldOccNum = 1); PtAdminFreq := last of (field_list where field_list.DataItemName = "PRX_ZXO07" and field_list.Control_MultiFieldOccNum = 1); PtAdminFreqUnits := last of (field_list where field_list.DataItemName = "PRX_ZXO08" and field_list.Control_MultiFieldOccNum = 1); basalrate := last of (field_list where field_list.DataItemName = "PRX_ZXO09" and field_list.Control_MultiFieldOccNum = 1); BasalRateUom := last of (field_list where field_list.DataItemName = "PRX_ZXO10" and field_list.Control_MultiFieldOccNum = 1); // remove this form open logic when ropivacaine product becomes available. If CallingEvent = "FormOpen" then Fentanyl_Ropiv.IsReadOnly:= true; Endif; If callingfield = "MultiOrderCheckBox|7" then // Add this commented out code back when ropivacaine product becomes available. /* If Fentanyl_Bupiv.isSelected = true then EpiduralOrders_val.isReadOnly := (false, true); Elseif Fentanyl_Ropiv.isSelected = true then EpiduralOrders_val.isReadOnly := (true, false); Elseif (Fentanyl_Ropiv.isSelected = false and Fentanyl_Ropiv.isSelected = false) then EpiduralOrders_val.isReadOnly := (false, false); endif; */ If (Fentanyl_Bupiv.IsSelected = true or Fentanyl_Ropiv.IsSelected = true) then If (pcacontinuous.value = false and pcaplus.value = false) then dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Please select mode of Delivery for Epidural Infusion." ||" \n\n Continuous Epidural Infusion or PCEA and Continuous Epidural Infusion" ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; endif; endif; endif; If (CallingField = "Prx_PcaPlus|1" and pcaplus.value = True) then PtAdminDose.control_mandatory := True; PtAdminDose.control_read_only := False; PtAdminUnits.value := "mL"; PtAdminUnits.control_mandatory := True; PtAdminUnits.control_read_only := True; PtAdminFreq.control_mandatory := True; PtAdminFreq.control_read_only := False; PtAdminFreqUnits.value := "minutes"; PtAdminFreqUnits.control_mandatory := True; PtAdminFreqUnits.control_read_only := True; basalrate.control_mandatory := True; basalrate.control_read_only := False; BasalRateUom.value := "mL/hr"; pcacontinuous.value := False; elseif (CallingField = "PRX_PcaContinuous|1" and pcacontinuous.value = True) then pcaplus.value := False; PtAdminDose.value := ""; PtAdminDose.control_mandatory := False; PtAdminDose.control_read_only := True; PtAdminUnits.value := ""; PtAdminUnits.control_mandatory := False; PtAdminUnits.control_read_only := True; PtAdminFreq.value := ""; PtAdminFreq.control_mandatory := False; PtAdminFreq.control_read_only := True; PtAdminFreqUnits.value := ""; PtAdminFreqUnits.control_mandatory := False; PtAdminFreqUnits.control_read_only := True; basalrate.control_mandatory := True; basalrate.control_read_only := False; BasalRateUom.value := "mL/hr"; pcaplus.value := false; endif; If (CallingField = "PRX_ZXO01|1" and CRNAAdminDose.value is not null) then CRNADoseUnits.value := "mL"; elseif (CallingField = "PRX_ZXO01|1" and CRNAAdminDose.value is null) then CRNADoseUnits.value := ""; endif; If (CallingField = "PRX_ZXO09|1" and (BasalRate.value as number) >14) then dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Maximum Rate for Continuous Infusion is 14 mL/hr." ||" \n\n Please adjust rate." ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; BasalRate.value := null; endif; If (CallingField = "PRX_ZXO05|1" and (PtAdminDose.value as number) >8) then dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Maximum Rate for Patient Administered Dose is 8 mL every 15 minutes." ||" \n\n Please adjust dose." ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; PtAdminDose.value := null; endif; If (CallingField = "PRX_ZXO01|1" and (CRNAAdminDose.value as number) >10) then dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Loading Dose Administered from Epidural Bag should not exceed 10 mL." ||" \n\n Please adjust dose." ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; CRNAAdminDose.value := null; endif; If (CallingField = "PRX_ZXO07|1" and (PtAdminFreq.value as number) <15) then dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Frequency of Patient Administered Dose must be a minimum of 15 minutes apart." ||" \n\n Please adjust frequency." ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; PtAdminFreq.value := null; endif; PreeclampsiaHI := read First {" select distinct hi.shortname " || "from cv3healthissuedeclaration hi with (nolock) " || "join CV3CodedHealthIssue chi with (nolock) on chi.GUID = hi.CodedHealthIssueGUID " || "where hi.clientguid = " || clientGuid || " and hi.active = 1 and hi.status = {{{SINGLE-QUOTE}}}Active{{{SINGLE-QUOTE}}} " || "and hi.typecode not in ({{{SINGLE-QUOTE}}}admitting dx{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}chronic dx{{{SINGLE-QUOTE}}} ,{{{SINGLE-QUOTE}}}dx comments{{{SINGLE-QUOTE}}}) " || "and ( " || "hi.text like {{{SINGLE-QUOTE}}}%Preeclampsia%{{{SINGLE-QUOTE}}} or hi.shortname like {{{SINGLE-QUOTE}}}%Preeclampsia%{{{SINGLE-QUOTE}}} or " || " " || "(Case when chi.TypeCode = {{{SINGLE-QUOTE}}}ICD9{{{SINGLE-QUOTE}}} then chi.code end) in ({{{SINGLE-QUOTE}}}642.40{{{SINGLE-QUOTE}}}) " || " ) " || " AND ({{{SINGLE-QUOTE}}}1{{{SINGLE-QUOTE}}} = {{{SINGLE-QUOTE}}}1{{{SINGLE-QUOTE}}} AND ( hi.ScopeLevel = {{{SINGLE-QUOTE}}}2{{{SINGLE-QUOTE}}} OR ( hi.ScopeLevel = {{{SINGLE-QUOTE}}}2{{{SINGLE-QUOTE}}} " || " AND hi.ChartGUID = " || SQL(chartGuid) || " ) OR hi.ClientVisitGUID = " || SQL(visitGuid) || " ) ) " }; IUFDHI := read First {" select distinct hi.shortname " || "from cv3healthissuedeclaration hi with (nolock) " || "join CV3CodedHealthIssue chi with (nolock) on chi.GUID = hi.CodedHealthIssueGUID " || "where hi.clientguid = " || clientGuid || " and hi.active = 1 and hi.status = {{{SINGLE-QUOTE}}}Active{{{SINGLE-QUOTE}}} " || "and hi.typecode not in ({{{SINGLE-QUOTE}}}admitting dx{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}chronic dx{{{SINGLE-QUOTE}}} ,{{{SINGLE-QUOTE}}}dx comments{{{SINGLE-QUOTE}}}) " || "and ( " || "hi.text like {{{SINGLE-QUOTE}}}%IUFD%{{{SINGLE-QUOTE}}} or hi.shortname like {{{SINGLE-QUOTE}}}%IUFD%{{{SINGLE-QUOTE}}} or " || " " || "(Case when chi.TypeCode = {{{SINGLE-QUOTE}}}ICD9{{{SINGLE-QUOTE}}} then chi.code end) in ({{{SINGLE-QUOTE}}}779.9{{{SINGLE-QUOTE}}}) " || " ) " || " AND ({{{SINGLE-QUOTE}}}1{{{SINGLE-QUOTE}}} = {{{SINGLE-QUOTE}}}1{{{SINGLE-QUOTE}}} AND ( hi.ScopeLevel = {{{SINGLE-QUOTE}}}2{{{SINGLE-QUOTE}}} OR ( hi.ScopeLevel = {{{SINGLE-QUOTE}}}2{{{SINGLE-QUOTE}}} " || " AND hi.ChartGUID = " || SQL(chartGuid) || " ) OR hi.ClientVisitGUID = " || SQL(visitGuid) || " ) ) " }; Ord_CBC := OBJECT [Obs_Name, Obs_EnteredDtm] ; Ord_CBC_Vals := read as Ord_CBC{" SELECT o.Name, osh.CreatedWhen " || " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)" || " ON cv.GUID = o.ClientVisitGUID" || " AND cv.ClientGUID = o.ClientGUID" || " Inner Join CV3OrderStatusHistory osh With (nolock) on o.guid =osh.OrderGUID And osh.ClientGUID=o.ClientGUID " || " WHERE cv.ClientGUID = " || Sql(clientGuid) || " And cv.guid = " || Sql(visitGuid) || " AND o.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}}} ) " || " AND osh.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}}) Order by osh.CreatedWhen Desc "}; Ord_Platelet := OBJECT [Obs_Name, Obs_EnteredDtm] ; Ord_Platelet_Vals := read as Ord_Platelet{"SELECT o.Name, osh.CreatedWhen " || " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)" || " ON cv.GUID = o.ClientVisitGUID" || " AND cv.ClientGUID = o.ClientGUID" || " Inner Join CV3OrderStatusHistory osh With (nolock) on o.guid =osh.OrderGUID And osh.ClientGUID=o.ClientGUID " || " WHERE cv.ClientGUID = " || Sql(clientGuid) || " And cv.guid = " || Sql(visitGuid) || " AND o.NAME in ( {{{SINGLE-QUOTE}}}CBC No Diff (Hemogram Only){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}Platelet Count{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC (Includes Diff){{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}CBC with Manual Diff{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}Platelet Cnt{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}Platelet Count.{{{SINGLE-QUOTE}}}) " || " AND osh.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}}) Order by osh.CreatedWhen Desc "}; Ord_APTT := OBJECT [Obs_Name, Obs_EnteredDtm] ; Ord_APTT_Vals := read as Ord_APTT{"SELECT o.Name, osh.CreatedWhen " || " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)" || " ON cv.GUID = o.ClientVisitGUID" || " AND cv.ClientGUID = o.ClientGUID" || " Inner Join CV3OrderStatusHistory osh With (nolock) on o.guid =osh.OrderGUID And osh.ClientGUID=o.ClientGUID " || " WHERE cv.ClientGUID = " || Sql(clientGuid) || " And cv.guid = " || Sql(visitGuid) || " AND o.NAME in ({{{SINGLE-QUOTE}}}APTT{{{SINGLE-QUOTE}}}) " || " AND osh.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}}) Order by osh.CreatedWhen Desc "}; Ord_INR := OBJECT [Obs_Name, Obs_EnteredDtm] ; Ord_INR_Vals := read as Ord_INR{"SELECT o.Name, osh.CreatedWhen " || " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)" || " ON cv.GUID = o.ClientVisitGUID" || " AND cv.ClientGUID = o.ClientGUID" || " Inner Join CV3OrderStatusHistory osh With (nolock) on o.guid =osh.OrderGUID And osh.ClientGUID=o.ClientGUID " || " WHERE cv.ClientGUID = " || Sql(clientGuid) || " And cv.guid = " || Sql(visitGuid) || " AND o.NAME in ({{{SINGLE-QUOTE}}}Prothrombin/INR{{{SINGLE-QUOTE}}} ) " || " AND osh.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}}) Order by osh.CreatedWhen Desc "}; Time_2hr_Before := Read First {" Select Dateadd(Minute, -120, Getdate()) "}; Time_8hr_Before := Read First {" Select Dateadd(Minute, -480, Getdate()) "}; //Time_2hr_Before := Read First {" Select Dateadd(Hour, -262, Getdate()) "}; //Time_8hr_Before := Read First {" Select Dateadd(Minute, -1140, Getdate()) "}; C_Plate_Dt := First of(Ord_Platelet_Vals.Obs_EnteredDtm where Ord_Platelet_Vals.Obs_Name in ( "CBC No Diff (Hemogram Only)","Platelet Count","CBC (Includes Diff)","CBC with Manual Diff","Platelet Cnt","Platelet Count.") ); If C_Plate_Dt is Null Then C_Plate_Dt := Read First {" Select Dateadd(Minute, -500, Getdate()) "}; Endif; //If C_Plate_Dt is Null Then C_Plate_Dt := ("01-07-2019 11:37:55" as time) ; Endif; O_CBC_Dt := First of(Ord_CBC_Vals.Obs_EnteredDtm where Ord_CBC_Vals.Obs_Name in ( "CBC (Includes Diff)" ,"CBC No Diff (Hemogram Only)","CBC with Manual Diff" ) ); If O_CBC_Dt is Null Then O_CBC_Dt := Read First {" Select Dateadd(Minute, -500, Getdate()) "}; Endif; // If O_CBC_Dt is Null Then O_CBC_Dt := ("01-07-2019 11:37:55" as time) ; Endif; C_PT_Dt := First of(Ord_INR_Vals.Obs_EnteredDtm where Ord_INR_Vals.Obs_Name= "Prothrombin/INR" And Ord_INR_Vals.Obs_EnteredDtm Is Not Null ); If C_PT_Dt is Null Then C_PT_Dt := Read First {" Select Dateadd(Minute, -500, Getdate()) "}; Endif; C_PTT_Dt := First of(Ord_APTT_Vals.Obs_EnteredDtm where Ord_APTT_Vals.Obs_Name= "APTT" And Ord_APTT_Vals.Obs_EnteredDtm Is Not Null ); If C_PTT_Dt is Null Then C_PTT_Dt := Read First {" Select Dateadd(Minute, -500, Getdate()) "}; Endif; FinalStr :="" ; // CBC := "CBC No Diff (Hemogram Only)" ; //"CBC (Includes Diff)"; changes as per new specs // 06/28/2018 DW CSR# 36956 FBC Order Set Review - do not pre-check the CBC PT :="Prothrombin/INR" ; APTT:="APTT"; Platelet := "Platelet Count" ; If PreeclampsiaHI Is Not Null Then If IUFDHI Is Not Null Then // For CBC If C_Plate_Dt > Time_2hr_Before And O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr ; ElseIf (C_Plate_Dt < Time_2hr_Before And O_CBC_Dt < Time_8hr_Before) or (C_Plate_Dt > Time_2hr_Before And O_CBC_Dt < Time_8hr_Before) Then FinalStr := FinalStr, CBC; ElseIf C_Plate_Dt < Time_2hr_Before And O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr, Platelet ; EndIf; // For PT If C_PT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, PT ; EndIf; // For APTT If C_PTT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, APTT ; EndIf; EndIf; If IUFDHI Is Null Then // For CBC If C_Plate_Dt > Time_2hr_Before And O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr ; ElseIf (C_Plate_Dt < Time_2hr_Before And O_CBC_Dt < Time_8hr_Before) or (C_Plate_Dt > Time_2hr_Before And O_CBC_Dt < Time_8hr_Before) Then FinalStr := FinalStr, CBC; ElseIf C_Plate_Dt < Time_2hr_Before And O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr, Platelet ; EndIf; // For PT /*If C_PT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, PT; EndIf; // For APTT If C_PTT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, APTT ; EndIf; */ //FinalStr := FinalStr, PT, APTT ; EndIf; ElseIf PreeclampsiaHI Is Null Then If IUFDHI Is Not Null Then // For CBC If C_Plate_Dt > Time_8hr_Before And O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, CBC ; EndIf; // For PT If C_PT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, PT ; EndIf; // For APTT If C_PTT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, APTT ; EndIf; EndIf; If IUFDHI Is Null Then // For CBC If C_Plate_Dt > Time_8hr_Before And O_CBC_Dt > Time_8hr_Before Then //If O_CBC_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, CBC ; EndIf; // For PT /*If C_PT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, PT; EndIf; // For APTT If C_PTT_Dt > Time_8hr_Before Then FinalStr := FinalStr ; Else FinalStr := FinalStr, APTT ; EndIf; */ //FinalStr := FinalStr, PT, APTT ; EndIf; Endif; if ( exists FinalStr ) then // for First Checkbox for lab in 1 seqto ( count Labs_Stat_Val ) do if ( Labs_Stat_Val[lab].Name IN FinalStr ) then Labs_Stat_Val[lab].IsSelected := true; else Labs_Stat_Val[lab].IsSelected := false; endif; enddo; // for Second Checkbox for a in 1 seqto ( count Preeclampsia_Val ) do if ( Preeclampsia_Val[a].Name IN FinalStr ) then Preeclampsia_Val[a].IsSelected := true; else Preeclampsia_Val[a].IsSelected := false; endif; enddo; else //No labs exist for this patient, select all labs Labs_Stat_Val.IsSelected := ( False, False, False); Preeclampsia_Val.IsSelected := ( False); endif; If (pcaplus.value = true or pcacontinuous.value = true) and (Fentanyl_Bupiv.IsSelected = false and Fentanyl_Ropiv.IsSelected = false) then hardstop := "yes"; else hardstop := "no"; endif; ReasonMessage := "You have selected parameters for an Epicural Infusion, please select either Fentanyl and BUPIvacaine or Fentanyl and ROPIvacaine 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: