Пример #1
0
 private void FormClaimReports_Shown(object sender, EventArgs e)
 {
     if (AutomaticMode)
     {
         labelRetrieving.Visible = true;
         Cursor = Cursors.WaitCursor;
         Clearinghouse clearinghouseHq   = _listHqClearinghouses[comboClearhouse.SelectedIndex];
         Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
         string        errorMessage      = Clearinghouses.RetrieveAndImport(clearinghouseClin, AutomaticMode);
         if (errorMessage != "")
         {
             MessageBox.Show(errorMessage);
         }
         Cursor = Cursors.Default;
         Close();
     }
 }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (listCarriers.SelectedIndex < 0)
            {
                MsgBox.Show(this, "You must first choose a carrier.");
                return;
            }
            if (listBillingProvider.SelectedIndex < 0)
            {
                MsgBox.Show(this, "You must first choose a billing provider.");
                return;
            }
            if (listTreatingProvider.SelectedIndex < 0)
            {
                MsgBox.Show(this, "You must first choose a treating provider.");
                return;
            }
            DateTime reconciliationDate;

            try {
                reconciliationDate = DateTime.Parse(textDateReconciliation.Text).Date;
            }
            catch {
                MsgBox.Show(this, "Reconciliation date invalid.");
                return;
            }
            Cursor = Cursors.WaitCursor;
            try {
                Carrier       carrier           = carriers[listCarriers.SelectedIndex];
                Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(carrier);
                Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                CanadianOutput.GetPaymentReconciliations(clearinghouseClin, carrier, _listProviders[listTreatingProvider.SelectedIndex],
                                                         _listProviders[listBillingProvider.SelectedIndex], reconciliationDate, Clinics.ClinicNum, false, FormCCDPrint.PrintCCD);
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Done.");
            }
            catch (Exception ex) {
                Cursor = Cursors.Default;
                MessageBox.Show(Lan.g(this, "Request failed: ") + ex.Message);
            }
            DialogResult = DialogResult.OK;
        }
