示例#1
0
 function _consult_drug()
 {
     //
     // main submodule for consult drug
     // left panel
     //
     // always check dependencies
     if ($exitinfo = $this->missing_dependencies('drug')) {
         return print $exitinfo;
     }
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     $d = new drug();
     $d->drug_menu($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
     if ($post_vars["submitdrug"]) {
         $d->process_dispense_drug($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
     }
     switch ($get_vars["drug"]) {
         case "DISP":
             $d->form_dispense_drug($menu_id, $post_vars, $get_vars);
             break;
         case "PCB":
             // Create notes entry for this consult
             $d->form_pcb_drugs($menu_id, $post_vars, $get_vars);
             break;
     }
 }