public ActionResult Create(MedicalHistory medicalHistory) { if (ModelState.IsValid) { MedicalHistoriesBusinessLayer businessLayer = new MedicalHistoriesBusinessLayer(); if (appointmentId != null) { medicalHistory.AppointmentId = (int)appointmentId; AppointmentBusinessLayer appointmentBusinessLayer = new AppointmentBusinessLayer(); appointmentBusinessLayer.ChangeAppointmentStatus(medicalHistory.AppointmentId); } medicalHistory.PatientId = patientId; businessLayer.AddHistory(medicalHistory); Logging.loggInfo($"Medcial history added of the patient having patient id = {medicalHistory.PatientId}"); return Redirect("/Patients/Details/" + patientId); } return View(medicalHistory); }
public void ChangeAppointmentStatus(int appointmentId) { Boolean isStatausChanged = appointmentBusinessLayer.ChangeAppointmentStatus(appointmentId); }