Пример #3
0
        private void FillGrid()
        {
            _listClearinghousesClinicCur.Clear();
            for (int i = 0; i < _listClearinghousesClinicAll.Count; i++)
            {
                if (_listClearinghousesClinicAll[i].ClinicNum == _selectedClinicNum)
                {
                    _listClearinghousesClinicCur.Add(_listClearinghousesClinicAll[i]);
                }
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g(this, "Description"), 150);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Export Path"), 230);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Format"), 110);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Is Default"), 60);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Payors"), 0);        //310
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < _listClearinghousesHq.Count; i++)
            {
                Clearinghouse[] listClearinghouseTag = new Clearinghouse[3];            //[0]=clearinghouseHq, [1]=clearinghouseClinic, [2]=clearinghouseCur per ODGridRow
                listClearinghouseTag[0] = _listClearinghousesHq[i].Copy();              //clearinghousehq.
                listClearinghouseTag[2] = _listClearinghousesHq[i].Copy();              //clearinghouseCur. will be clearinghouseHq if clearinghouseClinic doesn't exist.
                for (int j = 0; j < _listClearinghousesClinicCur.Count; j++)
                {
                    if (_listClearinghousesClinicCur[j].HqClearinghouseNum == _listClearinghousesHq[i].ClearinghouseNum)
                    {
                        listClearinghouseTag[1] = _listClearinghousesClinicCur[j];                      //clearinghouseClin
                        listClearinghouseTag[2] = Clearinghouses.OverrideFields(_listClearinghousesHq[i], _listClearinghousesClinicCur[j]);
                        break;
                    }
                }
                Clearinghouse clearinghouseCur = listClearinghouseTag[2];
                row     = new ODGridRow();
                row.Tag = listClearinghouseTag;
                row.Cells.Add(clearinghouseCur.Description);
                row.Cells.Add(clearinghouseCur.ExportPath);
                row.Cells.Add(clearinghouseCur.Eformat.ToString());
                string s = "";
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultDent) == _listClearinghousesHq[i].ClearinghouseNum)
                {
                    s += "Dent";
                }
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultMed) == _listClearinghousesHq[i].ClearinghouseNum)
                {
                    if (s != "")
                    {
                        s += ",";
                    }
                    s += "Med";
                }
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultEligibility) == _listClearinghousesHq[i].ClearinghouseNum &&
                    !CultureInfo.CurrentCulture.Name.EndsWith("CA"))                        //Canadian. en-CA or fr-CA
                {
                    if (s != "")
                    {
                        s += ",";
                    }
                    s += "Elig";
                }
                row.Cells.Add(s);
                row.Cells.Add(clearinghouseCur.Payors);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (!checkGetForAllCarriers.Checked)
            {
                if (listCarriers.SelectedIndex < 0 && listNetworks.SelectedIndex < 0)
                {
                    MsgBox.Show(this, "You must first choose one carrier or one network.");
                    return;
                }
            }
            if (listTreatingProvider.SelectedIndex < 0)
            {
                MsgBox.Show(this, "You must first choose a treating provider.");
                return;
            }
            DateTime reconciliationDate;

            try {
                reconciliationDate = DateTime.Parse(textDateReconciliation.Text).Date;
            }
            catch {
                MsgBox.Show(this, "Reconciliation date invalid.");
                return;
            }
            Cursor = Cursors.WaitCursor;
            try {
                if (checkGetForAllCarriers.Checked)
                {
                    Carrier carrier = new Carrier();
                    carrier.CDAnetVersion            = "04";
                    carrier.ElectID                  = "999999"; //The whole ITRANS network.
                    carrier.CanadianEncryptionMethod = 1;        //No encryption.
                    Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(carrier);
                    Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                    CanadianOutput.GetSummaryReconciliation(clearinghouseClin, carrier, null,
                                                            _listProviders[listTreatingProvider.SelectedIndex], reconciliationDate, false, FormCCDPrint.PrintCCD);
                }
                else
                {
                    if (listCarriers.SelectedIndex >= 0)
                    {
                        Carrier       carrier           = carriers[listCarriers.SelectedIndex];
                        Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(carrier);
                        Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                        CanadianOutput.GetSummaryReconciliation(clearinghouseClin, carrier, null,
                                                                _listProviders[listTreatingProvider.SelectedIndex], reconciliationDate, false, FormCCDPrint.PrintCCD);
                    }
                    else
                    {
                        Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(null);
                        Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                        CanadianOutput.GetSummaryReconciliation(clearinghouseClin, null, _listCanadianNetworks[listNetworks.SelectedIndex],
                                                                _listProviders[listTreatingProvider.SelectedIndex], reconciliationDate, false, FormCCDPrint.PrintCCD);
                    }
                }
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Done.");
            }
            catch (Exception ex) {
                Cursor = Cursors.Default;
                MessageBox.Show(Lan.g(this, "Request failed: ") + ex.Message);
            }
            DialogResult = DialogResult.OK;
        }
