public InPatientAverageAntibioticCostRate GetInPatientAverageAntibioticCostRate(DateTime startTime, DateTime endTime) { var result = new InPatientAverageAntibioticCostRate(); try { result = new InPatientAverageAntibioticCostRate { TotalAntibioticCost = this.factory.CreateInPatientAntibioticCost().GetInPatientAntibioticCost(startTime, endTime), TotalAntibioticPerson = this.factory.CreateInPatientAntibioticPerson().GetAntibioticPerson(startTime, endTime) }; } catch (Exception e) { throw new ArgumentNullException("读取数据错误!{0}", e.Message); } return(result); }
/// <summary> /// 住院患者人均使用抗菌药物费用 /// </summary> /// <param name="startTime">The start time.</param> /// <param name="endTime">The end time.</param> /// <returns>ActionResult.</returns> public ActionResult InPatientAverageAntibioticCostRateIndex(DateTime startTime, DateTime endTime) { ViewBag.startTime = startTime; ViewBag.endTime = endTime.AddDays(1).AddMilliseconds(-1); endTime = endTime.AddDays(1); var viewModel = new InPatientAverageAntibioticCostRate(); try { viewModel = new InPatientAverageAntibioticCostRate { TotalAntibioticCost = this.DomainFactory.CreateInPatientAntibioticCost().GetInPatientAntibioticCost(startTime, endTime), TotalAntibioticPerson = this.DomainFactory.CreateInPatientAntibioticPerson().GetAntibioticPerson(startTime, endTime) }; } catch (Exception) { viewModel = null; } return(PartialView("_GetInPatientAverageAntibioticCostRate", viewModel)); }