*/
$tab = "medical";
$nav = "history";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_DOCTOR);
require_once "../model/Query/History.php";
require_once "../model/Patient.php";
/**
 * Retrieving var (PGS)
 */
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
/**
 * Search database for problem
 */
$historyQ = new Query_History();
if (!$historyQ->selectPersonal($idPatient)) {
    $historyQ->close();
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$history = $historyQ->fetch();
 */
$tab = "medical";
$nav = "history";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
require_once "../model/Query/History.php";
require_once "../model/Patient.php";
/**
 * Retrieving var (PGS)
 */
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("Beneficiário não cadastrado."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
/**
 * Search database
 */
$historyQ = new Query_History();
if (!$historyQ->selectPersonal($idPatient)) {
    $historyQ->close();
    FlashMsg::add(_("Beneficiário não cadastrado."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$history = $historyQ->fetch();
예제 #3
0
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_DOCTOR, false);
// Not in DEMO to prevent users' malice
require_once "../model/Query/Test.php";
require_once "../model/Patient.php";
require_once "../model/Problem.php";
/**
 * Retrieving vars (PGS)
 */
$idProblem = Check::postGetSessionInt('id_problem');
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    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;
}
/**
 * Show page
 */
$title = _("View Medical Tests");
$titlePage = $patient->getName() . ' [' . $problem->getWordingPreview() . '] (' . $title . ')';
예제 #4
0
<?php

function __autoload($class_name)
{
    include 'classes/encapsulation/' . $class_name . '.php';
}
$patient = new Patient("Brian");
$patient->setWeight('200');
$patient->setHeight('72');
echo $patient->getName() . "<br>";
if ($patient->getBMI()) {
    echo $patient->getBMI() . "<br>";
}
예제 #5
0
 */
$title = _("Delete Relative from list");
$titlePage = $patient->getName() . ' (' . $title . ')';
require_once "../layout/header.php";
//$returnLocation = "../medical/relative_list.php?id_patient=" . $idPatient; // controlling var
$returnLocation = "../medical/relative_list.php";
// controlling var
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("View Relatives") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
/**
 * Confirm form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/relative_del.php'));
$tbody = array();
$relative = new Patient($idRelative);
$tbody[] = Msg::warning(sprintf(_("Are you sure you want to delete relative, %s, from list?"), $relative->getName()));
$row = Form::hidden("id_patient", $idPatient);
$row .= Form::hidden("id_relative", $idRelative);
$row .= Form::hidden("name", $relative->getName());
$tbody[] = $row;
$tfoot = array(Form::button("delete", _("Delete")) . Form::generateToken());
$options = array('class' => 'center');
echo Form::fieldset($title, $tbody, $tfoot, $options);
echo HTML::end('form');
echo HTML::para(HTML::link(_("Return"), $returnLocation));
require_once "../layout/footer.php";
예제 #6
0
$tab = "medical";
$nav = "problems";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
require_once "../model/Patient.php";
require_once "../model/Problem.php";
/**
 * Retrieving vars (PGS)
 */
$idProblem = Check::postGetSessionInt('id_problem');
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("O beneficiário em questão não possui cadastro."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$problem = new Problem($idProblem);
if (!$problem) {
    FlashMsg::add(_("Nenhum atendimento foi realizado até o momento."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$formVar["id_problem"] = $idProblem;
$formVar["id_patient"] = $idPatient;
$formVar["order_number"] = $problem->getOrderNumber();
$formVar["opening_date"] = $problem->getOpeningDate();
if (!isset($formError)) {
예제 #7
0
$tab = "medical";
$nav = "social";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
require_once "../lib/Form.php";
require_once "../lib/Check.php";
require_once "../model/Patient.php";
/**
 * Retrieving vars (PGS)
 */
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
/**
 * Show page
 */
$title = _("Delete Patient");
$titlePage = $patient->getName() . ' (' . $title . ')';
require_once "../layout/header.php";
//$returnLocation = "../medical/patient_view.php?id_patient=" . $idPatient; // controlling var
$returnLocation = "../medical/patient_view.php";
// controlling var
/**
 * Breadcrumb
예제 #8
0
 public function getName()
 {
     return strtoupper(parent::getName());
 }
예제 #9
0
$nav = "problems";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_DOCTOR);
require_once "../model/Query/Staff.php";
require_once "../model/Patient.php";
require_once "../model/Problem.php";
/**
 * Retrieving vars (PGS)
 */
$idProblem = Check::postGetSessionInt('id_problem');
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    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;
}
if ($problem->getClosingDate() != "" && $problem->getClosingDate() != '0000-00-00') {
    $nav = "history";
}
/**
 * Update session variables
예제 #10
0
$nav = "problems";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_DOCTOR);
require_once "../model/Query/Staff.php";
require_once "../model/Patient.php";
require_once "../model/Problem.php";
/**
 * Retrieving vars (PGS)
 */
$idProblem = Check::postGetSessionInt('id_problem');
$idPatient = Check::postGetSessionInt('id_patient');
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("O beneficiário não existe."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$problem = new Problem($idProblem);
if (!$problem) {
    FlashMsg::add(_("O registro procurado não existe."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
if ($problem->getClosingDate() != "" && $problem->getClosingDate() != '0000-00-00') {
    $nav = "history";
}
/**
 * Update session variables
예제 #11
0
 */
$tab = "medical";
$nav = "problems";
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
/**
 * Retrieving vars (PGS)
 */
$idPatient = Check::postGetSessionInt('id_patient');
$orderNumber = Check::postGetSessionInt('order_number', isset($formVar["order_number"]) ? $formVar["order_number"] - 1 : 0);
require_once "../model/Patient.php";
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
// after clean form vars
$formVar["id_patient"] = $idPatient;
//$formVar["id_member"] = ???; // @fixme si no está vacía y es la primera vez que se accede aquí es igual al médico que le corresponde por cupo?
$formVar["order_number"] = $orderNumber + 1;
$formVar["opening_date"] = date("Y-m-d");
// automatic date (ISO format) without getText
$formVar["last_update_date"] = date("Y-m-d");
// automatic date (ISO format) without getText
/**
 * Show page
 */
예제 #12
0
/**
 * Checking permissions
 */
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
/**
 * Retrieving vars (PGS)
 */
$idPatient = Check::postGetSessionInt('id_patient');
/**
 * Checking for $formError to read data from database
 */
if (!isset($formError)) {
    include_once "../model/Patient.php";
    $patient = new Patient($idPatient);
    $patName = $patient->getName();
    if ($patName == '') {
        FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
        header("Location: ../medical/patient_search_form.php");
        exit;
    }
    /**
     * load up post vars
     */
    $formVar["id_patient"] = $idPatient;
    //$formVar["last_update_date"] = date("Y-m-d"); // automatic date (ISO format)
    $formVar["id_member"] = $patient->getIdMember();
    $formVar["nif"] = $patient->getNIF();
    $formVar["first_name"] = $patient->getFirstName();
    $formVar["surname1"] = $patient->getSurname1();
    $formVar["surname2"] = $patient->getSurname2();
예제 #13
0
 */
$idPatient = Check::postGetSessionInt('id_patient');
$currentPage = Check::postGetSessionInt('page', 1);
$searchType = Check::postGetSessionInt('search_type');
$logical = Check::postGetSessionString('logical');
$limit = Check::postGetSessionInt('limit');
// remove slashes added by form post
$searchText = stripslashes(Check::postGetSessionString('search_text'));
// remove redundant whitespace
$searchText = preg_replace("/[[:space:]]+/i", " ", $searchText);
// secure data
$searchText = urlencode($searchText);
// explode data
$arraySearch = explode("+", $searchText);
$patient = new Patient($idPatient);
if ($patient->getName() == '') {
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
/**
 * Search database
 */
$patQ = new Query_Page_Patient();
$patQ->setItemsPerPage(OPEN_ITEMS_PER_PAGE);
$patQ->search($searchType, $arraySearch, $currentPage, $logical, $limit);
/**
 * No results message if no results returned from search.
 */
if ($patQ->getRowCount() == 0) {
    $patQ->close();