private void RetrieveReports() { if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].ISA08 == "113504607") //TesiaLink //But the import will still happen { return; } if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.None || Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.Renaissance || Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.RECS) { return; } Cursor = Cursors.WaitCursor; /*if(Clearinghouses.List[comboClearhouse.SelectedIndex].CommBridge==EclaimsCommBridge.Tesia) { * try{ * DateTime curtime=DateTime.Now; * while (DateTime.Now<curtime.AddSeconds(2)){ * Application.DoEvents(); * } * MessageBox.Show("Incomplete"); * Tesia.GetReports(); * } * catch(Exception ex){ * Cursor=Cursors.Default; * MessageBox.Show(ex.Message); * return; * } * }*/ if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.WebMD) { if (!WebMD.Launch(Clearinghouses.Listt[comboClearhouse.SelectedIndex], 0)) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Error retrieving.")); return; } } else if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.BCBSGA) { if (!BCBSGA.Retrieve(Clearinghouses.Listt[comboClearhouse.SelectedIndex])) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Error retrieving.")); return; } } else if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.ClaimConnect) { if (AutomaticMode) { Cursor = Cursors.Default; return; } try{ Process.Start(@"http://www.dentalxchange.com/newdxc"); } catch { MessageBox.Show("Could not locate the site."); } Cursor = Cursors.Default; return; } else if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.AOS) { try{ //his path would never exist on Unix, so no need to handle back slashes. Process.Start(@"C:\Program files\AOS\AOSCommunicator\AOSCommunicator.exe"); } catch { Cursor = Cursors.Default; MessageBox.Show("Could not locate the file."); return; } } else if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.MercuryDE) { if (!MercuryDE.Launch(Clearinghouses.Listt[comboClearhouse.SelectedIndex], 0)) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Error retrieving.")); return; } } else if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.EmdeonMedical) { if (!EmdeonMedical.Retrieve(Clearinghouses.Listt[comboClearhouse.SelectedIndex])) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Error retrieving.")); return; } } Cursor = Cursors.Default; if (!AutomaticMode) { MsgBox.Show(this, "Retrieval successful"); } }
private static string RetrieveReports(Clearinghouse clearinghouseClin, bool isAutomaticMode, IODProgressExtended progress = null) { progress = progress ?? new ODProgressExtendedNull(); progress.UpdateProgress(Lans.g(progress.LanThis, "Beginning report retrieval..."), "reports", "0%"); if (progress.IsPauseOrCancel()) { return(Lans.g(progress.LanThis, "Process canceled by user.")); } if (clearinghouseClin.ISA08 == "113504607") //TesiaLink //But the import will still happen { return(""); } if (clearinghouseClin.CommBridge == EclaimsCommBridge.None || clearinghouseClin.CommBridge == EclaimsCommBridge.Renaissance || clearinghouseClin.CommBridge == EclaimsCommBridge.RECS) { return(""); } if (clearinghouseClin.CommBridge == EclaimsCommBridge.WebMD) { if (!WebMD.Launch(clearinghouseClin, 0, isAutomaticMode, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + WebMD.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.BCBSGA) { if (!BCBSGA.Retrieve(clearinghouseClin, true, new TerminalConnector(), progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + BCBSGA.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.ClaimConnect) { if (!Directory.Exists(clearinghouseClin.ResponsePath)) { //The clearinghouse report path is not setup. Therefore, the customer does not use ClaimConnect reports via web services. if (isAutomaticMode) //The user opened FormClaimsSend, or FormOpenDental called this function automatically. { return(""); //Suppress error message. } else //The user pressed the Get Reports button manually. //This cannot happen, because the user is blocked by the UI before they get to this point. { } } else if (!ClaimConnect.Retrieve(clearinghouseClin, progress)) { if (ClaimConnect.ErrorMessage.Contains(": 150\r\n")) //Error message 150 "Service Not Contracted" { if (isAutomaticMode) //The user opened FormClaimsSend, or FormOpenDental called this function automatically. { return(""); //Pretend that there is no error when loading FormClaimsSend for those customers who do not pay for ERA service. } else //The user pressed the Get Reports button manually. //The old way. Some customers still prefer to go to the dentalxchange web portal to view reports because the ERA service costs money. { try { Process.Start(@"http://www.dentalxchange.com"); } catch (Exception ex) { ex.DoNothing(); return(Lans.g("FormClaimReports", "Could not locate the site.")); } return(""); } } return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + ClaimConnect.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.AOS) { try { //This path would never exist on Unix, so no need to handle back slashes. Process.Start(@"C:\Program files\AOS\AOSCommunicator\AOSCommunicator.exe"); } catch { return(Lans.g("FormClaimReports", "Could not locate the file.")); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.MercuryDE) { if (!MercuryDE.Launch(clearinghouseClin, 0, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + MercuryDE.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.EmdeonMedical) { if (!EmdeonMedical.Retrieve(clearinghouseClin, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EmdeonMedical.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.DentiCal) { if (!DentiCal.Launch(clearinghouseClin, 0, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + DentiCal.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.EDS) { List <string> listEdsErrors = new List <string>(); if (!EDS.Retrieve277s(clearinghouseClin, progress)) { listEdsErrors.Add(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EDS.ErrorMessage); } if (!EDS.Retrieve835s(clearinghouseClin, progress)) { listEdsErrors.Add(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EDS.ErrorMessage); } if (listEdsErrors.Count > 0) { return(string.Join("\r\n", listEdsErrors)); } } return(""); }