Пример #1
0
        ///<summary>Uses the report complex pattern to print the same report generated by FillGrid()</summary>
        private void butRunReport_Click(object sender, EventArgs e)
        {
            if (!ValidateFilters())
            {
                return;
            }
            ReportComplex report          = new ReportComplex(true, false);
            List <long>   listClinicNums  = comboClinicMulti.ListSelectedClinicNums;
            DataTable     table           = RpClaimNotSent.GetClaimsNotSent(_startDate, _endDate, listClinicNums, true, (ClaimNotSentStatuses)comboBoxInsFilter.SelectedItem);
            string        subtitleClinics = "";

            subtitleClinics   = comboClinicMulti.GetStringSelectedClinics();
            report.ReportName = Lan.g(this, "Claims Not Sent");
            report.AddTitle("Title", Lan.g(this, "Claims Not Sent"));
            if (PrefC.HasClinicsEnabled)
            {
                report.AddSubTitle("Clinics", subtitleClinics);
            }
            QueryObject query = report.AddQuery(table, "Date: " + DateTimeOD.Today.ToShortDateString());

            if (PrefC.HasClinicsEnabled)
            {
                query.AddColumn("Clinic", 60, FieldValueType.String);
            }
            query.AddColumn("Date", 85, FieldValueType.Date);
            query.GetColumnDetail("Date").StringFormat = "d";
            query.AddColumn("Type", 90, FieldValueType.String);
            query.AddColumn("Claim Status", 100, FieldValueType.String);
            query.AddColumn("Patient Name", 150, FieldValueType.String);
            query.AddColumn("Insurance Carrier", 150, FieldValueType.String);
            query.AddColumn("Amount", 90, FieldValueType.Number);
            query.AddColumn("Proc Codes", 90);
            report.AddPageNum();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }
Пример #2
0
        ///<summary>Uses the report complex pattern to print the same report generated by FillGrid()</summary>
        private void butRunReport_Click(object sender, EventArgs e)
        {
            if (!ValidateFilters())
            {
                return;
            }
            ReportComplex report          = new ReportComplex(true, false);
            List <long>   listClinicNums  = GetSelectedClinicNums();
            DataTable     table           = RpClaimNotSent.GetClaimsNotSent(_startDate, _endDate, listClinicNums, true, (ClaimNotSentStatuses)comboBoxInsFilter.SelectedItem);
            string        subtitleClinics = "";

            //the following logic could probably be simplified
            if (PrefC.HasClinicsEnabled)
            {
                if (comboBoxClinics.SelectedIndices.Contains(0))
                {
                    subtitleClinics = Lan.g(this, "All Clinics");
                }
                else
                {
                    for (int i = 0; i < comboBoxClinics.SelectedIndices.Count; i++)
                    {
                        if (i > 0)
                        {
                            subtitleClinics += ", ";
                        }
                        if (Security.CurUser.ClinicIsRestricted)
                        {
                            subtitleClinics += _listClinics[(int)comboBoxClinics.SelectedIndices[i] - 1].Abbr;
                        }
                        else
                        {
                            if ((int)comboBoxClinics.SelectedIndices[i] == 1)
                            {
                                subtitleClinics += Lan.g(this, "Unassigned");                             //start here
                            }
                            else
                            {
                                subtitleClinics += _listClinics[(int)comboBoxClinics.SelectedIndices[i] - 2].Abbr;                            //Minus 2 from the selected index
                            }
                        }
                    }
                }
            }
            report.ReportName = Lan.g(this, "Claims Not Sent");
            report.AddTitle("Title", Lan.g(this, "Claims Not Sent"));
            if (PrefC.HasClinicsEnabled)
            {
                report.AddSubTitle("Clinics", subtitleClinics);
            }
            QueryObject query = report.AddQuery(table, "Date: " + DateTimeOD.Today.ToShortDateString());

            if (PrefC.HasClinicsEnabled)
            {
                query.AddColumn("Clinic", 60, FieldValueType.String);
            }
            query.AddColumn("Date", 85, FieldValueType.Date);
            query.GetColumnDetail("Date").StringFormat = "d";
            query.AddColumn("Type", 90, FieldValueType.String);
            query.AddColumn("Claim Status", 100, FieldValueType.String);
            query.AddColumn("Patient Name", 150, FieldValueType.String);
            query.AddColumn("Insurance Carrier", 150, FieldValueType.String);
            query.AddColumn("Amount", 90, FieldValueType.Number);
            query.AddColumn("Proc Codes", 90);
            report.AddPageNum();
            if (!report.SubmitQueries())
            {
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }
Пример #3
0
        ///<summary>Gets all unsent claims in the database between the user entered date range and with the appropriate user selected filters.</summary>
        private void FillGrid()
        {
            if (!ValidateFilters())
            {
                return;
            }
            List <long> listClinicNums = GetSelectedClinicNums();
            DataTable   table          = RpClaimNotSent.GetClaimsNotSent(_startDate, _endDate, listClinicNums, false
                                                                         , (ClaimNotSentStatuses)comboBoxInsFilter.SelectedItem);//this query can get slow with a large number of clinics (like NADG)

            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            if (PrefC.HasClinicsEnabled)
            {
                col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Clinic"), 90);
                gridMain.Columns.Add(col);
            }
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Date of Service"), 90, GridSortingStrategy.DateParse);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Claim Type"), 90);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Claim Status"), 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Patient Name"), 150);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Carrier Name"), 150);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Claim Fee"), 90, GridSortingStrategy.AmountParse);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(gridMain.TranslationName, "Proc Codes"), 100);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                row = new ODGridRow();
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(table.Rows[i]["Clinic"].ToString());
                }
                DateTime dateService = PIn.Date(table.Rows[i]["DateService"].ToString());
                row.Cells.Add(dateService.ToShortDateString());
                string type = table.Rows[i]["ClaimType"].ToString();
                switch (type)
                {
                case "P":
                    type = "Pri";
                    break;

                case "S":
                    type = "Sec";
                    break;

                case "PreAuth":
                    type = "Preauth";
                    break;

                case "Other":
                    type = "Other";
                    break;

                case "Cap":
                    type = "Cap";
                    break;

                case "Med":
                    type = "Medical";                          //For possible future use.
                    break;

                default:
                    type = "Error";                          //Not allowed to be blank.
                    break;
                }
                row.Cells.Add(type);
                row.Cells.Add(table.Rows[i]["ClaimStatus"].ToString());
                row.Cells.Add(table.Rows[i]["Patient Name"].ToString());
                row.Cells.Add(table.Rows[i]["CarrierName"].ToString());
                row.Cells.Add(PIn.Double(table.Rows[i]["ClaimFee"].ToString()).ToString("c"));
                row.Cells.Add(table.Rows[i]["ProcCodes"].ToString());
                UnsentInsClaim unsentClaim = new UnsentInsClaim();
                unsentClaim.ClaimNum = PIn.Long(table.Rows[i]["ClaimNum"].ToString());
                unsentClaim.PatNum   = PIn.Long(table.Rows[i]["PatNum"].ToString());
                ClaimTracking claimTrackingCur = _listNewClaimTrackings.FirstOrDefault(x => x.ClaimNum == unsentClaim.ClaimNum);
                if (claimTrackingCur != null)
                {
                    unsentClaim.ClaimTrackingNum = claimTrackingCur.ClaimTrackingNum;
                }
                row.Tag = unsentClaim;
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }