Exemple #1
0
        echo JsonResponse::error("Unable to retrieve patient visitation report for the specified date!");
        exit;
    }
} elseif ($intent == 'inPatients') {
    ReportController::datesIncluded();
    $result = ReportController::inPatients();
    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!");