///<summary>Returns a distinct list of valid ProcCodes for the given eBenefitCat.</summary> public static List <string> GetValidCodesForEbenCat(EbenefitCategory eBenefitCat) { //No need to check RemotingRole; no call to db. List <string> listValidStrings = new List <string>(); List <CovCat> listCovCats = CovCats.GetWhere(x => x.EbenefitCat == eBenefitCat, true); foreach (CovCat covCat in listCovCats) { CovSpan[] arrayCovSpans = CovSpans.GetForCat(covCat.CovCatNum); listValidStrings.AddRange( ProcedureCodes.GetWhere(x => CovSpans.IsCodeInSpans(x.ProcCode, arrayCovSpans), true).Select(x => x.ProcCode).ToList() ); } return(listValidStrings.Distinct().ToList()); }
public static void SetOrdersToDefault() { //This can only be run if the validation checks have been run first. //No need to check RemotingRole; no call to db. SetOrder(GetForEbenCat(EbenefitCategory.General), 0); SetOrder(GetForEbenCat(EbenefitCategory.Diagnostic), 1); SetOrder(GetForEbenCat(EbenefitCategory.DiagnosticXRay), 2); SetOrder(GetForEbenCat(EbenefitCategory.RoutinePreventive), 3); SetOrder(GetForEbenCat(EbenefitCategory.Restorative), 4); SetOrder(GetForEbenCat(EbenefitCategory.Endodontics), 5); SetOrder(GetForEbenCat(EbenefitCategory.Periodontics), 6); SetOrder(GetForEbenCat(EbenefitCategory.OralSurgery), 7); SetOrder(GetForEbenCat(EbenefitCategory.Crowns), 8); SetOrder(GetForEbenCat(EbenefitCategory.Prosthodontics), 9); SetOrder(GetForEbenCat(EbenefitCategory.MaxillofacialProsth), 10); SetOrder(GetForEbenCat(EbenefitCategory.Accident), 11); SetOrder(GetForEbenCat(EbenefitCategory.Orthodontics), 12); SetOrder(GetForEbenCat(EbenefitCategory.Adjunctive), 13); //now set the remaining categories to come after the ebens. byte idx = 14; List <CovCat> listCovCatsShort = CovCats.GetWhere(x => x.EbenefitCat != EbenefitCategory.None, true); for (int i = 0; i < listCovCatsShort.Count; i++) { SetOrder(listCovCatsShort[i], idx); idx++; } //finally, the hidden categories List <CovCat> listCovCats = CovCats.GetWhere(x => !x.IsHidden); for (int i = 0; i < listCovCats.Count; i++) { SetOrder(listCovCats[i], idx); idx++; } }
public static int CountForEbenCat(EbenefitCategory eben) { //No need to check RemotingRole; no call to db. return(CovCats.GetWhere(x => x.EbenefitCat == eben, true).Count); }