public ActionResult Index(FormCollection fc)
 {
     if (ModelState.IsValid)
     {
         Stopwatch sw = new Stopwatch();
         sw.Start();
         try
         {
             TryUpdateModel(viewModel);
             Session["ReportsViewModel"] = viewModel;
             viewModel.ClearSelectedServiceLine();
             viewModel.SetSelectedServiceLine(fc["SelectedServiceLine"]);
             Session["ReportsViewModel"] = viewModel;//update the session var to save off the selected service line.
             SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
             var sqlHelper = new SqlHelper(systemDataProvider);
             sqlHelper.GetServiceLineDataByOrganization(viewModel);
         }
         finally
         {
             sw.Stop();
             LoggerHelper.RecordTiming(System.Reflection.MethodBase.GetCurrentMethod().Name, sw, log);
             var json = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(viewModel.ServiceLineExplorerResultsByFacility);
             log.DebugFormat("JSON = {0}", json);
         }
         return View(viewModel);
     }
     return View();
 }
 public IRMReportDataProvider(ISystemDataProvider  dataProvider)
 {
     _healthcareSystemId = dataProvider.CurrentHealthSystemID.Value;
     sqlHelper = new SqlHelper(dataProvider);
 }
 public ActionResult PatientExplorer(FormCollection fc)
 {
     if (ModelState.IsValid)
     {
         Stopwatch sw = new Stopwatch();
         sw.Start();
         try
         {
             TryUpdateModel(viewModel);
             Session["ReportsViewModel"] = viewModel;
             SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
             var sqlHelper = new SqlHelper(systemDataProvider);
             sqlHelper.GetPatentExplorerData(viewModel);
         }
         finally
         {
             sw.Stop();
             LoggerHelper.RecordTiming(System.Reflection.MethodBase.GetCurrentMethod().Name, sw, log);
         }
         return View(viewModel);
     }
     return View();
 }
        public PartialViewResult ServiceGroupDetails(int idx, string name)
        {
            var sgViewmodel = new ServiceGroupDetailsViewmodel()
            {
                Idx = idx,
                Name = name,
                StartDate = viewModel.StartDate,
                EndDate = viewModel.EndDate,
                DiagnosisCodeIDlist = viewModel.DiagnosisCodeIDlist,
                ServiceLinesList = viewModel.ServiceLinesList,
                PatientTypesList = viewModel.PatientTypesList,
                ClientOrganizationIDList = viewModel.ClientOrganizationIDList,
                OrganizationList = viewModel.OrganizationList,
                EncounterTypesIDlist = viewModel.EncounterTypesIDlist,
                EncounterTypesList = viewModel.EncounterTypesList,
                CustomerTypesList = viewModel.CustomerTypesList
            };

            if (ModelState.IsValid)
            {
                Stopwatch sw = new Stopwatch();
                sw.Start();

                var pv = PartialView("_ServiceGroupDetailsPartialView", sgViewmodel);
                try
                {
                    SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
                    var sqlHelper = new SqlHelper(systemDataProvider);
                    sqlHelper.GetServiceLineGroupDetails(sgViewmodel);
                    Session.Add("ServiceGroupDetails", sgViewmodel);
                }
                finally
                { 
                    sw.Stop();
                    LoggerHelper.RecordTiming(System.Reflection.MethodBase.GetCurrentMethod().Name, sw, log);
                }
                return pv;
            }
            return null;
        }
 public ActionResult GeographicExplorer(FormCollection fc)
 {
     if (ModelState.IsValid)
     {
         Stopwatch sw = new Stopwatch();
         sw.Start();
         try
         {
             TryUpdateModel(viewModel);
             Session["ReportsViewModel"] = viewModel;
             SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
             var sqlHelper = new SqlHelper(systemDataProvider);
             sqlHelper.GetGeographicData(viewModel);
             viewModel.GeographicViewmodel.SetFillColors();
             viewModel.GeographicVMJSON = string.Empty;
             viewModel.GeographicVMJSON = new JavaScriptSerializer().Serialize(viewModel);
         }
         finally
         {
             sw.Stop();
             LoggerHelper.RecordTiming(System.Reflection.MethodBase.GetCurrentMethod().Name, sw, log);
         }
         return View(viewModel);
     }
     return View();
 }
        public ActionResult GeographicExplorer()
        {
            viewModel.ExplorerType = ExplorerTypeEnum.Geographic;
            SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
            var sqlHelper = new SqlHelper(systemDataProvider);
            sqlHelper.GetGeographicData(viewModel);
            viewModel.GeographicViewmodel.SetFillColors();
            viewModel.GeographicVMJSON = string.Empty;
            viewModel.GeographicVMJSON = new JavaScriptSerializer().Serialize(viewModel);
            Session["ReportsViewModel"] = viewModel;

            return View(viewModel);
        }