echo htmlspecialchars(xl('Notes'), ENT_NOQUOTES); ?> </th> <th><?php echo htmlspecialchars(xl('Completion Status'), ENT_NOQUOTES); ?> </th> <th><?php echo htmlspecialchars(xl('Error'), ENT_NOQUOTES); ?> </th> <th> </th> </tr> <?php $result = getImmunizationList($pid, $_GET['sortby'], true); while ($row = sqlFetchArray($result)) { $isError = $row['added_erroneously']; if ($isError) { $tr_title = 'title="' . xla("Entered in Error") . '"'; } else { $tr_title = ""; } if ($row["id"] == $id) { echo "<tr " . $tr_title . " class='immrow text selected' id='" . htmlspecialchars($row["id"], ENT_QUOTES) . "'>"; } else { echo "<tr " . $tr_title . " class='immrow text' id='" . htmlspecialchars($row["id"], ENT_QUOTES) . "'>"; } // Figure out which name to use (ie. from cvx list or from the custom list) if ($GLOBALS['use_custom_immun_list']) { $vaccine_display = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
//SANITIZE ALL ESCAPES $sanitize_all_escapes = true; // //STOP FAKE REGISTER GLOBALS $fake_register_globals = false; // include_once "../../globals.php"; include_once "{$srcdir}/sql.inc"; include_once "{$srcdir}/options.inc.php"; include_once "{$srcdir}/immunization_helper.php"; //collect facility data $res = sqlQuery("select concat(f.name,'\n',f.street,'\n',f.city,', ',f.state,' ',f.postal_code) as facility_address " . " from facility f, users u " . " where u.facility = f.name " . " and u.id = ?", array($_SESSION['authId'])); //collect patient data $res2 = sqlQuery("select concat(p.lname,', ',p.fname,' ',p.mname) patient_name " . ",date_format(p.DOB,'%c/%e/%Y') as patient_DOB " . ",concat(p.street,'\n',p.city,', ',p.state,' ',p.postal_code) as patient_address" . " from patient_data p where p.pid = ?", array($pid)); //collect immunizations $res3 = getImmunizationList($pid, $_GET['sortby'], false); $data_array = convertToDataArray($res3); $title = xl('Shot Record as of:', '', '', ' ') . date('m/d/Y h:i:s a'); if ($_GET['output'] == "html") { printHTML($res, $res2, $data_array); } else { printPDF($res, $res2, $data_array); } function convertToDataArray($data_array) { $current = 0; while ($row = sqlFetchArray($data_array)) { //admin date $temp_date = new DateTime($row['administered_date']); $data[$current][xl('Date') . "\n" . xl('Admin')] = $temp_date->format('Y-m-d H:i'); //->format('%Y-%m-%d %H:%i');