コード例 #1
0
        public void GetNYY()
        {
            DataTable real_dt     = KPIRecTreatment.GetRecTreatmentNYY(20, "01202");
            DataTable expected_dt = new DataTable();

            expected_dt.Clear();
            expected_dt.Columns.Add("Date of Service");
            expected_dt.Columns.Add("Name");
            expected_dt.Columns.Add("Procedure");
            expected_dt.Columns.Add("Priority");
            expected_dt.Columns.Add("Status of Pre-Authorization");

            DataRow _testPat = expected_dt.NewRow();

            _testPat["Procedure"] = "01202";

            expected_dt.Rows.Add(_testPat);

            Assert.IsNotNull(real_dt);
            Assert.AreEqual(3, real_dt.Rows.Count);
            Assert.AreEqual(real_dt.Rows[0]["Procedure"], expected_dt.Rows[0]["Procedure"]);
        }
コード例 #2
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            DataTable tablePats = new DataTable();

            System.Diagnostics.Debug.WriteLine("SelectedPatNum is : " + SelectedPatNum);
            if (DateRangeCheck.Checked == false)
            {
                System.Diagnostics.Debug.WriteLine("No Date");
                if (SelectedPatNum != 0)
                {
                    System.Diagnostics.Debug.WriteLine("Using PatNum");
                    System.Diagnostics.Debug.WriteLine("SelectedPatNum is NOT zero : " + SelectedPatNum);



                    if (pc != "")
                    {
                        //NYY
                        System.Diagnostics.Debug.WriteLine("Using ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentNYY(SelectedPatNum, pc);
                    }

                    else if (pc == "")
                    {
                        //NYN
                        System.Diagnostics.Debug.WriteLine("No ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentNYN(SelectedPatNum);
                    }
                }
                else if (SelectedPatNum == 0)

                {
                    System.Diagnostics.Debug.WriteLine("No PatNum");
                    System.Diagnostics.Debug.WriteLine("SelectedPatNum is zero : " + SelectedPatNum);


                    if (pc != "")
                    {
                        // NNY
                        System.Diagnostics.Debug.WriteLine("Using ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentNNY(pc);
                    }

                    else if (pc == "")
                    {
                        // NNN
                        System.Diagnostics.Debug.WriteLine("Nothing");
                        tablePats = KPIRecTreatment.GetRecTreatmentNNN();
                    }
                }
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("Using Date");
                System.Diagnostics.Debug.WriteLine("SelectedPatNum is : " + SelectedPatNum);


                if (SelectedPatNum != 0)
                {
                    System.Diagnostics.Debug.WriteLine("Using PatNum");
                    System.Diagnostics.Debug.WriteLine("SelectedPatNum is NOT zero : " + SelectedPatNum);


                    if (pc != "")
                    {
                        // YYY
                        System.Diagnostics.Debug.WriteLine("Using ProcCode");
                        System.Diagnostics.Debug.WriteLine("SelectedPatNum is : " + SelectedPatNum);

                        tablePats = KPIRecTreatment.GetRecTreatmentYYY(dateStartPick.Value.Date, dateEndPick.Value.Date,
                                                                       SelectedPatNum, pc);
                    }
                    else if (pc == "")
                    {
                        // YYN
                        System.Diagnostics.Debug.WriteLine("No ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentYYN(dateStartPick.Value.Date, dateEndPick.Value.Date,
                                                                       SelectedPatNum);
                    }
                }

                else if (SelectedPatNum == 0)
                {
                    System.Diagnostics.Debug.WriteLine("No PatNum");
                    System.Diagnostics.Debug.WriteLine("SelectedPatNum is zero : " + SelectedPatNum);


                    if (pc != "")
                    {
                        // YNY
                        System.Diagnostics.Debug.WriteLine("Using ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentYNY(dateStartPick.Value.Date, dateEndPick.Value.Date,
                                                                       pc);
                    }

                    else if (pc == "")
                    {
                        // YNN
                        System.Diagnostics.Debug.WriteLine("No ProcCode");
                        tablePats = KPIRecTreatment.GetRecTreatmentYNN(dateStartPick.Value.Date, dateEndPick.Value.Date);
                    }
                }
            }



            ReportComplex report = new ReportComplex(true, false);

            report.ReportName = Lan.g(this, "Types of Treatment Prescribed/Recommended");
            report.AddTitle("Title", Lan.g(this, "Types of Treatment Prescribed/Recommended"));

            if (DateRangeCheck.Checked == false)
            {
                report.AddSubTitle("No Date Selected", "ALL DATES");
            }

            else if (DateRangeCheck.Checked == true)
            {
                report.AddSubTitle("Date", SELECTDATE.Text);
            }
            if (SelectedPatNum != 0)
            {
                report.AddSubTitle("Name", SELECTNAME.Text);
            }

            else if (SelectedPatNum == 0)
            {
                report.AddSubTitle("Name", "ALL PATIENTS");
            }

            if (pc != "")
            {
                report.AddSubTitle("ProcedureCode", SELECTPROC.Text);
            }

            else if (pc == "")
            {
                report.AddSubTitle("ProcedureCode", "ALL PROCEDURES");
            }

            QueryObject query;

            query = report.AddQuery(tablePats, "", "", SplitByKind.None, 0);
            query.AddColumn("Date of Service", 100, FieldValueType.String);
            query.AddColumn("Name", 150, FieldValueType.String);
            query.AddColumn("Procedure", 40, FieldValueType.String);
            query.AddColumn("Priority", 90, FieldValueType.String);
            query.AddColumn("Status of Pre-Authorization", 80, FieldValueType.String);
            report.AddPageNum();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }