maintenance: title: Form_Lab_HoldOrder_RequestedTime;; mlmname: Form_Lab_HoldOrder_RequestedTime;; arden: version 2;; version: 4.50;; institution: St. Clair Hospital;; author: Teresa Spicuzza ;; specialist: Eclipsys Corporation;; date: 2010-10-27;; validation: testing;; library: purpose: Allows lab orders requested with a scheduled time to be entered in a hold session without the specific time entered. This will force the time to be entered upon release. ;; explanation: ( ) CHANGE HISTORY 2/26/2015 - STH CSR# 32765 - updated to call the user lab priority options MLM to display the user firendly lab priorities when approriate. 12/03/2015 JML Removed "test" code that was never moved to PRD that was causing the order to not create. 05/17/2016 JML CSR 34155: Modified to handle autoscheduling of the Vancomycin Trough orders ONLY if called from Antibiotic Order Sets (i.e. Antibiotics Pneumonia) 05.10.2017 JML CSR 35272: Modified to work with new Sepsis Unknown Source Antibiotic ED order set AND Sepsis Work Up Orders (ED) order set ;; keywords: Hold, requested Time, Start time; ;; knowledge: type: data-driven;; data: /********************Make Changes To Spelling And Flags In This Section*********************/ /* send_alert := "DoNotSend"; standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}}; include standard_libs; using "ObjectsPlusXA.SCM.Forms"; using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms"; //-------------------------------------------------------------------------- local_session := cds_session.local; //-------------------------------------------------------------------------- */ // 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; comm_obj := this_communication.primaryobj; called_by := this_communication.CallingEvent; call_field := this_communication.CallingFieldName; order_set_name := comm_obj.OrderSetName; // Set some needed fields if called_by_editor then client_guid := "9000001369400200"; visit_guid := visit_obj.GUID; chart_guid := "9000001918900170"; orderId := "1000002689073001"; called_by := "FormOpen"; else client_guid := this_communication.ClientGUID; visit_guid := this_communication.ClientVisitGUID; chart_guid := this_communication.ChartGuid; orderid := this_communication.ItemID; endif; // Assigns fields passed in the Form object to the Field object field_list:= this_form.fields; requested_date := last of (field_list where field_list.DataItemName = "RequestedDate" ); requested_time := last of (field_list where field_list.DataItemName = "RequestedTime" ); requested_time_value := requested_time.value; session_type := comm_obj.internalprocessingtype; //user_friendly_lab_time := last of (field_list where field_list.DataItemName = "LAB_Phleb Draw Sched Time" ); //user_friendly_lab_priority := last of (field_list where field_list.DataItemName = "LAB_Order Priorities" ); DisplayNewScheduled := first of (field_list.Value where field_list.DataItemName = "LAB_CB_Alternate Priorities"); If (called_by = "FormOpen") or (called_by = "FieldChange") and (session_type = "Hold") then If exists (requested_time) and (requested_time_value.ReqTimeCode = "Scheduled Time") then requested_time.Control_mandatory := false; else requested_time.Control_mandatory := true; endif; endif; if (DisplayNewScheduled) then Call_UserFriendly_Lab_Priorities := mlm {{{SINGLE-QUOTE}}}SCH_LAB_PRIORITY_OPTIONS_CALLED{{{SINGLE-QUOTE}}}; (this_communication,this_form) := call Call_UserFriendly_Lab_Priorities with (this_communication,this_form,client_info_obj); endif; /** CSR : 32240 : Vancomycin Order change in Mandatory and Non-mandatory field ******************************/ If this_form.Name ="LAB Chemistry Peak" Then if comm_obj.Name in ( "Vancomycin Peak Plasma/Serum" ,"Tobramycin Peak Plasma/Serum","Gentamicin Peak Plasma/Serum" ) And comm_obj.Modifier = "-RN to Schedule" Then Prm_Conditional := First of (field_list where field_list.DataItemName = "ConditionalOrder" ); Prm_PriorityTime_New := First of (field_list where field_list.DataItemName = "LAB_Order Priorities" ); Prm_PriorityTime := First of (field_list where field_list.DataItemName = "RequestedTime" ); If Prm_Conditional.Value.IsConditional = True Then Prm_PriorityTime.Control_Mandatory := False; Prm_PriorityTime_New.Control_Mandatory := False; Else Prm_PriorityTime.Control_Mandatory := True; //Prm_PriorityTime.Control_Mandatory Prm_PriorityTime_New.Control_Mandatory := True; EndIf; Endif; EndIf; //-------------------------------------------------------------------------------------------------------------- //******* CSR 34155: Autoscheduling Vancomycin Trough ***************** if ( this_form.Name = "LAB Chemistry TDM" ) then ASP_OSName := ( "Pneumonia Antibiotic", "Skin Antibiotic Inpatient", "Antibiotic Guidelines", //"Vancomycin Orders", "Sepsis Unknown Source Antibiotic", "Sepsis Unknown Source Antibiotic ED" ); if ( order_set_name IN ASP_OSName OR order_set_name matches pattern "Transition Orders%" ) then autosched_trough_mlm := MLM {{{SINGLE-QUOTE}}}FORM_VANCOMYCIN_AUTOSCHEDULING_TROUGH_ORDERS{{{SINGLE-QUOTE}}}; ( this_communication, this_form ) := call autosched_trough_mlm WITH this_communication, this_form, client_info_obj; endif; endif; ;; evoke: ;; logic: Conclude true; ;; action: // This MLM returns two parameters, of types //communication_type and form_type respectively. return this_communication, this_form; ;; Urgency: 50;; end: