Esempio n. 1
0
        /// <summary>
        /// 获取急诊抗菌药物使用率
        /// </summary>
        /// <param name="startTime">The start time.</param>
        /// <param name="endTime">The end time.</param>
        /// <returns>ActionResult.</returns>
        public ActionResult GetEmergencyAnbitibioticUsageRate(DateTime startTime, DateTime endTime)
        {
            AntibioticUsageRate viewModel = null;

            try
            {
                ViewBag.startTime = startTime;
                ViewBag.endTime   = endTime.AddDays(1).AddMilliseconds(-1);
                endTime           = endTime.AddDays(1);
                IAntibioticUsageRate iAntibioticRate = this.ReporterViewFactory.CreateAntibioticUsageRate();
                viewModel = iAntibioticRate.GetAntibioticUsageRate(startTime, endTime, EnumOutPatientCategories.EMERGEMENT);
            }
            catch (Exception)
            {
            }
            finally
            {
                if (viewModel == null)
                {
                    viewModel = new AntibioticUsageRate
                    {
                        AntibioticPerson = 0,
                        RegisterPerson   = 0,
                    };
                }
            }
            return(PartialView("_GetEmergencyAntibioticRate", viewModel));
        }
Esempio n. 2
0
        /// <summary>
        /// 获取门诊抗菌药物使用率
        /// </summary>
        /// <param name="startTime">The start time.</param>
        /// <param name="endTime">The end time.</param>
        /// <returns>ActionResult.</returns>
        public ActionResult GetOutpatientAntibioticUsageRate(DateTime startTime, DateTime endTime)
        {
            ViewBag.startTime = startTime;
            ViewBag.endTime   = endTime.AddDays(1).AddMilliseconds(-1);
            //单元测试时暂时删除,需恢复
            //endTime = endTime.AddDays(1);
            AntibioticUsageRate viewModel = null;

            try
            {
                IAntibioticUsageRate iAntibioticRate = this.ReporterViewFactory.CreateAntibioticUsageRate();
                viewModel = iAntibioticRate.GetAntibioticUsageRate(startTime, endTime, EnumOutPatientCategories.OUTPATIENT);
            }
            catch (Exception)
            {
                viewModel = null;
            }
            finally
            {
                if (viewModel == null)
                {
                    viewModel = new AntibioticUsageRate
                    {
                        AntibioticPerson = 0,
                        RegisterPerson   = 0,
                    };
                }
            }
            //return View(viewModel);
            return(PartialView("_GetOutpatientAntibioticRate", viewModel));
        }
Esempio n. 3
0
        public virtual IAntibioticUsageRate CreateAntibioticUsageRate()
        {
            IAntibioticUsageRate result = null;

            result = new ImAntibioticUsageRate(this.DomainFactory);
            return(result);
        }