示例#1
0
        ///<summary>Sets parameters/fills lists based on form controls.</summary>
        private RpAgingParamObject GetParamsFromForm()
        {
            RpAgingParamObject rpo = new RpAgingParamObject();

            rpo.AsOfDate = PIn.Date(textDate.Text);
            if (rpo.AsOfDate.Year < 1880)
            {
                rpo.AsOfDate = DateTime.Today;
            }
            rpo.IsHistoric              = (rpo.AsOfDate.Date != DateTime.Today);
            rpo.IsWoAged                = checkAgeWriteoffs.Checked;
            rpo.HasDateLastPay          = checkHasDateLastPay.Checked;
            rpo.IsGroupByFam            = radioGroupByFam.Checked;
            rpo.IsOnlyNeg               = checkOnlyNeg.Checked;
            rpo.IsIncludeNeg            = checkIncludeNeg.Checked;
            rpo.IsExcludeInactive       = checkExcludeInactive.Checked;
            rpo.IsExcludeBadAddress     = checkBadAddress.Checked;
            rpo.IsExcludeArchive        = checkExcludeArchive.Checked;
            rpo.IsIncludeInsNoBal       = checkIncludeInsNoBal.Checked;
            rpo.IsOnlyInsNoBal          = checkOnlyInsNoBal.Checked;
            rpo.IsForceAgeNegAdj        = checkAgeNegAdjs.Checked;
            rpo.DoAgePatPayPlanPayments = checkAgePatPayPlanPayments.Checked;
            rpo.IsInsPayWoCombined      = false;
            if (!checkBillTypesAll.Checked)
            {
                rpo.ListBillTypes = listBillType.SelectedIndices.OfType <int>().Select(x => _listBillingTypeDefs[x].DefNum).ToList();
            }
            if (!checkProvAll.Checked)
            {
                rpo.ListProvNums = listProv.SelectedIndices.OfType <int>().Select(x => _listProviders[x].ProvNum).ToList();
            }
            if (PrefC.HasClinicsEnabled)
            {
                //if "All" is selected and the user is not restricted, show ALL clinics, including the 0 clinic.
                if (checkAllClin.Checked && !Security.CurUser.ClinicIsRestricted)
                {
                    rpo.ListClinicNums.Clear();
                    rpo.ListClinicNums.Add(0);
                    rpo.ListClinicNums.AddRange(Clinics.GetDeepCopy().Select(x => x.ClinicNum));
                }
                else
                {
                    rpo.ListClinicNums = listClin.SelectedTags <Clinic>().Select(x => x.ClinicNum).ToList();
                }
            }
            rpo.AccountAge = AgeOfAccount.Any;
            if (radio30.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over30;
            }
            else if (radio60.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over60;
            }
            else if (radio90.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over90;
            }
            return(rpo);
        }
