private void chartMCD4Test_Load(object sender, EventArgs e) { _cd = DataRepository.GetCD4TestNumberSummary(_ForecastId); double total = _cd.CD4BaseLineTest + _cd.SymptomDirectedTest + _cd.RepeatsdutoClinicalRequest + _cd.Wastage; double[] yval = { (_cd.CD4BaseLineTest / total), (_cd.SymptomDirectedTest / total), (_cd.RepeatsdutoClinicalRequest / total), (_cd.Wastage / total) }; string[] xval = { "BaseLine Tests", "Symptom-Directed Tests", "Reapeated Due to Clinical Req.","Wastage" }; chart1.Series["Series2"].Points.DataBindXY(xval, yval); }
public CD4TestNumber GetCD4TestNumber() { _cdtestNumber = new CD4TestNumber(); _cdtestNumber.ForecastId = Forecast.Id; _cdtestNumber.SiteId = ArtSite.Site.Id; if (ArtSite.ForecastCD4) { for (int i = 1; i <= 12; i++) { _cdtestNumber.ExistingPIT += _cd4MonthlyOutputs[i].ExistingPatientsinTreatment(); _cdtestNumber.ExistingPIPreART += _cd4MonthlyOutputs[i].ExistingPatientsinPreART(); _cdtestNumber.CD4BaseLineTest += _cd4MonthlyOutputs[i].TotalReceivingCD4Test(); _cdtestNumber.NewPatienttoTreatment += _cd4MonthlyOutputs[i].NewPatientstoTreatment(); _cdtestNumber.NewPatientstoPreART += _cd4MonthlyOutputs[i].NewPatientstoPreART(); _cdtestNumber.SymptomDirectedTest += _cd4MonthlyOutputs[i].SymptomDirectedTests; _cdtestNumber.RepeatsdutoClinicalRequest += _cd4MonthlyOutputs[i].RepeatDuetoClinicianRequest; _cdtestNumber.Wastage += _cd4MonthlyOutputs[i].AdditionalTestsdueToWastage; } foreach (PlatformTestsAndControls ptc in _cd4PlatformTests) { _cdtestNumber.ReagentstoRunControls += ptc.TotalControlsFP() + ptc.SumOfSampleReferredControlsPerNoOfTests(); _cdtestNumber.BufferStockandControls += ptc.TotalControlsBP() + ptc.SumOfSampleReferredControlsPerNoOfTestsBuffer(); } } return _cdtestNumber; }