Exemplo n.º 1
0
 /**
  * bool update(Test $test)
  *
  * Update a medical test in the medical tests table.
  *
  * @param Test $test medical test to update
  * @return boolean returns false, if error occurs
  * @access public
  */
 function update($test)
 {
     if (!$test instanceof Test) {
         $this->_error = "Argument is an inappropriate object.";
         return false;
     }
     $sql = "UPDATE " . $this->_table . " SET " . "document_type=?, " . "path_filename=? " . "WHERE id_test=?;";
     $params = array(urlencode($test->getDocumentType()), urlencode($test->getPathFilename()), $test->getIdTest());
     return $this->exec($sql, $params);
 }
Exemplo n.º 2
0
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$problem = new Problem($idProblem);
if (!$problem) {
    FlashMsg::add(_("That medical problem does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$test = new Test($idProblem, $idTest);
if (!$test) {
    FlashMsg::add(_("That medical test does not exist"), OPEN_MSG_ERROR);
    header("Location: ../medical/test_list.php");
    exit;
}
$formVar["document_type"] = $test->getDocumentType();
$formVar["path_filename"] = $test->getPathFilename();
/**
 * Show page
 */
$title = _("Edit Medical Test");
$titlePage = $patient->getName() . ' [' . $problem->getWordingPreview() . '] (' . $title . ')';
$focusFormField = "document_type";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
//$returnLocation = "../medical/test_list.php?id_problem=" . $idProblem . "&id_patient=" . $idPatient;
$returnLocation = "../medical/test_list.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("Medical Problems Report") => "../medical/problem_list.php", $problem->getWordingPreview() => "../medical/problem_view.php", _("View Medical Tests") => $returnLocation, $title => "");