function _consult_ccdev() { // // main submodule for ccdev consults // // always check dependencies if ($exitinfo = $this->missing_dependencies('ccdev')) { 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); } $c = new ccdev(); //$imci = new imci; mysql_query("ALTER TABLE `m_patient_ccdev` DROP PRIMARY KEY, ADD PRIMARY KEY(`ccdev_id`)"); $c->ccdev_menu($menu_id, $post_vars, $get_vars); if ($post_vars["submitccdev"]) { $c->process_ccdev($menu_id, $post_vars, $get_vars); } $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); switch ($get_vars["ccdev"]) { case "VISIT1": if (!$c->registry_record_exists($patient_id)) { $c->form_ccdev_firstvisit($menu_id, $post_vars, $get_vars, $validuser, $isadmin); } else { $c->display_ccdev_firstvisit($menu_id, $post_vars, $get_vars, $validuser, $isadmin); if ($post_vars["ccdev_id"]) { $c->form_ccdev_firstvisit($menu_id, $post_vars, $get_vars, $validuser, $isadmin); } $c->display_form_low_birth_wt($menu_id, $post_vars, $get_vars, $validuser, $isadmin); } break; case "SIBLINGS": $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $get_vars["family_id"] = family::search_family($patient_id); ccdev::form_family_members($menu_id, $post_vars, $get_vars); break; case "IMCI": break; case "BFED": $c->form_ccdev_breastfeed($menu_id, $post_vars, $get_vars, $validuser, $isadmin); break; case "SVC": default: $c->form_ccdev_services($menu_id, $post_vars, $get_vars, $validuser, $isadmin); $c->form_ccdev_remarks($menu_id, $post_vars, $get_vars, $validuser, $isadmin); break; } }