// GET: Patients/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(Redirect("/Error/Index?error=400"));
            }
            Patient patient = patientBusinessLayer.GetPatientById((int)id);

            if (patient == null)
            {
                Logging.loggError($"No Patient found having Patient id = {id}");
                return(Redirect("/Error/Index"));
            }
            Logging.loggInfo($"Showing results of patient having patient id = {id} and Name = {patient.PatientUser.Name}");
            return(View(patient));
        }
        public void TestEditDetails()
        {
            PatientBusinessLayer businessLayer = new PatientBusinessLayer();
            Patient patient = businessLayer.GetPatientByEmail("*****@*****.**");

            patient.PatientUser.Name     = "TestEdit";
            patient.EmergengyContactName = "TestMother";
            businessLayer.UpdatePatientDetials(patient);
            Assert.AreEqual("TestEdit", businessLayer.GetPatientNameById(patient.Id));
            Assert.AreEqual("TestMother", businessLayer.GetPatientById(patient.Id).EmergengyContactName);
        }