示例#2
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (!checkBillTypesAll.Checked && listBillType.SelectedIndices.Count == 0)
            {
                MsgBox.Show(this, "At least one billing type must be selected.");
                return;
            }
            if (!checkProvAll.Checked && listProv.SelectedIndices.Count == 0)
            {
                MsgBox.Show(this, "At least one provider must be selected.");
                return;
            }
            if (PrefC.HasClinicsEnabled && !checkAllClin.Checked && listClin.SelectedIndices.Count == 0)
            {
                MsgBox.Show(this, "At least one clinic must be selected.");
                return;
            }
            if (textDate.errorProvider1.GetError(textDate) != "")
            {
                MsgBox.Show(this, "Invalid date.");
                return;
            }
            RpAgingParamObject rpo        = GetParamsFromForm();
            ReportComplex      report     = new ReportComplex(true, true);
            DataTable          tableAging = new DataTable();

            tableAging        = RpInsAging.GetInsAgingTable(rpo);
            report.ReportName = Lan.g(this, "Insurance Aging Report");
            report.AddTitle("InsAging", Lan.g(this, "Insurance Aging Report"));
            report.AddSubTitle("PracTitle", PrefC.GetString(PrefName.PracticeTitle));
            report.AddSubTitle("AsOf", Lan.g(this, "As of") + " " + rpo.AsOfDate.ToShortDateString());
            if (radioAny.Checked)
            {
                report.AddSubTitle("Balance", Lan.g(this, "Any Balance"));
            }
            else if (radio30.Checked)
            {
                report.AddSubTitle("Over30", Lan.g(this, "Over 30 Days"));
            }
            else if (radio60.Checked)
            {
                report.AddSubTitle("Over60", Lan.g(this, "Over 60 Days"));
            }
            else 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)));             //there must be at least one selected
            }
            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-----------------------------------------------
            QueryObject query = report.AddQuery(tableAging, "Date " + DateTime.Today.ToShortDateString());

            query.AddColumn((radioGroupByFam.Checked ? "Guarantor" : "Patient"), 150, FieldValueType.String);
            if (rpo.IsDetailedBreakdown)
            {
                query.AddColumn("Carrier", 220, FieldValueType.String);
                query.AddColumn("Group Name", 160, FieldValueType.String);
            }
            query.AddColumn("Ins Pay\r\nEst 0-30", 75, FieldValueType.Number);
            query.AddColumn("Ins Pay\r\nEst 31-60", 75, FieldValueType.Number);
            query.AddColumn("Ins Pay\r\nEst 61-90", 70, FieldValueType.Number);
            query.AddColumn("Ins Pay\r\nEst >90", 75, FieldValueType.Number);
            query.AddColumn("Ins Pay\r\nEst Total", 80, FieldValueType.Number);
            if (!rpo.IsDetailedBreakdown)
            {
                query.AddColumn("Pat Est\r\nBal 0-30", 75, FieldValueType.Number);
                query.AddColumn("Pat Est\r\nBal 31-60", 75, FieldValueType.Number);
                query.AddColumn("Pat Est\r\nBal 61-90", 70, FieldValueType.Number);
                query.AddColumn("Pat Est\r\nBal >90", 75, FieldValueType.Number);
                query.AddColumn("Pat Est\r\nBal Total", 80, FieldValueType.Number);
                query.AddColumn("-W/O\r\nChange", 70, FieldValueType.Number);
                query.AddColumn("=Pat Est\r\nAmt Due", 80, FieldValueType.Number);
            }
            report.AddPageNum();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }
示例#3
0
        ///<summary>Sets parameters/fills lists based on form controls.</summary>
        private RpAgingParamObject GetParamsFromForm()
        {
            RpAgingParamObject rpo = new RpAgingParamObject();

            rpo.AsOfDate = PIn.Date(textDate.Text);
            if (rpo.AsOfDate.Year < 1880)
            {
                rpo.AsOfDate = DateTime.Today;
            }
            rpo.IsHistoric         = (rpo.AsOfDate.Date != DateTime.Today);
            rpo.IsGroupByFam       = radioGroupByFam.Checked;
            rpo.IsInsPayWoCombined = false;
            if (!checkBillTypesAll.Checked)
            {
                rpo.ListBillTypes = listBillType.SelectedIndices.OfType <int>().Select(x => _listBillingTypeDefs[x].DefNum).ToList();
            }
            if (!checkProvAll.Checked)
            {
                rpo.ListProvNums = listProv.SelectedIndices.OfType <int>().Select(x => _listProviders[x].ProvNum).ToList();
            }
            if (PrefC.HasClinicsEnabled)
            {
                //if "All" is selected and the user is not restricted, show ALL clinics, including the 0 clinic.
                if (checkAllClin.Checked && !Security.CurUser.ClinicIsRestricted)
                {
                    rpo.ListClinicNums.Clear();
                    rpo.ListClinicNums.Add(0);
                    rpo.ListClinicNums.AddRange(Clinics.GetDeepCopy().Select(x => x.ClinicNum));
                }
                else
                {
                    rpo.ListClinicNums = listClin.GetListSelected <Clinic>().Select(x => x.ClinicNum).ToList();
                }
            }
            rpo.AccountAge = AgeOfAccount.Any;
            if (radio30.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over30;
            }
            else if (radio60.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over60;
            }
            else if (radio90.Checked)
            {
                rpo.AccountAge = AgeOfAccount.Over90;
            }
            if (checkOnlyShowPatsOutstandingClaims.Checked)
            {
                rpo.IsDetailedBreakdown = true;
            }
            rpo.GroupByCarrier    = rpo.IsDetailedBreakdown;
            rpo.GroupByGroupName  = rpo.IsDetailedBreakdown;
            rpo.CarrierNameFilter = textCarrier.Text;
            rpo.GroupNameFilter   = textGroupName.Text;
            rpo.IsWoAged          = true;
            rpo.IsIncludeNeg      = true;
            rpo.IsForInsAging     = true;
            rpo.IsIncludeInsNoBal = true;
            return(rpo);
        }