maintenance: title: FORM_ANTIBIOTIC_ORDERS_PROTECT_DOSE;; mlmname: FORM_ANTIBIOTIC_ORDERS_PROTECT_DOSE;; arden: version 2.5;; version: 15.10;; institution: St Clair Hospital;; author: Juliet M. Law, Allscripts;; specialist: Janet Nordin, Allscripts;; date: 2016-02-25;; validation: testing;; library: purpose: This MLM triggers on orders contained in the Antibiotics (ASP) Order Sets. ;; explanation: Makes all dose (and ED frequency) antibiotic ordering fields read-only when called from Antibiotic order sets Change History ---------------- 05.31.2016 JML CSR# 34091 - Created to protect dose field on several antibiotic orders 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: Called MLMs, Form fields, antibiotic ;; 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_occurred := false; error_message:=""; // 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; CallingField :=this_communication.CallingFieldName; CallingEvent := this_communication.CallingEvent; FormType := this_communication.FormType; OrderSetName := this_communication.PrimaryObj.OrderSetName; ASP_OSName := ( "IntraAbdominal Antibiotic ED", "Pneumonia Antibiotic ED", "Pneumonia Antibiotic Outpatient ED", "Genitourinary Antibiotic", "Genitourinary Antibiotic ED", "IntraAbdominal Antibiotic", "Pneumonia Antibiotic", "Pneumonia Antibiotic Outpatient", "Skin Antibiotic Inpatient", "Skin Antibiotic Inpatient ED", "Skin Antibiotic Outpatient", "Skin Antibiotic Outpatient ED", "C Diff Antibiotic ED", "C Diff Antibiotic", "Antibiotic Guidelines ED", "Antibiotic Guidelines", "Sepsis Unknown Source Antibiotic", "Sepsis Unknown Source Antibiotic ED", "Septic Work Up Orders" ); doseFld := first of ( field_list WHERE field_list.DataItemName = "DosageLow" ); uomFld := first of ( field_list WHERE field_list.DataItemName = "Uom" ); routeFld := first of ( field_list WHERE field_list.DataItemName = "OrderRouteCode" ); freqFld := first of ( field_list WHERE field_list.DataItemName = "FrequencyCode" ); stopFld := first of ( field_list WHERE field_list.DataItemName = "StopAfter" ); if ( OrderSetName IN ASP_OSName OR OrderSetName matches pattern "Transition Orders%" ) then doseFld.control_read_only := true; uomFld.control_read_only := true; if ( OrderSetName matches pattern "%ED" ) then freqFld.control_read_only := true; 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: