/** * * PRINT PATIENT HISTORY (NOTES) * */ function PrintPatientNotes($pid, $note, $color1, $color2, $recs, $enno) { global $db; //$db->debug=TRUE; $nipo = FALSE; $notename = ''; $none = ''; $cc = '1'; $MORE = $this->viewtype == 4 ? ' AND type_nr=' . $this->viewtype : ''; $this->sql = "SELECT date, notes, create_id, short_notes, encounter_nr, type_nr, nr FROM care_encounter_notes WHERE (encounter_nr IN (SELECT encounter_nr FROM care_encounter WHERE pid = '{$pid}')) " . $MORE . " ORDER BY encounter_nr"; $this->result = $db->Execute($this->sql); $nb = rand(10220, 500000); while ($this->row = $this->result->FetchRow()) { $nipo = TRUE; $printThiSs = TRUE; $prowexist = '<tr style="background:yellow;" id="w' . $nb . 'j9">'; $prrow = $cc == '1' ? '<tr style="background:white;" id="w' . $nb . 'j9">' : '<tr style="background:#F1F5F1;" id="w' . $nb . 'j9">'; $this->row[4] == $enno ? print $prowexist : (print $prrow); $cc = $cc == '1' ? '2' : '1'; echo '<td valign="top">' . date('d/M/Y', strtotime($this->row[0])) . '</td>'; echo '<td valign="top" style=" padding-bottom:15px;">'; if ($this->row[5]) { $bc = new dental(); $notename = $bc->GetNameOfNotesFromType($this->row[5]); echo '' . '' . '<div style="border-bottom:1px dotted #ccc; padding:2px; margin-bottom:10px; width:97%; font-weight:normal; color: #359F45;">' . '<b>¤' . $notename . '</b>'; $this->row[3] ? print '<br><br><span style="color:red;"> <b>Brief: </b>' . nl2br($this->row[3]) . '</span>' : (print $none); echo '</div>' . ''; } echo '' . '<div style="width:100%;">' . '' . nl2br($this->row[1]) . '' . '</div>' . '' . '</td>'; echo '<td valign="top">' . $this->row[2] . '' . '<br />' . '<br />' . '<br />' . '<br />' . '<br />' . ($this->row[4] == $enno ? '<a href="Javascript:void(0);" onclick="navigate(\'' . $this->row['encounter_nr'] . '&id=' . $this->row['nr'] . '&mode=edit&url../dental/gui_patient_history.php|' . $pid . '\', \'../dental/gui_dental_addnotes.php\')">Edit</a> ' . '| ' . '<a href="Javascript:void(0);" onclick="if (confirm(\'Remove: ' . addslashes(nl2br($this->row[1])) . '\')){xtarget=\'w' . $nb . 'j9\'; navigate(\'&mode=remove&nr=' . $this->row['nr'] . '&table=care_encounter_notes&col=nr\', \'../dental/_act_.php\'); $(\'#w' . $nb . 'j9\').fadeOut(); };">Delete</a>' : '') . '</td>'; echo '</tr>'; $nb++; } // end while }