maintenance: title: Consult Doctors, pick one;; mlmname: FORM_NUR_Consults;; arden: version 2;; version: 4.50;; institution: St Clair Consult Docs MLM;; author: Robert Spence, Eclipsys Corp;; specialist: ;; date: 2006-09-18;; validation: testing;; library: purpose: This MLM restricts the doctor list, based on the type of consult selected ;; explanation: This MLM restricts the doctor list, based on the type of consult selected ;; keywords: Called MLMs, Form fields, Consults ;; 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:=""; // Assigns fields passed in the Form object to the Field object field_list:= this_form.fields; CallingField :=this_communication.CallingFieldName; CallingEvent := this_communication.CallingEvent; FormType := this_communication.FormType; Info_field := last of (field_list where field_list.DataItemName = "MD_Consult_ Choosing a Physician" ); //Starts with: StartString:= "Please select the correct checkbox for the order: " || "Physician Consult, Anesthesia Consult, or Rehabilitation Consult."; PhysCheck_field := last of (field_list where field_list.DataItemName = "MD_Consult_PhysicianCB" ); AnesCheck_field := last of (field_list where field_list.DataItemName = "Anesthesia Consult"); RehabCheck_field := last of (field_list where field_list.DataItemName = "Rehabilitation Consult"); Doctor_field := last of (field_list where field_list.DataItemName = "Obj_Plus_Consult"); // this_communication.DisplayForm := "Yes"; // this_communication.Message := "MLM Field :" || CallingField || "\n" || // "MLM Event :" || CallingEvent || "\n" || // "Form type :" || FormType; // this_communication.MessageType := "Informational"; If CallingEvent ="FieldChange" then If CallingField = "MD_Consult_PhysicianCB" then If PhysCheck_Field.Value = True then AnesCheck_field.Control_Read_Only := True; RehabCheck_Field.Control_Read_Only := True; Doctor_Field.Value :=""; Info_field.Value :="Please Choose a Physician From the Physician List"; else AnesCheck_field.Control_Read_Only := False; RehabCheck_Field.Control_Read_Only := False; Doctor_Field.Value :=""; Info_field.Value := StartString; endif; elseif CallingField = "Anesthesia Consult" then If AnesCheck_field.Value = True then PhysCheck_Field.Control_Read_Only := True; RehabCheck_Field.Control_Read_Only := True; Doctor_Field.Value :="Keystone Anesthesia Consultants, LTD (KACL)"; Info_field.Value :="Physician Group Has Been Filled In For This Anesthesia Consult"; else PhysCheck_Field.Control_Read_Only := False; RehabCheck_Field.Control_Read_Only := False; Doctor_Field.Value :=""; Info_field.Value := StartString; endif; elseif CallingField = "Rehabilitation Consult" then If RehabCheck_field.Value = True then PhysCheck_Field.Control_Read_Only := True; AnesCheck_Field.Control_Read_Only := True; Doctor_Field.Value :="Medical Rehabilitation, Inc. (MRI)"; Info_field.Value :="Physician Group Has Been Filled In For This Rehabilitation Consult"; else PhysCheck_Field.Control_Read_Only := False; AnesCheck_Field.Control_Read_Only := False; Doctor_Field.Value :=""; Info_field.Value := StartString; endif; endif; //Calling fields endif endif; //Events 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: