///<summary>Returns the clearinghouse specified by the given num. Will only return an HQ-level clearinghouse. ///Do not attempt to pass in a clinic-level clearinghouseNum. Can return null if no match found.</summary> public static Clearinghouse GetClearinghouseHq(long hqClearinghouseNum, bool suppressError) { Clearinghouse clearinghouse = Clearinghouses.GetClearinghouse(hqClearinghouseNum); if (clearinghouse == null && !suppressError) { MsgBox.Show("Clearinghouses", "Error. Could not locate Clearinghouse."); } return(clearinghouse); }
private void FormClearinghouses_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (PrefC.GetLong(PrefName.ClearinghouseDefaultDent) == 0) { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "A default clearinghouse should be set. Continue anyway?")) { e.Cancel = true; return; } } //validate that the default dental clearinghouse is not type mismatched. Clearinghouse chDent = Clearinghouses.GetClearinghouse(PrefC.GetLong(PrefName.ClearinghouseDefaultDent)); if (chDent != null) { if (chDent.Eformat == ElectronicClaimFormat.x837_5010_med_inst) //mismatch { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "The default dental clearinghouse should be set to a dental e-claim format. Continue anyway?")) { e.Cancel = true; return; } } } //validate medical clearinghouse Clearinghouse chMed = Clearinghouses.GetClearinghouse(PrefC.GetLong(PrefName.ClearinghouseDefaultMed)); if (chMed != null) { if (chMed.Eformat != ElectronicClaimFormat.x837_5010_med_inst) //mismatch { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "The default medical clearinghouse should be set to a med/inst e-claim format. Continue anyway?")) { e.Cancel = true; return; } } } if (listHasChanged) { //update all computers including this one: DataValid.SetInvalid(InvalidType.ClearHouses); } }