Ejemplo n.º 1
0
        public ViewForm(object PID, object testid)
        {
            InitializeComponent();

            if (testid.ToString() == "LTBCC002")
            {
                var     bloodtest        = new BloodTest();
                DataSet ds               = bloodtest.fillCellcountReport(PID.ToString());
                var     cellcount_report = new CrystalReportCellCount();
                cellcount_report.SetDataSource(ds);
                crystalReportViewerLabReport.ReportSource = cellcount_report;
            }

            if (testid.ToString() == "LTBS001")
            {
                var     bloodtest    = new BloodTest();
                DataSet ds           = bloodtest.fillSugarReport(PID.ToString());
                var     sugar_report = new CrystalReportSugar();
                sugar_report.SetDataSource(ds);
                crystalReportViewerLabReport.ReportSource = sugar_report;
            }

            if (testid.ToString() == "LTBPC007")
            {
                var     bloodtest       = new BloodTest();
                DataSet ds              = bloodtest.fillPlateletReport(PID.ToString());
                var     platelet_report = new CrystalReportPlateletCount();
                platelet_report.SetDataSource(ds);
                crystalReportViewerLabReport.ReportSource = platelet_report;
            }

            if (testid.ToString() == "LTLC003")
            {
                var     cholesterol_test = new LipidTest();
                DataSet ds = cholesterol_test.fillCholesterolReport(PID.ToString());
                var     cholesterol_report = new CrystalReportCholesterolTest();
                cholesterol_report.SetDataSource(ds);
                crystalReportViewerLabReport.ReportSource = cholesterol_report;
            }
        }
Ejemplo n.º 2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (grpBxScans.Visible)
            {
                var scan = new Scans();


                if (radioReset.Checked)
                {
                    if (scan.setScanStatus(Convert.ToInt32(labtest.LTRNumber), false, true))
                    {
                        radioSet.Checked   = false;
                        radioReset.Checked = false;
                        fillPatientsTests(labpatient.getPatientsTestList());
                    }
                }
            }


            var bloodtest = new BloodTest();


            if (txt_Panel1["Field"] == "Sugar")
            {
                if (!bloodtest.insertSugar(labpatient.ID, labtest.ID, txt_Panel1["Value"]))
                {
                    MessageBox.Show("Please Fill the Relevant Field", "Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                }
                else
                {
                    txtTest_Panel1.Text = "";
                    fillPatientsTests(labpatient.getPatientsTestList());
                    //labtest.Status = true;
                }
            }

            if (txt_Panel1["Field"] == "Platelet Count")
            {
                if (!bloodtest.insertPlatelet(labpatient.ID, labtest.ID, txt_Panel1["Value"]))
                {
                    MessageBox.Show("Please Fill the Relevant Field", "Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                }
                else
                {
                    txtTest_Panel1.Text = "";
                    fillPatientsTests(labpatient.getPatientsTestList());
                    //labtest.Status = true;
                }
            }


            if (txt_Panel1["Field"] == "WBC" && txt_Panel2["Field"] == "RBC")
            {
                if (!bloodtest.insertCellCount(labpatient.ID, labtest.ID, txt_Panel1["Value"], txt_Panel2["Value"]))
                {
                    MessageBox.Show("Please Fill the Relevant Field", "Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                }
                else
                {
                    txtTest_Panel1.Text = "";
                    txtTest_Panel2.Text = "";
                    fillPatientsTests(labpatient.getPatientsTestList());
                    //labtest.Status = true;
                }
            }

            if (txt_Panel1["Field"] == "HDL" && txt_Panel2["Field"] == "LDL" && txt_Panel3["Field"] == "Serum Cholesterol")
            {
                var cholesterol = new LipidTest();
                if (!cholesterol.updateCholesterolTest(labpatient.ID, txt_Panel1["Value"], txt_Panel2["Value"], txt_Panel3["Value"]))
                {
                    MessageBox.Show("Please Fill the Relevant Field", "Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                }

                else
                {
                    txtTest_Panel1.Text = "";
                    txtTest_Panel2.Text = "";
                    txtTest_Panel3.Text = "";
                    fillPatientsTests(labpatient.getPatientsTestList());
                    //labtest.Status = true;
                }
            }

            //clearDictionarys();
            FillAppointments(null, null, null);
        }