// GET: Patient
        public ActionResult Index(string patientName)
        {
            var model = new RefillViewModel()
            {
                PatientName = patientName
            };

            return(View(model));
        }
        public ActionResult getForm(RefillViewModel model)
        {
            if (ModelState.IsValid)
            {
                // find the guid in the table and return the form
                var pickupManager   = new PickUpsDBManager();
                var retrievedPickup = pickupManager.findPickUpByPatientName(model.PatientName);

                if (model.Code == retrievedPickup.GuidRand)
                {
                    var refillresponsemodel = new RefillResponseViewModel();
                    refillresponsemodel.CommunicationType = (int)CommunicationPreferenceId.Email;
                    refillresponsemodel.pickupId          = retrievedPickup.PickupId;
                    return(PartialView("_RefillResponsePartialView", refillresponsemodel));
                }
            }
            return(RedirectToAction("Index"));
        }