コード例 #1
0
ファイル: index.php プロジェクト: arnoldllanes/SeekData
<?php

require_once "../inc/config.php";
require_once ROOT_PATH . "/core/database/connect.php";
require_once ROOT_PATH . "/core/functions/functions.php";
//Get all patients from database
$patients = get_all_patients();
$c = 1;
foreach ($patients as $patient) {
    echo '<table>' . $c++ . "." . get_list_view_html_testing($patient) . '</table>';
}
//List view of each patients
function get_list_view_html_testing($patient)
{
    $output = "";
    $output = $output . '<tr class="effect">';
    $output = $output . '<td>';
    $output = $output . '<p>' . '<a href="' . BASE_URL . 'TestingFormFiles/patientResult.php?id=' . $patient["id"] . '">' . $patient["MRN"] . '</a>' . '</p>';
    $output = $output . '</td>';
    $output = $output . '<td>';
    $output = $output . '<p>' . $patient["first_name"] . '</p>';
    $output = $output . '</td>';
    $output = $output . '<td>';
    $output = $output . '<p>' . $patient["last_name"] . '</p>';
    $output = $output . '</td>';
    $output = $output . '<td>';
    $output = $output . '<p>' . $patient["address"] . '</p>';
    $output = $output . '</td>';
    $output = $output . '<td>';
    $output = $output . '<p>' . $patient["zip_code"] . '</p>';
    $output = $output . '</td>';
コード例 #2
0
ファイル: functions.php プロジェクト: arnoldllanes/SeekData
function get_patient_subset($positionStart, $positionEnd)
{
    $subset = array();
    $all = get_all_patients();
    $position = 0;
    foreach ($all as $patient) {
        $position = $position + 1;
        if ($position >= $positionStart && $position <= $positionEnd) {
            $subset[] = $patient;
        }
    }
    return $subset;
}