function display_ccdev_firstvisit() { 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); } print "<b>" . FTITLE_FIRST_VISIT_DATA . "</b><br/><br/>"; $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $sql = "select ccdev_id, patient_id, " . "mother_name, mother_educ_id, mother_occup_id, " . "father_name, father_educ_id, father_occup_id, " . "date_format(ccdev_timestamp, '%a %d %b %Y, %h:%i%p'), ccdev_dob, " . "birth_weight, delivery_location,date_format(date_registered,'%a %d %b %Y') actual_serv_date " . "from m_patient_ccdev where patient_id = '{$patient_id}'"; $result = mysql_query($sql) or die(mysql_error()); if ($result) { if (mysql_num_rows($result)) { list($cid, $pid, $mname, $meduc, $moccup, $fname, $feduc, $foccup, $ts, $dob, $bw, $loc, $actual_serv_date) = mysql_fetch_array($result); print "<table cellpadding='3' style='border: 1px dashed black'><tr><td>"; print "<form method='post' action='" . $_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"] . "&ccdev=" . $get_vars["ccdev"] . "#visit'>"; print "REGISTRY ID: <b>" . module::pad_zero($cid, 7) . "</b><br/>"; print "DATE: <b>{$actual_serv_date}</b><br/><br/>"; print "MOTHER: {$mname}<br/>"; print "Education: " . education::get_education_name($meduc) . "<br/>"; print "Occupation: " . occupation::get_occupation_name($moccup) . "<br/><br/>"; print "FATHER: {$fname}<br/>"; print "Education: " . education::get_education_name($feduc) . "<br/>"; print "Occupation: " . occupation::get_occupation_name($foccup) . "<br/><br/>"; print "DELIVERY LOCATION: {$loc}<br/>"; print "BIRTH WEIGHT: {$bw} KG<br/><br/>"; if ($_SESSION["priv_update"]) { print "<input type='hidden' name='ccdev_id' value='{$cid}'/>"; print "<input type='submit' name='submitccdev' value='Update Visit Data' class='tinylight' style='border: 1px solid black'/>"; } print "</form>"; print "</td></tr></table><br/>"; } } }