コード例 #1
0
ファイル: class.ntp.php プロジェクト: wahgithub/chits_wah_emr
 function _consult_ntp()
 {
     //
     // main submodule for consult
     // called from healthcenter _consult()
     // calls form_patient_type()
     //       display_patient_type()
     //       process_patient_type()
     //
     // always check dependencies
     if ($exitinfo = $this->missing_dependencies('ntp')) {
         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);
     }
     $n = new ntp();
     $n->ntp_menu($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
     mysql_query("ALTER TABLE `m_patient_ntp` DROP PRIMARY KEY , ADD PRIMARY KEY (`ntp_id`)");
     mysql_query("ALTER TABLE `m_consult_ntp_symptomatics` DROP PRIMARY KEY , ADD PRIMARY KEY (`symptomatic_id`)");
     if ($post_vars["submitntp"]) {
         $n->process_ntp($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
     }
     switch ($get_vars["ntp"]) {
         case "SYMP":
             $n->form_ntp_symptomatic($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             break;
         case "VISIT1":
             $n->form_patient_ntp($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             break;
         case "INTAKE":
             //$base_url = $_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]."&ntp=".$get_vars["ntp"];
             $n->form_intensive_ntp($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             break;
         case "COLL":
             //$base_url = $_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]."&ntp=".$get_vars["ntp"];
             $n->form_maintenance_ntp($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             break;
         case "LABS":
             // lab requests: either request or generate referral
             $n->form_consult_ntp_lab($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             //create a dropdown box showing NTP consults done for the patient but not
             $n->form_ntp_import($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             //display DSSM tests that have been done before the actual treatment
             $n->check_before_dssm($_GET["ntp_id"]);
             //if a request has been made, show the queue of labs here
             $n->form_pending_request($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             //list the completed sputum exams for this NTP case
             $n->form_completed_request($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             //xxxx-- do function that will import sputum labs done outside request
             // lab requests done outside of ntp but can be
             // assigned to ntp, e.g., first sputum exam
             //$n->form_consult_assign_lab($menu_id, $post_vars, $get_vars, $validuser, $isadmin);
             break;
     }
 }