Esempio n. 1
0
        private void butGenerateQuery_Click(object sender, EventArgs e)
        {
            if (!Validation())
            {
                return;
            }
            string          queryStr = RpAging.GetQueryString(GetParamsFromForm());
            MsgBoxCopyPaste msgBox   = new MsgBoxCopyPaste(queryStr);

            msgBox.Show(this);
        }
Esempio n. 2
0
        private void butGenerateQuery_Click(object sender, EventArgs e)
        {
            if (!Validation())
            {
                return;
            }
            DateTime     asOfDate               = PIn.Date(textDate.Text);
            List <long>  listProvNums           = new List <long>();
            List <long>  listClinicNums         = new List <long>();
            List <long>  listBillingTypeDefNums = new List <long>();
            AgeOfAccount accountAge             = GenerateLists(listProvNums, listClinicNums, listBillingTypeDefNums);
            bool         isForInsAging          = false;
            string       queryStr               = RpAging.GetQueryString(asOfDate, checkAgeWriteoffs.Checked, checkHasDateLastPay.Checked, radioGroupByFam.Checked, checkOnlyNeg.Checked,
                                                                         accountAge, checkIncludeNeg.Checked, checkExcludeInactive.Checked, checkBadAddress.Checked, listProvNums, listClinicNums, listBillingTypeDefNums,
                                                                         checkExcludeArchive.Checked, checkIncludeInsNoBal.Checked, checkOnlyInsNoBal.Checked, checkAgeNegAdjs.Checked, isForInsAging,
                                                                         checkAgePatPayPlanPayments.Checked);
            MsgBoxCopyPaste msgBox = new MsgBoxCopyPaste(queryStr);

            msgBox.Show(this);
        }
Esempio n. 3
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (!Validation())
            {
                return;
            }
            DateTime     asOfDate               = PIn.Date(textDate.Text);
            List <long>  listProvNums           = new List <long>();
            List <long>  listClinicNums         = new List <long>();
            List <long>  listBillingTypeDefNums = new List <long>();
            AgeOfAccount accountAge             = GenerateLists(listProvNums, listClinicNums, listBillingTypeDefNums);
            DataTable    tableAging             = new DataTable();
            bool         isForInsAging          = false;

            tableAging = RpAging.GetAgingTable(asOfDate, checkAgeWriteoffs.Checked, checkHasDateLastPay.Checked, radioGroupByFam.Checked, checkOnlyNeg.Checked,
                                               accountAge, checkIncludeNeg.Checked, checkExcludeInactive.Checked, checkBadAddress.Checked, listProvNums, listClinicNums, listBillingTypeDefNums,
                                               checkExcludeArchive.Checked, checkIncludeInsNoBal.Checked, checkOnlyInsNoBal.Checked, checkAgeNegAdjs.Checked, isForInsAging,
                                               checkAgePatPayPlanPayments.Checked);
            ReportComplex report = new ReportComplex(true, false);

            report.IsLandscape = checkHasDateLastPay.Checked;
            report.ReportName  = Lan.g(this, "AGING OF ACCOUNTS RECEIVABLE REPORT");
            report.AddTitle("Aging Report", Lan.g(this, "AGING OF ACCOUNTS RECEIVABLE"));
            report.AddSubTitle("PracTitle", PrefC.GetString(PrefName.PracticeTitle));
            report.AddSubTitle("AsOf", Lan.g(this, "As of ") + textDate.Text);
            if (radioAny.Checked)
            {
                report.AddSubTitle("Balance", Lan.g(this, "Any Balance"));
            }
            if (radio30.Checked)
            {
                report.AddSubTitle("Over30", Lan.g(this, "Over 30 Days"));
            }
            if (radio60.Checked)
            {
                report.AddSubTitle("Over60", Lan.g(this, "Over 60 Days"));
            }
            if (radio90.Checked)
            {
                report.AddSubTitle("Over90", Lan.g(this, "Over 90 Days"));
            }
            if (checkBillTypesAll.Checked)
            {
                report.AddSubTitle("AllBillingTypes", Lan.g(this, "All Billing Types"));
            }
            else
            {
                string subt = _listBillingTypeDefs[listBillType.SelectedIndices[0]].ItemName;
                for (int i = 1; i < listBillType.SelectedIndices.Count; i++)
                {
                    subt += ", " + _listBillingTypeDefs[listBillType.SelectedIndices[i]].ItemName;
                }
                report.AddSubTitle("", subt);
            }
            string subtitleProvs = "";

            if (checkProvAll.Checked)
            {
                subtitleProvs = Lan.g(this, "All Providers");
            }
            else
            {
                subtitleProvs += string.Join(", ", listProv.SelectedIndices.OfType <int>().ToList().Select(x => _listProviders[x].Abbr));
            }
            report.AddSubTitle("Providers", subtitleProvs);
            if (checkAllClin.Checked)
            {
                report.AddSubTitle("Clinics", Lan.g(this, "All Clinics"));
            }
            else
            {
                string subt = string.Join(", ", listClin.SelectedItems.OfType <ODBoxItem <Clinic> >().Select(x => x.Tag.Abbr));
                report.AddSubTitle("Clinics", subt);
            }
            //Patient Account Aging Query-----------------------------------------------
            bool isWoEstIncluded = true;

            if (checkAgeWriteoffs.Checked && tableAging.Select().All(x => Math.Abs(PIn.Double(x["InsWoEst"].ToString())) <= 0.005))
            {
                tableAging.Columns.Remove("InsWoEst");
                isWoEstIncluded = false;
            }
            QueryObject query = report.AddQuery(tableAging, "Date " + DateTime.Today.ToShortDateString());

            query.AddColumn((radioGroupByFam.Checked?"GUARANTOR":"PATIENT"), 160, FieldValueType.String);
            query.AddColumn("0-30 DAYS", 75, FieldValueType.Number);
            query.AddColumn("31-60 DAYS", 75, FieldValueType.Number);
            query.AddColumn("61-90 DAYS", 75, FieldValueType.Number);
            query.AddColumn("> 90 DAYS", 75, FieldValueType.Number);
            query.AddColumn("TOTAL", 80, FieldValueType.Number);
            if (isWoEstIncluded)
            {
                query.AddColumn("-W/O EST", 75, FieldValueType.Number);
            }
            query.AddColumn("-INS EST", 75, FieldValueType.Number);
            query.AddColumn("=PATIENT", 80, FieldValueType.Number);
            if (checkHasDateLastPay.Checked)
            {
                query.AddColumn("", 10);               //add some space between the right alligned amounts and the left alligned date
                query.AddColumn("LAST PAY DATE", 100, FieldValueType.Date);
            }
            report.AddPageNum();
            report.AddGridLines();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }
