コード例 #1
0
<?php

include 'init.php';
if (!logged_in()) {
    header('Location: index.php');
    exit;
}
$msg = "";
if (isset($_SESSION['msg']) && !empty($_SESSION['msg'])) {
    $msg = $_SESSION['msg'];
}
unset($_SESSION['msg']);
if (!isset($_GET["pid"]) || empty($_GET["pid"]) || checkPID($_GET["pid"]) === false) {
    header("Location: pagenotfound.php");
    exit;
}
$pid = $_GET["pid"];
$ptInfo = getPtInfo($pid);
if (empty($ptInfo)) {
    header("Location: pagenotfound.php");
    exit;
} else {
    foreach ($ptInfo as $in) {
        $pid = $in["pid"];
        $firstname = $in["firstname"];
        $middlename = $in["middlename"];
        $lastname = $in["lastname"];
        $membership = $in["membership"];
        $sex = $in["sex"];
        $cs = $in["cs"];
        $dob = $in["dateofbirth"];
コード例 #2
0
<?php

include 'init.php';
if (!logged_in()) {
    header('Location: index.php');
    exit;
}
if (!isset($_GET['pid']) || !isset($_GET["scid"]) || empty($_GET['pid']) || empty($_GET["scid"]) || checkPID($_GET['pid']) === false || $_SESSION["scid"] != $_GET["scid"]) {
    header('Location: pagenotfound.php');
    exit;
}
$pid = $_GET["pid"];
$ptInfo = getPtInfo($pid);
if (empty($ptInfo)) {
    header("Location: pagenotfound.php");
    exit;
} else {
    foreach ($ptInfo as $in) {
        $pid = $in["pid"];
        $firstname = $in["firstname"];
        $middlename = $in["middlename"];
        $lastname = $in["lastname"];
        $membership = $in["membership"];
        $sex = $in["sex"];
        $cs = $in["cs"];
        $dob = $in["dateofbirth"];
        $dateofbirth = date('F d, Y', strtotime($in["dateofbirth"]));
        $opdnum = $in["opdnum"];
        $address = $in["address"];
    }
}
コード例 #3
0
foreach ($drpt as $d) {
    $curr_doc = $d["did"];
}
if (empty($service)) {
    $error[] = "Please select a service where the patient will be admitted.";
}
if (empty($roomtype)) {
    $error[] = "Please select the type of room where the patient will be admitted.";
}
if (empty($bednum)) {
    $error[] = "Please select a bed where the patient will be admitted.";
}
if (empty($docid)) {
    $error[] = "Select the Admitting Doctor";
} else {
    if (checkPID($pid) === false) {
        $error[] = "The patient does not exist. Please try again.";
    }
    if (checkRecord($pid, $rid) === false) {
        $error[] = "The record that you've passed is not available. Please try again";
    }
    if (checkForAdmit($pid, $rid) === false) {
        $error[] = "The patient is not for admission.";
    }
}
if (!empty($errors)) {
    foreach ($errors as $error) {
        $return['error'] = true;
        $return['msg'][] = $error . "\n";
    }
} else {
コード例 #4
0
<?php

include 'init.php';
if (!logged_in()) {
    header('Location: index.php');
    exit;
}
if (!isset($_GET["pid"]) || empty($_GET["pid"]) || checkPID($_GET["pid"]) === false || checkForAdmit($_GET["pid"], $_GET["rid"]) === true) {
    header("Location: pagenotfound.php");
    exit;
}
$pid = $_GET["pid"];
$rid = $_GET["rid"];
$adm = getAdmissionDet($pid, $rid);
if (empty($adm)) {
    header("Location: pagenotfound.php");
    exit;
} else {
    foreach ($adm as $ad) {
        $aid = $ad["aid"];
        $getdatead = date('Y-m-d', strtotime($ad["dateadmitted"]));
        $service = $ad["service"];
        $roomno = $ad["roomno"];
        $dayadmitted = date('d', strtotime($ad["dateadmitted"]));
        $dateadmitted = date('F d, Y', strtotime($ad["dateadmitted"]));
        $timeadmitted = date('h:m a', strtotime($ad["dateadmitted"]));
    }
}
$ptInfo = getPtInfo($pid);
if (empty($ptInfo)) {
    header("Location: pagenotfound.php");
コード例 #5
0
<?php

include 'init.php';
if (!logged_in()) {
    header('Location: index.php');
    exit;
}
if (!isset($_GET["type"]) || !isset($_GET["pid"]) || !isset($_GET["loc"]) || empty($_GET["type"]) || empty($_GET["pid"]) || empty($_GET["loc"]) || checkPID($_GET["pid"]) === false || checkPriviledgeBilling($_SESSION['uid']) === true) {
    header("Location: pagenotfound.php");
    exit;
}
$type = $_GET["type"];
$pid = $_GET["pid"];
$loc = $_GET["loc"];
if (isset($type) || !empty($type)) {
    switch ($type) {
        case 'edit':
            switch ($loc) {
                case 'pt':
                    $rid = "";
                    break;
                case 'rec':
                    if (!isset($_GET["rid"]) || empty($_GET["rid"]) || checkRecord($pid, $_GET["rid"]) === false) {
                        header("Location: pagenotfound.php");
                        exit;
                    } else {
                        $rid = $_GET["rid"];
                    }
            }
            break;
        case 'delete':