Читать диплом по Отсутствует: "Automation of business processes in hospitals" Страница 16

назад (Назад)скачать (Cкачать работу)

Функция "чтения" служит для ознакомления с работой. Разметка, таблицы и картинки документа могут отображаться неверно или не в полном объёме!

Haack, Brad Wilson, K. Scott Allen, “Professional ASP.NET MVC 4”, John Wiley & Sons, Inc., Indianapolis, Indiana, 2012

. Jess Chadwick, Todd Snyder, Hrusikesh Panda, “Programming ASP.NET MVC 4”, O’Reilly Media, Inc., Sebastopol, 2012

. Judith Bishop, “C# 3.0 Design Patterns”, O’Reilly Media, Inc., Sebastopol, 2008

. Julia Lerman, “Programming Entity Framework, 2nd Edition”, O’Reilly Media, Inc., Sebastopol, 2010

. Paul Kimmel, “LINQ Unleashed for C#”, Pearson Education, Inc., Indianapolis, Indiana, 2009

. Mickey Gousset, Brian Keller, Martin Woodward, “Professional Application Lifecycle Management with Visual Studio”, John Wiley & and Sons, Inc., Indianapolis, Indiana, 2012

. Julia Lerman, Rowan Miller, “Programming Enitty Framework: Code First”, O’Reilly Media, Inc., Sebastopol, 2012

. Scott Shaw, Kathi Kellenberger, “Beginnig T-SQL, 2nd Edition”, Springer Science and Business Media NY, New York, 2012

. Gavin Powell, “Beginning Database Design”, Wiley Publishing, Inc., Indianapolis, Indiana, 2006

. James Bender, Jeff McWherter, “Professional Test-Driven Development with C#: Developing Real World Applications with TDD”, Wiley Publishing, Inc., Indianapolis, Indiana, 2011

. Robert C. Martin, “Clean Code: A Handbook of Agile Software Craftsmanship”, Pearson Education, Inc., Indianapolis, Indiana, 2009

APPENDIX A The source code of the system [HttpGet]

[Authorize]ActionResult GetRequests(string message)

{.Message = message;currentDoctor = PublicClass.UnitOfWork.DoctorRepository.ItemsWithInclude(doctor => doctor.Organization)

.Single(doctor => doctor.Login == User.Identity.Name);["CurrentDoctor"] = currentDoctor;model = new GetRequestsModel

{=.Organization.Requests.Select(request => request.Patient).ToList()

.Select(x => new SelectListItem

{= x.Id.ToString(),= string.Format("{0} {1}", x.LastName, x.FirstName)

})

};View(model);

}

[HttpPost]

[Authorize]

[ValidateAntiForgeryToken]ActionResult GetRequests(GetRequestsModel model, string command)

{(command == "Open patient info")

{selectedPatient = PublicClass.UnitOfWork.PatientRepository

.ItemsWithInclude(u => u.Address, u => u.Address.Province, u => u.MedicalCard,=> u.MedicalCard.OrganizationCreator, u => u.MedicalCard.DoctorCreator)

.SingleOrDefault(u => u.Id == model.SelectedUser);(selectedPatient == null)

{RedirectToAction("GetRequests", "DoctorCardOperation", new { message = "Select a patient first" });

}["PatientRequest"] = selectedPatient;RedirectToAction("GetRequest", "DoctorCardOperation");

}RedirectToAction("DoctorIndex", "DoctorMain");

}

[HttpGet]

[Authorize]ActionResult GetRequest(string message)

{.Message = message;patient = Session["PatientRequest"] as Patient;["PatientForCardOpen"] = patient;model = new GetRequestModel

{= patient.Login,= patient.FirstName,= patient.LastName,= patient.Gender,= patient.Email,= patient.Phone,= (DateTime) patient.BirthDate,= patient.Address.Province.Name,= patient.Address.AddressLine,= patient.IsResident.ToString()

};View(model);

}

[HttpGet]

[Authorize]ActionResult CreateAppointment(Doctor doctor, string message)

{.Message = message;patient = Session["PatientRequest"] as Patient;appointerDoctor = Session["CurrentDoctor"] as Doctor;["DoctorRequest"] = doctor;model = new CreateAppointmentModel

{= patient.Login,= patient.FirstName,= patient.LastName,= doctor.Login,= doctor.FirstName,= doctor.LastName

};View(model);

}

[HttpPost]

[Authorize]

[ValidateAntiForgeryToken]ActionResult CreateAppointment(CreateAppointmentModel model, string command)

{appointerDoctor = Session["CurrentDoctor"] as Doctor;receiverDoctor = Session["DoctorRequest"] as Doctor;patient = Session["PatientRequest"] as Patient;(command == "Back to patient card operation page")

{RedirectToAction("GetRequest", "DoctorCardOperation");

}(command == "Write feedback")

{RedirectToAction("WriteFeedback", "AdditionalFunction");

}(patient.MedicalCard == null)

{

// If we got this far, something failed, redisplay form.AddModelError("", "Patient has not a medical card");View();

}(command == "Create")

{appointment = new Appointment

{= model.Title,= model.Description,= true,= DateTime.Now,= null,= receiverDoctor,= patient.MedicalCard

};.UnitOfWork.AppointmentRepository.Add(appointment);RedirectToAction("GetRequest", "DoctorCardOperation", new {message = "The operation was successful"});

}RedirectToAction("CreateAppointment", "DoctorCardOperation", new { message = "You have to fill all empty areas" });

}

[HttpGet]

[Authorize]ActionResult CreateIllness(Appointment appointment, string message)

{.Message = message;(Session["AppointmentList"] == null)

{["AppointmentList"] = new List();

}

{

((List) Session["AppointmentList"]).Add(appointment);

}attendingDoctor = Session["CurrentDoctor"] as Doctor;patient = Session["PatientRequest"] as Patient;model = new CreateIllnessModel

{= attendingDoctor.Login,= attendingDoctor.FirstName,= attendingDoctor.LastName,= patient.Login,= patient.FirstName,= patient.LastName,= ((List) Session["AppointmentList"]).Select(x => new SelectListItem

{= x.Id.ToString(),= string.Format("{0}", x.Title)

})

};View(model);

}

[HttpPost]

[Authorize]

[ValidateAntiForgeryToken]ActionResult CreateIllness(CreateIllnessModel model, string command)

{attendingDoctor = Session["CurrentDoctor"] as Doctor;patient = Session["PatientRequest"] as Patient;(command == "Add appointment")


Интересная статья: Основы написания курсовой работы