Пример #5
0
        private void butRetrieve_Click(object sender, EventArgs e)
        {
            if (comboClearhouse.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a clearinghouse first.");
                return;
            }
            if (!MsgBox.Show(this, true, "Connect to clearinghouse to retrieve reports?"))
            {
                return;
            }
            Clearinghouse clearhouseHq      = _listHqClearinghouses[comboClearhouse.SelectedIndex];
            Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearhouseHq, Clinics.ClinicNum);

            if (!Directory.Exists(clearinghouseClin.ResponsePath))
            {
                MsgBox.Show(this, "Clearinghouse does not have a valid Report Path set.");
                return;
            }
            ODProgressExtended progressbar = new ODProgressExtended(ODEventType.Clearinghouse, new ClearinghouseEvent(), this
                                                                    , new ProgressBarHelper((Lans.g(this, "Clearinghouse Progress")), progressBarEventType: ProgBarEventType.Header), lanThis: this.Name);

            //For Tesia, user wouldn't normally manually retrieve.
            if (clearhouseHq.ISA08 == "113504607")
            {
                if ((PrefC.RandomKeys && PrefC.HasClinicsEnabled) ||            //See FormClaimsSend_Load
                    PrefC.GetLong(PrefName.ClearinghouseDefaultDent) != clearhouseHq.ClearinghouseNum)                      //default
                {
                    //But they might need to in these situations.
                    string errorMessage = Clearinghouses.RetrieveAndImport(clearinghouseClin, false, progressbar);
                    progressbar.UpdateProgressDetailed("", tagString: "reports", percentVal: "100%", barVal: 100);
                    if (errorMessage == "")
                    {
                        progressbar.UpdateProgress(Lan.g(this, "Retrieval and import successful"));
                    }
                    else
                    {
                        progressbar.UpdateProgress(errorMessage);
                    }
                    progressbar.UpdateProgress(Lan.g(this, "Done"));
                }
                else
                {
                    progressbar.UpdateProgress(Lan.g(this, "No need to retrieve. Available reports are automatically downloaded every three minutes."));
                }
                progressbar.OnProgressDone();
                return;
            }
            if (clearhouseHq.CommBridge == EclaimsCommBridge.None || clearhouseHq.CommBridge == EclaimsCommBridge.Renaissance ||
                clearhouseHq.CommBridge == EclaimsCommBridge.RECS)
            {
                progressbar.UpdateProgress(Lan.g(this, "No built-in functionality for retrieving reports from this clearinghouse."));
                progressbar.OnProgressDone();
                return;
            }
            labelRetrieving.Visible = true;
            string errorMesssage = Clearinghouses.RetrieveAndImport(clearinghouseClin, false, progressbar);

            progressbar.UpdateProgressDetailed("", tagString: "reports", percentVal: "100%", barVal: 100);
            if (clearhouseHq.CommBridge == EclaimsCommBridge.ClaimConnect && errorMesssage == "" && Directory.Exists(clearinghouseClin.ResponsePath))
            {
                //Since the dentalxchange website was successfully launched in this scenario, the user does not need any further notification.
            }
            else if (errorMesssage == "")
            {
                progressbar.UpdateProgress(Lan.g(this, "Retrieve and import successful."));
            }
            else
            {
                progressbar.UpdateProgress(Lans.g(progressbar.LanThis, "Error Log:") + "\r\n" + errorMesssage);
            }
            labelRetrieving.Visible = false;
            progressbar.OnProgressDone();
            if (progressbar.IsCanceled)             //close
            {
                progressbar.Close();
            }
        }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (radioVersion4ToCarrier.Checked)
            {
                if (listCarriers.SelectedIndex < 0)
                {
                    MsgBox.Show(this, "You must first select a carrier to use.");
                    return;
                }
            }
            if (listOfficeNumbers.SelectedIndex < 0)
            {
                MsgBox.Show(this, "You must first select an Office Number to use.");
                return;
            }
            Cursor = Cursors.WaitCursor;
            Provider prov = null;

            for (int i = 0; i < _listProviders.Count; i++)
            {
                if (_listProviders[i].CanadianOfficeNum == listOfficeNumbers.Items[listOfficeNumbers.SelectedIndex].ToString() &&
                    _listProviders[i].NationalProvID != "" && _listProviders[i].IsCDAnet)
                {
                    prov = _listProviders[i];
                    break;
                }
            }
            try {
                if (radioVersion2.Checked)
                {
                    Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(null);
                    Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                    CanadianOutput.GetOutstandingTransactions(clearinghouseClin, true, false, null, prov, false, FormClaimPrint.PrintCdaClaimForm,
                                                              FormCCDPrint.PrintCCD);
                }
                else if (radioVersion4Itrans.Checked)
                {
                    Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(null);
                    Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                    CanadianOutput.GetOutstandingTransactions(clearinghouseClin, false, true, null, prov, false, FormClaimPrint.PrintCdaClaimForm,
                                                              FormCCDPrint.PrintCCD);
                }
                else if (radioVersion4ToCarrier.Checked)
                {
                    Carrier       carrier           = carriers[listCarriers.SelectedIndex];
                    Clearinghouse clearinghouseHq   = Canadian.GetCanadianClearinghouseHq(carrier);
                    Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
                    CanadianOutput.GetOutstandingTransactions(clearinghouseClin, false, false, carrier, prov, false, FormClaimPrint.PrintCdaClaimForm,
                                                              FormCCDPrint.PrintCCD);
                }
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Done.");
            }
            catch (ApplicationException aex) {
                Cursor = Cursors.Default;
                MessageBox.Show(Lan.g(this, "Request failed: ") + aex.Message);
            }
            catch (Exception ex) {
                Cursor = Cursors.Default;
                MessageBox.Show(Lan.g(this, "Request failed: ") + ex.ToString());
            }
            DialogResult = DialogResult.OK;
        }