Exemplo n.º 1
0
$findby = $_SESSION["findby"];
$lastname = $_SESSION["lastname"];
$firstname = $_SESSION["firstname"];
// do the search, if we have some good criteria
if (isset($lastname) && $lastname != "") {
    if ($findby == "Last") {
        $result = getPatientLnames("{$lastname}", "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
    } elseif ($findby == "ID") {
        $result = getPatientId("{$lastname}", "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
    } elseif ($findby == "DOB") {
        $result = getPatientDOB("{$lastname}", "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
    } elseif ($findby == "SSN") {
        $result = getPatientSSN("{$lastname}", "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
    } elseif ($searchby == "Phone") {
        //(CHEMED) Search by phone number
        $result = getPatientPhone("{$searchparm}", "*");
    }
}
?>

<html>
<head>
<?php 
html_header_show();
?>

<link rel="stylesheet" href="<?php 
echo $css_header;
?>
" type="text/css">
<style>
Exemplo n.º 2
0
    echo "<input type='hidden' name='patient' value='{$patient}' />\n";
    echo "<input type='hidden' name='findBy'  value='{$findBy}' />\n";
    if ($findBy == "Last") {
        $result = getPatientLnames("{$patient}", $given, $orderby, $sqllimit, $fstart);
    } else {
        if ($findBy == "ID") {
            $result = getPatientId("{$patient}", $given, "id ASC, " . $orderby, $sqllimit, $fstart);
        } else {
            if ($findBy == "DOB") {
                $result = getPatientDOB("{$patient}", $given, "DOB ASC, " . $orderby, $sqllimit, $fstart);
            } else {
                if ($findBy == "SSN") {
                    $result = getPatientSSN("{$patient}", $given, "ss ASC, " . $orderby, $sqllimit, $fstart);
                } elseif ($findBy == "Phone") {
                    //(CHEMED) Search by phone number
                    $result = getPatientPhone("{$patient}", $given, $orderby, $sqllimit, $fstart);
                } else {
                    if ($findBy == "Any") {
                        $result = getByPatientDemographics("{$patient}", $given, $orderby, $sqllimit, $fstart);
                    } else {
                        if ($findBy == "Filter") {
                            $result = getByPatientDemographicsFilter($searchFields, "{$patient}", $given, $orderby, $sqllimit, $fstart);
                        }
                    }
                }
            }
        }
    }
}
?>