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); } } }
private void LoadViralLoadAssumptions() { HemaandViralNumberofTest _cd = DataRepository.GetViralLoadSummary(_forecast.Id); if (_cd != null) { double[] yval = { Math.Ceiling(_cd.TestBasedOnProtocols), Math.Ceiling(_cd.SymptomDirectedTests), Math.Ceiling(_cd.RepeatedDuetoClinicalReq), Math.Ceiling(_cd.InvalidTestandWastage), Math.Ceiling(_cd.ReagentstoRunControls), Math.Ceiling(_cd.BufferStockandControls) }; string[] xval = { "Tests based on protocols", "Symptom-Directed Tests", "Repeats due to Clinician Request", "Invalid Tests and Wastage", "Reagents to Run Controls", "Buffer Stock" }; chartViralload.Series["Series1"].Points.DataBindXY(xval, yval); } chartViralload.Update(); chartViralload.Show(); }
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); }