///<summary>Returns true if the procedure has a substitution code for the give tooth and InsPlans.</summary>
 public static bool HasSubstCodeForProcCode(ProcedureCode procCode, string toothNum, List <SubstitutionLink> listSubLinks,
                                            List <InsPlan> listPatInsPlans)
 {
     //No need to check RemotingRole; no call to db.
     foreach (InsPlan plan in listPatInsPlans)
     {
         //Check to see if any allow substitutions.
         if (HasSubstCodeForPlan(plan, procCode.CodeNum, listSubLinks))
         {
             long subCodeNum = ProcedureCodes.GetSubstituteCodeNum(procCode.ProcCode, toothNum, plan.PlanNum, listSubLinks);               //for posterior composites
             if (procCode.CodeNum != subCodeNum && subCodeNum > 0)
             {
                 return(true);
             }
         }
     }
     return(false);
 }