maintenance: title: FORM_ACETYLCYSTEINE_NEW_ORDER;; mlmname: FORM_ACETYLCYSTEINE_NEW_ORDER;; arden: version 2.5;; version: 5.50;; institution: St Clair Hospital;; author: Juliet M. Law, Allscripts ;; specialist: Bryan Berkeybile, Allscripts;; date: 2013-06-17;; validation: testing;; library: purpose: ;; explanation: This MLM is called from ... Change history 2013.06.17 JML CSR 30931: Created 2013.07.19 BDB Updated the Rate Data Item as original was not crossing to WORx. Then updated BaseSolution Dose, as the calculation did not need to occur on the Form. Then updated Rate value, as the calculation changed due to the BaseSolution change. ;; keywords: Called MLMs ;; 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"; HoldOrder_RequestedTime := mlm {{{SINGLE-QUOTE}}}FORM_HOLDORDER_REQUESTEDTIME{{{SINGLE-QUOTE}}}; // 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:=""; // Assigns fields passed in the Form object to the Field object field_list:= this_form.fields; CallingEvent := this_communication.CallingEvent; CallingField := this_communication.CallingFieldName; ClientGuid := this_communication.ClientGUID; ChartGuid := this_communication.ChartGUID; FormName := this_form.Name; //Retrieve Fields Dosage_Low := first of (field_list WHERE field_list.DataItemName = "DosageLow"); Dosage_Low_fld := Dosage_Low.Value; Rate_fld := first of (field_list WHERE field_list.DataItemName = "PRX_IVRATE"); //[BB changed to test updates to UDDI - Was: "OrderIVRate"] Order_IV_Rate := Rate_fld.Value; Instructions_fld := first of (field_list WHERE field_list.DataItemName = "AdminInstructions"); //Add call to FORM_HOLDORDER_REQUESTEDTIME MLM to handle conflict of both MLMs need called on Form Open (this_communication, this_form) := call HoldOrder_RequestedTime WITH this_communication, this_form, client_info_obj; if (CallingEvent = "FormOpen") then if (Instructions_fld.Value = "Run for 1 hour") then if (Dosage_Low_fld > 0) then Rate_fld.Value := ROUND( ( Dosage_Low_fld / 200 ) + 200 ); endif; elseif (Instructions_fld.Value = "Run for 4 hours") then if (Dosage_Low_fld > 0) then Rate_fld.Value := ROUND( ( ( Dosage_Low_fld / 200 ) + 500 ) / 4 ); endif; elseif (Instructions_fld.Value = "Run for 16 hours") then if (Dosage_Low_fld > 0) then Rate_fld.Value := ROUND( ( ( Dosage_Low_fld / 200 ) + 1000 ) / 16 ); endif; endif; elseif (CallingEvent = "FieldChange") then if (CallingField = "DosageLow") then if (Instructions_fld.Value = "Run for 1 hour") then Rate_fld.Value := ROUND (( Dosage_Low_fld / 200 ) + 200 ); elseif (Instructions_fld.Value = "Run for 4 hours") then Rate_fld.Value := ROUND( ( ( Dosage_Low_fld / 200 ) + 500 ) / 4 ); elseif (Instructions_fld.Value = "Run for 16 hours") then Rate_fld.Value := ROUND( ( ( Dosage_Low_fld / 200 ) + 1000 ) / 16 ); endif; 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: