//
 // GET: /Policlinic/
 public ActionResult Index(int policlinicId)
 {
     ViewBag.PoliclinicId = policlinicId;
     var repository = new Repository();
     ViewBag.Policlinic = repository.GetPoliclinicById(policlinicId);
     return View();
 }
 public int ValidateHomeOrder(Patient patient, string date, int policlinicId)
 {
     var repository = new Repository();
     var result = repository.IsPatientExists(patient);
     if (result == -1)
     {
         return -1;
     }
     return repository.AddHomeVisitHistory(new HomeVisitHistory()
     {
         Date = DateTime.Parse(date),
         Policlinic = repository.GetPoliclinicById(policlinicId),
         Patient = patient
     });
 }