コード例 #1
0
ファイル: CalcOtherTest.cs プロジェクト: opianHealth/ForLAB
        public IList<ChemandOtherNumberofTest> GetOtherTestNumber()
        {
            _othtestNumber = new List<ChemandOtherNumberofTest>();
            if (ArtSite.ForecastOtherTest)
            {
                foreach (PSymptomDirectedTest sdt in OtherTestProtocol.SymptomDirectedTests)
                {
                    ChemandOtherNumberofTest ct = new ChemandOtherNumberofTest();
                    ct.ForecastId = Forecast.Id;
                    ct.SiteId = ArtSite.Site.Id;
                    ct.Platform = (int)ClassOfMorbidityTestEnum.OtherTest;
                    //ct.TestId = sdt.Test.Id;
                    ct.TestName = sdt.OtherTestName;

                    for (int i = 1; i <= 12; i++)
                    {
                        OtherSymptomDirectedTest csdt = _othMonthlyOutputs[i].GetOtherSymptomDirectedTestById(sdt.OtherTestNameToEnum);
                        ct.InvalidTestandWastage += csdt.AdditionalTestsdueToWastage;

                        if (i >= PeriodInfo.FirstMonth && i <= PeriodInfo.LastMonth)
                        {
                            ct.TestBasedOnProtocols += csdt.TestConducted; //_othMonthlyOutputs[i].GetSumOfOtherTest(sdt.OtherTestNameToEnum);
                            ct.SymptomDirectedTests += csdt.TotalSymptomDirectTest();
                            ct.RepeatedDuetoClinicalReq += (csdt.TestConducted + csdt.TotalSymptomDirectTest()) *_othrRepeatsduetoClinicianRequest;
                        }

                        ct.BufferStock += csdt.SubtotalOfTestForBufferStock;
                    }

                    _othtestNumber.Add(ct);
                }
            }
            return _othtestNumber;
        }
コード例 #2
0
        private void chartMChemViralTest_Load(object sender, EventArgs e)
        {
            if (_type == 2)//chem
            {
                chart1.Titles[0].Text = "Chemistry Tests Distribution";
                _h = DataRepository.GetChemistryTestSummary(_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 == 5)//other
            {
                chart1.Titles[0].Text = "Other Tests Distribution";
                _h = DataRepository.GetOtherTestSummary(_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);
                }
            }
        }
コード例 #3
0
        public IList<ChemandOtherNumberofTest> GetChemistryTestNumber()
        {
            _chemtestNumber = new List<ChemandOtherNumberofTest>();
            if (ArtSite.ForecastChemistry)
            {
                foreach (PSymptomDirectedTest sdt in ChemTestProtocol.SymptomDirectedTests)
                {
                    ChemandOtherNumberofTest ct = new ChemandOtherNumberofTest();
                    ct.ForecastId = Forecast.Id;
                    ct.SiteId = ArtSite.Site.Id;
                    ct.Platform = (int)ClassOfMorbidityTestEnum.Chemistry;
                    //ct.TestId = sdt.Test.Id;
                    ct.TestName = sdt.ChemTestName;

                    for (int i = 1; i <= 12; i++)
                    {
                        ChemistrySymptomDirectedTest csdt = _chemMonthlyOutputs[i].GetChemSymptomDirectedTestById(sdt.ChemTestNameToEnum);
                        ct.InvalidTestandWastage += csdt.AdditionalTestsdueToWastage;
                        ct.RepeatedDuetoClinicalReq += csdt.RepeatedDuetoClinicianRequest();
                        ct.SymptomDirectedTests += csdt.TotalSymptomDirectTest();
                        ct.TestBasedOnProtocols += _chemMonthlyOutputs[i].GetSumOfChemTest(sdt.ChemTestNameToEnum);
                        //ct.TestBasedOnProtocols += csdt.TestBasedonProtocol;
                    }

                    foreach (ChemistryPlatformTests ptc in  _chemPlatformTests)
                    {
                        if (ct.TestBasedOnProtocols > 0)
                        {
                            ct.ReagentstoRunControls += ptc.TotalControlsFP() + ptc.SampleReferredTotalControlsFP();
                            ct.BufferStock += ptc.TotalControlsBP() + ptc.SampleReferredTotalControlsBP();
                        }
                        else
                        {
                            ct.ReagentstoRunControls = 0;
                            ct.BufferStock += ptc.TotalControlsBP();
                        }
                    }
                    _chemtestNumber.Add(ct);
                }
            }
            return _chemtestNumber;
        }