public static string RunOne(bool showForms) { string retVal = ""; long provNum = ProviderC.ListShort[0].ProvNum; //dentist #1 Patient pat = Patients.GetPat(PatientTC.PatNum1); //patient#1 if (pat.PriProv != provNum) { Patient oldPat = pat.Copy(); pat.PriProv = provNum; //this script uses the primary provider for the patient Patients.Update(pat, oldPat); } PatPlan patplan = PatPlans.GetPatPlan(pat.PatNum, 1); InsSub sub = InsSubs.GetOne(patplan.InsSubNum); InsPlan plan = InsPlans.GetPlan(sub.PlanNum, new List <InsPlan>()); //the UI would block this due to carrier not supporting this transaction type. Clearinghouse clearinghouseHq = Clearinghouses.GetDefaultDental(); Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum); long etransNum = CanadianOutput.SendElegibility(clearinghouseClin, pat.PatNum, plan, new DateTime(1999, 1, 1), patplan.Relationship, patplan.PatID, showForms, sub); Etrans etrans = Etranss.GetEtrans(etransNum); string message = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum); CCDFieldInputter formData = new CCDFieldInputter(message); string responseStatus = formData.GetValue("G05"); if (responseStatus != "R") { throw new Exception("Should be R"); } retVal += "Eligibility #1 successful.\r\n"; return(retVal); }
public static string RunFour(bool showForms) { string retVal = ""; long provNum = ProviderC.ListShort[1].ProvNum; //dentist #2 Patient pat = Patients.GetPat(PatientTC.PatNum6); //patient#6 if (pat.PriProv != provNum) { Patient oldPat = pat.Copy(); pat.PriProv = provNum; //this script uses the primary provider for the patient Patients.Update(pat, oldPat); } PatPlan patplan = PatPlans.GetPatPlan(pat.PatNum, 1); InsSub sub = InsSubs.GetOne(patplan.InsSubNum); InsPlan plan = InsPlans.GetPlan(sub.PlanNum, new List <InsPlan>()); long etransNum = CanadianOutput.SendElegibility(pat.PatNum, plan, new DateTime(1999, 1, 1), patplan.Relationship, patplan.PatID, showForms, sub); Etrans etrans = Etranss.GetEtrans(etransNum); string message = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum); CCDFieldInputter formData = new CCDFieldInputter(message); string responseStatus = formData.GetValue("G05"); if (responseStatus != "M") { throw new Exception("Should be M"); } retVal += "Eligibility #4 successful.\r\n"; return(retVal); }
private static string Run(int scriptNum, Carrier carrier, CanadianNetwork network, Provider prov, out Etrans etrans, DateTime reconciliationDate) { string retVal = ""; etrans = CanadianOutput.GetSummaryReconciliation(carrier, network, prov, reconciliationDate); retVal += "Summary Reconciliation#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
private static string Run(int scriptNum, Carrier carrier, Provider treatProv, Provider billingProv, DateTime reconciliationDate, out List <Etrans> etransAcks) { string retVal = ""; etransAcks = CanadianOutput.GetPaymentReconciliations(carrier, treatProv, billingProv, reconciliationDate); retVal += "Payment Reconciliation#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
private static string Run(int scriptNum, bool version2, bool sendToItrans, Carrier carrier, out List <Etrans> etransRequests) { string retVal = ""; Provider prov = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)); etransRequests = CanadianOutput.GetOutstandingTransactions(version2, sendToItrans, carrier, prov); retVal += "Outstanding Transactions#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
private static string Run(int scriptNum, Carrier carrier, CanadianNetwork network, Provider prov, out Etrans etrans, DateTime reconciliationDate) { string retVal = ""; Clearinghouse clearinghouseHq = Canadian.GetCanadianClearinghouseHq(carrier); Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum); etrans = CanadianOutput.GetSummaryReconciliation(clearinghouseClin, carrier, network, prov, reconciliationDate); retVal += "Summary Reconciliation#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
private static string Run(int scriptNum, Carrier carrier, Provider treatProv, Provider billingProv, DateTime reconciliationDate, out List <Etrans> etransAcks) { string retVal = ""; Clearinghouse clearinghouseHq = Canadian.GetCanadianClearinghouseHq(carrier); Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum); etransAcks = CanadianOutput.GetPaymentReconciliations(clearinghouseClin, carrier, treatProv, billingProv, reconciliationDate, 0); retVal += "Payment Reconciliation#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
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. CanadianOutput.GetSummaryReconciliation(carrier, null, ProviderC.ListShort[listTreatingProvider.SelectedIndex], reconciliationDate); } else { if (listCarriers.SelectedIndex >= 0) { CanadianOutput.GetSummaryReconciliation(carriers[listCarriers.SelectedIndex], null, ProviderC.ListShort[listTreatingProvider.SelectedIndex], reconciliationDate); } else { CanadianOutput.GetSummaryReconciliation(null, CanadianNetworks.Listt[listNetworks.SelectedIndex], ProviderC.ListShort[listTreatingProvider.SelectedIndex], reconciliationDate); } } 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; }
private static string Run(int scriptNum, bool version2, bool sendToItrans, Carrier carrier, out List <Etrans> etransRequests) { string retVal = ""; Provider prov = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)); Clearinghouse clearinghouseHq = Canadian.GetCanadianClearinghouseHq(carrier); Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum); etransRequests = CanadianOutput.GetOutstandingTransactions(clearinghouseClin, version2, sendToItrans, carrier, prov, false); retVal += "Outstanding Transactions#" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
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 < ProviderC.ListShort.Count; i++) { if (ProviderC.ListShort[i].CanadianOfficeNum == listOfficeNumbers.Items[listOfficeNumbers.SelectedIndex].ToString() && ProviderC.ListShort[i].NationalProvID != "" && ProviderC.ListShort[i].IsCDAnet) { prov = ProviderC.ListShort[i]; break; } } try { if (radioVersion2.Checked) { CanadianOutput.GetOutstandingTransactions(true, false, null, prov); } else if (radioVersion4Itrans.Checked) { CanadianOutput.GetOutstandingTransactions(false, true, null, prov); } else if (radioVersion4ToCarrier.Checked) { CanadianOutput.GetOutstandingTransactions(false, false, carriers[listCarriers.SelectedIndex], prov); } 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; }
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 { string formatVersion = "04"; Carrier carrier = null; if (radioVersion2.Checked) { formatVersion = "02"; } else if (radioVersion4ToCarrier.Checked) { carrier = carriers[listCarriers.SelectedIndex]; } CanadianOutput.GetOutstandingForDefault(prov, formatVersion, carrier, FormClaimPrint.PrintCdaClaimForm, FormCCDPrint.PrintCCD); Cursor = Cursors.Default; MsgBox.Show(this, "Done."); } catch (ApplicationException aex) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Request failed:") + "\r\n" + aex.Message); } catch (Exception ex) { Cursor = Cursors.Default; MessageBox.Show(Lan.g(this, "Request failed:") + "\r\n" + ex.ToString()); } DialogResult = DialogResult.OK; }
public static string Run(int scriptNum, string responseExpected, Claim claim) { string retVal = ""; InsPlan insPlan = InsPlans.GetPlan(claim.PlanNum, null); InsSub insSub = InsSubs.GetOne(claim.InsSubNum); long etransNum = CanadianOutput.SendClaimReversal(claim, insPlan, insSub); Etrans etrans = Etranss.GetEtrans(etransNum); string message = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum); CCDFieldInputter formData = new CCDFieldInputter(message); string responseStatus = formData.GetValue("G05"); if (responseStatus != responseExpected) { return("G05 should be " + responseExpected + "\r\n"); } retVal += "Reversal #" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
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; }
public static string Run(int scriptNum, string responseExpected, Claim claim) { string retVal = ""; InsPlan insPlan = InsPlans.GetPlan(claim.PlanNum, null); InsSub insSub = InsSubs.GetOne(claim.InsSubNum); Carrier carrier = Carriers.GetCarrier(insPlan.CarrierNum); Clearinghouse clearinghouseHq = Clearinghouses.GetClearinghouse(Clearinghouses.AutomateClearinghouseHqSelection(carrier.ElectID, claim.MedType)); Clearinghouse clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum); long etransNum = CanadianOutput.SendClaimReversal(clearinghouseClin, claim, insPlan, insSub); Etrans etrans = Etranss.GetEtrans(etransNum); string message = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum); CCDFieldInputter formData = new CCDFieldInputter(message); string responseStatus = formData.GetValue("G05"); if (responseStatus != responseExpected) { return("G05 should be " + responseExpected + "\r\n"); } retVal += "Reversal #" + scriptNum.ToString() + " successful.\r\n"; return(retVal); }
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 { CanadianOutput.GetPaymentReconciliations(carriers[listCarriers.SelectedIndex], ProviderC.ListShort[listTreatingProvider.SelectedIndex], ProviderC.ListShort[listBillingProvider.SelectedIndex], reconciliationDate); 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; }
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; }