private void chartMHematologyTest_Load(object sender, EventArgs e) { if (_type == 3)//hematology { chart1.Titles[0].Text = "Hematology Test Distribution"; _h = DataRepository.GetHematologySummary(_ForecastId); if (_h != null) { double total = _h.TestBasedOnProtocols + _h.SymptomDirectedTests + _h.RepeatedDuetoClinicalReq + _h.InvalidTestandWastage; double[] yval = { (_h.TestBasedOnProtocols / total), (_h.SymptomDirectedTests / total), (_h.RepeatedDuetoClinicalReq / total), (_h.InvalidTestandWastage / total) }; string[] xval = { "Tests Based On Protocols", "Symptom-Directed Tests", "Repeated Due to Clinical Req.", "Invalid Test and Wastage" }; chart1.Series["Series2"].Points.DataBindXY(xval, yval); } } if (_type == 4)//viral { chart1.Titles[0].Text = "ViralLoad Test Distribution"; _h = DataRepository.GetViralLoadSummary(_ForecastId); if (_h != null) { double total = _h.TestBasedOnProtocols + _h.SymptomDirectedTests + _h.RepeatedDuetoClinicalReq + _h.InvalidTestandWastage; double[] yval = { (_h.TestBasedOnProtocols / total), (_h.SymptomDirectedTests / total), (_h.RepeatedDuetoClinicalReq / total), (_h.InvalidTestandWastage / total) }; string[] xval = { "Tests Based On Protocols", "Symptom-Directed Tests", "Repeated Due to Clinical Req.", "Invalid Test and Wastage" }; chart1.Series["Series2"].Points.DataBindXY(xval, yval); } } }
public HemaandViralNumberofTest GetViralLoadTestNumber() { _vltestNumber = new HemaandViralNumberofTest(); _vltestNumber.ForecastId = Forecast.Id; _vltestNumber.SiteId = ArtSite.Site.Id; _vltestNumber.Platform = (int)ClassOfMorbidityTestEnum.ViralLoad; if (ArtSite.ForecastViralLoad) { for (int i = 1; i <= 12; i++) { _vltestNumber.InvalidTestandWastage += _vlMonthlyOutputs[i].AdditionalTestsdueToWastage; _vltestNumber.RepeatedDuetoClinicalReq += _vlMonthlyOutputs[i].RepeatDuetoClinicianRequest; _vltestNumber.SymptomDirectedTests += _vlMonthlyOutputs[i].SymptomDirectedTests; _vltestNumber.TestBasedOnProtocols += _vlMonthlyOutputs[i].TestsBasedonProtocols; } foreach (PlatformTestsAndControls ptc in _vlPlatformTests) { _vltestNumber.ReagentstoRunControls += ptc.TotalControlsFP() + ptc.SumOfSampleReferredControlsPerNoOfTests(); _vltestNumber.BufferStockandControls += ptc.TotalControlsBP() + ptc.SumOfSampleReferredControlsPerNoOfTestsBuffer(); } } return _vltestNumber; }