<?php
/**
 * Created by PhpStorm.
 * User: sunusi
 * Date: 2019-01-30
 * Time: 21:41
 */

if (isset($_POST['patientUId'])) {
    if (!empty($_POST['patientUId'])) {
        $patientUId = $_POST['patientUId'];
        //detecting patient details
        $patient = $conn->query("
          SELECT udut_patients.*,
                 udut_patients_types.*
          FROM udut_patients 
          JOIN udut_patients_types
          ON udut_patients.patientTypeId = udut_patients_types.patientTypeId
          WHERE udut_patients.patientUId = '${patientUId}'  
        ")->fetch_assoc();
    } else {
        require path() . "search-patient";
    }
}