示例#1
0
 /**
  * mixed Patient(int $id = 0)
  *
  * Constructor
  *
  * @param int $id (optional)
  * @return mixed void if not argument, null if not exists patient, object otherwise
  * @access public
  */
 public function Patient($id = 0)
 {
     $this->_trans = array_flip(get_html_translation_table(HTML_SPECIALCHARS));
     if ($id) {
         $_patQ = new Query_Page_Patient();
         if (!$_patQ->select($id)) {
             return null;
         }
         foreach (get_object_vars($_patQ->fetch()) as $key => $value) {
             $this->{$key} = $value;
         }
         $_patQ->freeResult();
         $_patQ->close();
     }
 }
示例#2
0
$patQ->search($searchType, $arraySearch, $currentPage, $logical, $limit);
/**
 * No results message if no results returned from search.
 */
if ($patQ->getRowCount() == 0) {
    $patQ->close();
    FlashMsg::add(sprintf(_("No results found for '%s'."), $searchText));
    header("Location: ../medical/patient_search_form.php");
    exit;
}
/**
 * Show patient view screen if only one result from query
 */
if ($patQ->getRowCount() == 1) {
    $pat = $patQ->fetch();
    $patQ->freeResult();
    $patQ->close();
    header("Location: ../medical/patient_view.php?id_patient=" . $pat->getIdPatient());
    exit;
}
/**
 * Show page
 */
$title = _("Search Results");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", _("Search Patient") => "../medical/patient_search_form.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_search");
unset($links);