Пример #1
0
    if (is_array($result)) {
        echo JsonResponse::success($result);
        exit;
    } else {
        echo JsonResponse::error("Unable to retrieve in-patient report for the specified dates!");
        exit;
    }
} elseif ($intent == 'consultationReport') {
    ReportController::datesIncluded();
    $result = ReportController::consultationReport();
    if (is_array($result)) {
        echo JsonResponse::success($result);
        exit;
    } else {
        echo JsonResponse::error("Unable to retrieve consultation report for the specified dates!");
        exit;
    }
} elseif ($intent == 'patientDiagnosis') {
    ReportController::datesIncluded();
    $result = ReportController::patientDiagnosis();
    if (is_array($result)) {
        echo JsonResponse::success($result);
        exit;
    } else {
        echo JsonResponse::error("Unable to retrieve patient diagnosis report for the specified dates!");
        exit;
    }
} else {
    echo JsonResponse::error("Invalid request intent!");
    exit;
}
Пример #2
0
<?php

/**
 * Created by PhpStorm.
 * User: Olaniyi
 * Date: 6/4/15
 * Time: 3:37 PM
 */
require_once 'includes/iframe-header.php';
require_once '../../_core/global/_require.php';
Crave::requireAll(GLOBAL_VAR);
Crave::requireAll(UTIL);
Crave::requireFiles(MODEL, array('BaseModel', 'ReportModel'));
Crave::requireFiles(CONTROLLER, array('ReportController'));
$patients_diagnosis = ReportController::patientDiagnosis();
?>

    <table class="table table-responsive dataTable">
        <thead>
        <tr>
            <th>S/N</th>
            <th>Name</th>
            <th>Registration Number</th>
            <th>Diagnosis</th>
            <th>Consultation Date</th>
        </tr>
        </thead>
        <tbody id="new_patient">
        <?php 
if (count($patients_diagnosis) == 0) {
    ?>