Esempio n. 4
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (!Validation())
            {
                return;
            }
            ReportComplex report     = new ReportComplex(true, false);
            DataTable     tableAging = RpAging.GetAgingTable(GetParamsFromForm());

            report.IsLandscape = checkHasDateLastPay.Checked;
            report.ReportName  = Lan.g(this, "AGING OF ACCOUNTS RECEIVABLE REPORT");
            report.AddTitle("Aging Report", Lan.g(this, "AGING OF ACCOUNTS RECEIVABLE"));
            report.AddSubTitle("PracTitle", PrefC.GetString(PrefName.PracticeTitle));
            report.AddSubTitle("AsOf", Lan.g(this, "As of ") + textDate.Text);
            if (radioAny.Checked)
            {
                report.AddSubTitle("Balance", Lan.g(this, "Any Balance"));
            }
            if (radio30.Checked)
            {
                report.AddSubTitle("Over30", Lan.g(this, "Over 30 Days"));
            }
            if (radio60.Checked)
            {
                report.AddSubTitle("Over60", Lan.g(this, "Over 60 Days"));
            }
            if (radio90.Checked)
            {
                report.AddSubTitle("Over90", Lan.g(this, "Over 90 Days"));
            }
            if (checkBillTypesAll.Checked)
            {
                report.AddSubTitle("AllBillingTypes", Lan.g(this, "All Billing Types"));
            }
            else
            {
                report.AddSubTitle("", string.Join(", ", listBillType.SelectedIndices.OfType <int>().Select(x => _listBillingTypeDefs[x].ItemName)));
            }
            if (checkProvAll.Checked)
            {
                report.AddSubTitle("Providers", Lan.g(this, "All Providers"));
            }
            else
            {
                report.AddSubTitle("Providers", string.Join(", ", listProv.SelectedIndices.OfType <int>().Select(x => _listProviders[x].Abbr)));
            }
            if (checkAllClin.Checked)
            {
                report.AddSubTitle("Clinics", Lan.g(this, "All Clinics"));
            }
            else
            {
                report.AddSubTitle("Clinics", string.Join(", ", listClin.GetListSelected <Clinic>().Select(x => x.Abbr)));
            }
            //Patient Account Aging Query-----------------------------------------------
            bool isWoEstIncluded = true;

            if (checkAgeWriteoffs.Checked && tableAging.Select().All(x => Math.Abs(PIn.Double(x["InsWoEst"].ToString())) <= 0.005))
            {
                tableAging.Columns.Remove("InsWoEst");
                isWoEstIncluded = false;
            }
            QueryObject query = report.AddQuery(tableAging, "Date " + DateTime.Today.ToShortDateString());

            query.AddColumn((radioGroupByFam.Checked?"Guarantor":"Patient"), (checkAgeWriteoffs.Checked?135:140), FieldValueType.String);
            query.AddColumn("0-30 Days", 80, FieldValueType.Number);
            query.AddColumn("31-60 Days", 80, FieldValueType.Number);
            query.AddColumn("61-90 Days", 80, FieldValueType.Number);
            query.AddColumn("> 90 Days", 80, FieldValueType.Number);
            query.AddColumn("Total", 80, FieldValueType.Number);
            if (isWoEstIncluded)
            {
                query.AddColumn("-W/O " + (checkAgeWriteoffs.Checked?"Change":"Est"), (checkAgeWriteoffs.Checked?85:80), FieldValueType.Number);
            }
            query.AddColumn("-Ins Est", 80, FieldValueType.Number);
            query.AddColumn("=Patient", 80, FieldValueType.Number);
            if (checkHasDateLastPay.Checked)
            {
                query.AddColumn("", 10);               //add some space between the right alligned amounts and the left alligned date
                query.AddColumn("Last Pay Date", 90, FieldValueType.Date);
            }
            report.AddPageNum();
            report.AddGridLines();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

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