Exemple #1
0
 public FrmSelectTest(ProtocolPanel p)
 {
     _panel = p;
     _selectedTest = new List<Test>();
     InitializeComponent();
     label1.Visible = false;
     txtNoperiod.Visible = false;
     BindPanelTests();
 }
Exemple #2
0
        public PanelPane(ProtocolPanel panel, bool enableCtr)
        {
            this._panel = panel;
            this._enableCtr = enableCtr;
            InitializeComponent();
            lvTest.AddNoneEditableColumn(0);
            SetControlState();

            BindPanel();
        }
Exemple #3
0
        public FrmPanel(ProtocolPanel panel, Form mdiparent)
        {
            this._panel = panel;
            this._mdiparent = mdiparent;

            InitializeComponent();
            txtpanelName.Text = panel.PanelName;

            BindBloodSample();
            BindSymptomDirectedTest();
        }
Exemple #4
0
        private void BindCD4BloodSample()
        {
            InitCD4ListView();
            foreach (ProtocolPanel pp in _protocol.ProtocolPanels)
            {
                _cd4Panel = pp;
                for (int i = 1; i <= 4; i++)
                {
                    EXListViewItem li = new EXListViewItem(GetRowTitle(i)) { Tag = i };

                    for (int m = 1; m <= 12; m++)
                    {
                        if (i == 1)
                            li.SubItems.Add(new EXListViewSubItem(pp.AdultArtTestGivenInMonth(m).ToString(), m));
                        else if (i == 2)
                            li.SubItems.Add(new EXListViewSubItem(pp.PediatricArtTestGivenInMonth(m).ToString(), m));
                        else if (i == 3)
                            li.SubItems.Add(new EXListViewSubItem(pp.AdultPreArtTestGivenInMonth(m).ToString(), m));
                        else
                            li.SubItems.Add(new EXListViewSubItem(pp.PediatricPreArtTestGivenInMonth(m).ToString(), m));
                    }

                    if (i == 1)
                        li.SubItems.Add(new EXListViewSubItem(pp.AITTestperYear.ToString(), 13));
                    else if (i == 2)
                        li.SubItems.Add(new EXListViewSubItem(pp.PITTestperYear.ToString(), 13));
                    else if (i == 3)
                        li.SubItems.Add(new EXListViewSubItem(pp.APARTestperYear.ToString(), 13));
                    else if (i == 4)
                        li.SubItems.Add(new EXListViewSubItem(pp.PPARTTestperYear.ToString(), 13));

                    _cd4ListView.Items.Add(li);
                }
                break;
            }
        }
Exemple #5
0
 public static void DeleteProtocolPanel(ProtocolPanel P)
 {
     DaoFactory.GetDaoFactory().CreateProtocolPanelDao().Delete(P);
 }
Exemple #6
0
 public static void SaveOrUpdateProtocolPanel(ProtocolPanel P)
 {
     DaoFactory.GetDaoFactory().CreateProtocolPanelDao().SaveOrUpdate(P);
 }
Exemple #7
0
 public PanelTest(ProtocolPanel panel, Test testId)
 {
     this._panel  = panel;
     this._testId = testId;
 }
Exemple #8
0
        private void CreatNewProtocol()
        {
            _protocol = new Protocol();
            _protocol.ProtocolType = (int)_classOfTest;

            switch (_classOfTest)
            {
                case ClassOfMorbidityTestEnum.CD4:
                    ProtocolPanel panel = new ProtocolPanel();
                    panel.PanelName = "CD4 Panel";
                    panel.Protocol = _protocol;
                    _protocol.ProtocolPanels.Add(panel);
                    break;
                case ClassOfMorbidityTestEnum.Chemistry:
                    string[] testname = Enum.GetNames(typeof(ChemistryTestNameEnum));
                    for (int i = 0; i < testname.Length; i++)
                    {
                        PSymptomDirectedTest sdt = new PSymptomDirectedTest();
                        sdt.ChemTestName = testname[i];
                        sdt.Protocol = _protocol;
                        _protocol.SymptomDirectedTests.Add(sdt);
                    }
                    break;
                case ClassOfMorbidityTestEnum.OtherTest:
                    string[] tname = Enum.GetNames(typeof(OtherTestNameEnum));
                    for (int i = 0; i < tname.Length; i++)
                    {
                        PSymptomDirectedTest sdt = new PSymptomDirectedTest();
                        sdt.OtherTestName = tname[i];
                        sdt.Protocol = _protocol;
                        _protocol.SymptomDirectedTests.Add(sdt);
                    }
                    break;
            }
        }
