Esempio n. 1
0
 ///<summary>For a list of patNums, this fills dictionaries for OrthoCases, OrthoProcLinks, and OrthoSchedules.</summary>
 public static void GetDataForListPatNums(ref Dictionary <long, OrthoProcLink> dictOrthoProcLinks, ref Dictionary <long, OrthoCase> dictOrthoCases,
                                          ref Dictionary <long, OrthoPlanLink> dictOrthoSchedulePlanLinks, ref Dictionary <long, OrthoSchedule> dictOrthoSchedules, List <long> listPatNums)
 {
     //No remoting role check; no call to db
     dictOrthoCases     = GetManyForPats(listPatNums.Distinct().ToList()).ToDictionary(x => x.OrthoCaseNum, x => x);
     dictOrthoProcLinks = OrthoProcLinks.GetManyByOrthoCases(dictOrthoCases.Keys.ToList()).ToDictionary(x => x.ProcNum, x => x);
     if (dictOrthoProcLinks.Count > 0)
     {
         dictOrthoSchedulePlanLinks =
             OrthoPlanLinks.GetAllForOrthoCasesByType(dictOrthoCases.Keys.ToList(), OrthoPlanLinkType.OrthoSchedule).ToDictionary(x => x.FKey, x => x);
         List <OrthoSchedule> listOrthoSchedules = OrthoSchedules.GetMany(dictOrthoSchedulePlanLinks.Keys.ToList());
         foreach (OrthoSchedule orthoSchedule in listOrthoSchedules)                 //Can't use ref variable in linq statement
         {
             dictOrthoSchedules.Add(dictOrthoSchedulePlanLinks[orthoSchedule.OrthoScheduleNum].OrthoCaseNum, orthoSchedule);
         }
     }
 }
Esempio n. 2
0
 ///<summary>For a passed in list of procs, this fills a list of all OrthoProcLinks, a dictionary of OrthoProcLinks associated to procs
 ///in listProcs, a dictionary of OrthoCases associated to these OrthoProcLinks, and a dictionary of OrthoSchedules for the OrthoCases.</summary>
 public static void GetDataForListProcs(ref List <OrthoProcLink> listOrthoProcLinksAllForPats,
                                        ref Dictionary <long, OrthoProcLink> dictOrthoProcLinks, ref Dictionary <long, OrthoCase> dictOrthoCases,
                                        ref Dictionary <long, OrthoSchedule> dictOrthoSchedules, List <Procedure> listProcs)
 {
     //No remoting role check; no call to db and ref parameters.
     dictOrthoCases = GetManyForPats(listProcs.Select(x => x.PatNum).Distinct().ToList()).ToDictionary(x => x.OrthoCaseNum, x => x);
     listOrthoProcLinksAllForPats = OrthoProcLinks.GetManyByOrthoCases(dictOrthoCases.Keys.ToList());
     dictOrthoProcLinks           =
         listOrthoProcLinksAllForPats.Where(x => listProcs.Select(y => y.ProcNum).ToList().Contains(x.ProcNum)).ToDictionary(x => x.ProcNum, x => x);
     if (dictOrthoProcLinks.Count > 0)
     {
         Dictionary <long, OrthoPlanLink> dictSchedulePlanLinks =
             OrthoPlanLinks.GetAllForOrthoCasesByType(dictOrthoCases.Keys.ToList(), OrthoPlanLinkType.OrthoSchedule).ToDictionary(x => x.FKey, x => x);
         List <OrthoSchedule> listOrthoSchedules = OrthoSchedules.GetMany(dictSchedulePlanLinks.Keys.ToList());
         dictOrthoSchedules = listOrthoSchedules.ToDictionary(x => dictSchedulePlanLinks[x.OrthoScheduleNum].OrthoCaseNum, x => x);
     }
 }