Exemplo n.º 1
0
 function display_patient_data()
 {
     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];
     }
     $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]);
     $actual_weight = wtforage::get_body_weight($get_vars["consult_id"]);
     $ccdev_id = ccdev::registry_record_exists($patient_id);
     print "<span class='tinylight'>";
     print LBL_CCDEV_ID . ": <font color='red'>" . ($ccdev_id ? module::pad_zero($ccdev_id, 7) : "none") . "</font><br/>";
     print LBL_AGE_IN_WEEKS . ": " . ccdev::get_age_weeks($patient_id) . "<br/>";
     print LBL_WEIGHT . ": {$actual_weight}<br/>";
     list($min, $max, $class) = wtforage::_wtforage($get_vars["consult_id"]);
     if ($class) {
         print LBL_WT_FOR_AGE . ": <font color='red'>" . strtoupper($class) . "</font> (min: {$min}, max: {$max})<br/>";
     } else {
         print LBL_WT_FOR_AGE . ": <font color='red'>" . LBL_NO_WEIGHT_AVAILABLE . "</font><br/>";
     }
     print LBL_IMMUNIZATION_STATUS . ": ";
     $vacc_status = ccdev::determine_vacc_status($patient_id);
     if ($vacc_status == 'Incomplete') {
         echo "<font color='red'><b>{$vacc_status}</b></font><br>";
     } else {
         echo "<b>{$vacc_status}</b><br>";
     }
     print "CHILD PROTECTECTED AT BIRTH" . ": ";
     echo ccdev::get_cpab_status($ccdev_id, $patient_id) . "<br>";
     print "LOW BIRTH WEIGHT" . ": ";
     echo ccdev::check_low_birth_wt($ccdev_id, $patient_id) . '<br>';
     print "</span>";
 }