Exemple #9
0
        private void butNewpanel_Click(object sender, EventArgs e)
        {
            ProtocolPanel panel = new ProtocolPanel();
            panel.Protocol = _protocol;

            FrmPanel frm = new FrmPanel(panel, _mdiparent);

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _protocol.ProtocolPanels.Add(panel);
                BindPanels();
            }
        }
Exemple #10
0
 public PanelPane(ProtocolPanel panel)
     : this(panel, false)
 {
 }
Exemple #11
0
 public void RebindPanel(ProtocolPanel panel)
 {
     this._panel = panel;
     BindPanel();
 }
Exemple #12
0
 public PanelTest(ProtocolPanel panel, Test test)
 {
     this._panel = panel;
     this._test  = test;
 }
Exemple #13
0
        private void CalculateCD4TestConducted()
        {
            _cd4AdultToFollowUpAfterDiagnosis = 1 - (ArtSite.AdultDepartWoutFollowup / 100d);
            _cd4PediatricToFollowUpAfterDiagnosis = 1 - (ArtSite.PediatricDepartWoutFollowup / 100d);
            _cd4ThoseFollowUpToReciveCD4 = (ArtSite.DiagnosesReceiveCD4 / 100d);

            _patientsRequiringOneSymptomDirectedTest = (CD4TestProtocol.SymptomDirectedAmt / 100d);
            _cd4RepeatsduetoClinicianRequest = (CD4TestProtocol.TestReapeated / 100d);
            _cdAdditionalTestsDuetoWastage = (InvAssumption.CD4 / 100d);

            if (CD4TestProtocol.ProtocolPanels.Count > 0)
                _cd4Panel = (ProtocolPanel)CD4TestProtocol.ProtocolPanels[0];
            else
                _cd4Panel = new ProtocolPanel();

            for (int i = 1; i <= 12; i++)
            {
                MOutputCD4 cd4out = new MOutputCD4();
                cd4out.Month = i;
                cd4out.AdultReceivingCD4Test = RapidTestOutputs[i].AdultsPositiveDiagnoses * _cd4AdultToFollowUpAfterDiagnosis * _cd4ThoseFollowUpToReciveCD4;
                cd4out.PedReceivingCD4Test = RapidTestOutputs[i].PediatricsPositiveDiagnoses * _cd4PediatricToFollowUpAfterDiagnosis * _cd4ThoseFollowUpToReciveCD4;

                cd4out.ExistingAdultPatientsinTreatment = CalculatedPatientNos[i].ArtAdultPreExistingPatients * (_cd4Panel.AITTestperYear / 12d);
                cd4out.ExistingPedPatientsinTreatment = CalculatedPatientNos[i].ArtPediatricPreExistingPatients * (_cd4Panel.PITTestperYear / 12d);
                cd4out.ExistingAdultPatientsinPreArt = CalculatedPatientNos[i].PreArtAdultPreExistingPatients * (_cd4Panel.APARTestperYear / 12d);
                cd4out.ExistingPedPatientsinPreArt = CalculatedPatientNos[i].PreArtPediatricPreExistingPatients * (_cd4Panel.PPARTTestperYear / 12d);

                for (int x = 1, y = i; x <= i; x++, y--)
                {
                    cd4out.NewAdultPatientstoTreatment += CalculatedPatientNos[i].GetArtAdultPatientsEntering(x) * _cd4Panel.AdultArtTestGivenInMonth(y);
                    cd4out.NewPedPatientstoTreatment += CalculatedPatientNos[i].GetArtPediatricPatientsEntering(x) * _cd4Panel.PediatricArtTestGivenInMonth(y);
                    cd4out.NewAdultPatientstoPreArt += CalculatedPatientNos[i].GetPreArtAdultPatientsEntering(x) * _cd4Panel.AdultPreArtTestGivenInMonth(y);
                    cd4out.NewPedPatientstoPreArt += CalculatedPatientNos[i].GetPreArtPediatricPatientsEntering(x) * _cd4Panel.PediatricPreArtTestGivenInMonth(y);
                }

                _cd4MonthlyOutputs.Add(i, cd4out);
            }

            double patientEnterPerMonth = 0;
            double symptomDirectedTestsAtstartYear = CurrentAdultinTreatment + CurrentPediatricinTreatment + CurrentAdultinPreArt + CurrentPediatricinPreArt;
            symptomDirectedTestsAtstartYear = (symptomDirectedTestsAtstartYear * _patientsRequiringOneSymptomDirectedTest) / 12d;

            int pmonth, buffmonth;
            for (int i = 1; i <= 12; i++)
            {
                patientEnterPerMonth = CalculatedPatientNos[i].GetArtAdultPatientsEntering(i) + CalculatedPatientNos[i].GetArtPediatricPatientsEntering(i);
                patientEnterPerMonth += CalculatedPatientNos[i].GetPreArtAdultPatientsEntering(i) + CalculatedPatientNos[i].GetPreArtPediatricPatientsEntering(i);
                patientEnterPerMonth = (patientEnterPerMonth * _patientsRequiringOneSymptomDirectedTest) / 12d;

                _cd4MonthlyOutputs[i].SymptomDirectedTests += symptomDirectedTestsAtstartYear + patientEnterPerMonth;

                for (int x = i + 1; x <= 12; x++)
                {
                    _cd4MonthlyOutputs[x].SymptomDirectedTests += patientEnterPerMonth;
                }
                double v1, v2;
                v1 = _cd4MonthlyOutputs[i].TotalReceivingCD4Test();
                v2 = _cd4MonthlyOutputs[i].TestFromProtocols();

                _cd4MonthlyOutputs[i].RepeatDuetoClinicianRequest = (_cd4MonthlyOutputs[i].TotalReceivingCD4Test() + _cd4MonthlyOutputs[i].TestFromProtocols() + _cd4MonthlyOutputs[i].SymptomDirectedTests) * _cd4RepeatsduetoClinicianRequest;

                pmonth = buffmonth = 0;
                if (i >= PeriodInfo.FirstMonth && i <= PeriodInfo.LastMonth)
                    pmonth = 1;
                if (i >= PeriodInfo.BeginsOnmonth && i <= PeriodInfo.EndOnMonth)
                    buffmonth = 1;

                _cd4MonthlyOutputs[i].TestsBasedonProtocols = _cd4MonthlyOutputs[i].TotalTestConducted() * pmonth;
                _cd4MonthlyOutputs[i].TestsforBufferStock = _cd4MonthlyOutputs[i].TotalTestConducted() * buffmonth;

                _cd4MonthlyOutputs[i].AdditionalTestsdueToWastage = (_cd4MonthlyOutputs[i].TestsBasedonProtocols / (1 - _cdAdditionalTestsDuetoWastage)) - _cd4MonthlyOutputs[i].TestsBasedonProtocols;
                _cd4MonthlyOutputs[i].AdditionalTestsdueToWastageForBuffer = (_cd4MonthlyOutputs[i].TestsforBufferStock / (1 - _cdAdditionalTestsDuetoWastage)) - _cd4MonthlyOutputs[i].TestsforBufferStock;

            }
        }
Exemple #14
0
        private void butNewpanel_Click(object sender, EventArgs e)
        {
            if (CreateOrEditPanel != null)
            {
                ProtocolPanel panel = new ProtocolPanel();
                panel.Protocol = _protocol;
                CreateOrUpdateEventArgs eArgs = new CreateOrUpdateEventArgs(panel);
                CreateOrEditPanel(this, eArgs);
            }

            DisplayPanel();
        }
Exemple #15
0
 public PanelTest( ProtocolPanel panel, Test testId )
 {
     this._panel = panel;
     this._testId = testId;
 }