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); }
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); }
private void LoadCD4Assumptions() { CD4TestNumber _cd = DataRepository.GetCD4TestNumberSummary(_forecast.Id); if (_cd != null) { double[] yval = { Math.Ceiling(_cd.ExistingPIT), Math.Ceiling(_cd.ExistingPIPreART), Math.Ceiling(_cd.CD4BaseLineTest), Math.Ceiling(_cd.NewPatienttoTreatment), Math.Ceiling(_cd.NewPatientstoPreART), Math.Ceiling(_cd.SymptomDirectedTest), Math.Ceiling(_cd.RepeatsdutoClinicalRequest), Math.Ceiling(_cd.Wastage), Math.Ceiling(_cd.ReagentstoRunControls), Math.Ceiling(_cd.BufferStockandControls) }; string[] xval = { "Existing Patients in Treatment", "Existing Patients in pre-ART ", "CD4 Baseline Test", "New Patients to Treatment", "New Patients to pre-ART", "Symptom-Directed Tests", "Repeats due to Clinician Request", "Wastage", "Reagents to Run Controls", "Buffer Stock for Routine Tests & Controls" }; //{ "EPT", "EP Pre-ART", "Baseline", "NPT", "NP Pre-ART", "SDT", "RCR", "Wastage", "RRC", "BSRTC" }; chartCd4Assumptions.Series["Series1"].Points.DataBindXY(xval, yval); chartCd4Assumptions.ChartAreas[0].AxisX.LabelStyle.Angle = 90; chartCd4Assumptions.ChartAreas[0].AxisX.LabelStyle.Interval = 1; } chartCd4Assumptions.Update(); chartCd4Assumptions.Show(); }