Ejemplo n.º 1
0
 public AsyncPlan(AsyncESAPI ACurrent, PlanSetup pIn, Patient ptIn, AsyncCourse cIn)
 {
     A               = ACurrent;
     pt              = ptIn;
     p               = pIn;
     Course          = cIn;
     UID             = p.UID;
     HistoryDateTime = p.HistoryDateTime;
     Id              = p.Id;
     NumFractions    = p.UniqueFractionation.NumberOfFractions;
     HashId          = Convert.ToInt32(p.Id.GetHashCode() + p.Course.Id.GetHashCode() + UID.GetHashCode());
     Dose            = p.TotalPrescribedDose.Dose;
     IsDoseValid     = p.IsDoseValid;
     if (p.StructureSet == null)
     {
         Valid = false;
     }
     else
     {
         StructureSetId  = p.StructureSet.Id;
         StructureSetUID = p.StructureSet.UID;
         foreach (Structure s in p.StructureSet.Structures)
         {
             StructureIds.Add(s.Id);
             _Structures.Add(s.Id, s);
             var AS = new AsyncStructure(ACurrent, s, p.StructureSet.Id, p.StructureSet.UID);
             Structures.Add(s.Id, AS);
         }
     }
     PlanType = ComponentTypes.Plan;
 }
Ejemplo n.º 2
0
 public async Task <List <AsyncStructure> > GetBolus()
 {
     return(await A.ExecuteAsync(new Func <EApp, List <AsyncStructure> >((app) =>
     {
         if (p.StructureSet != null)
         {
             var Boluses = new List <AsyncStructure>();
             foreach (Structure s in p.StructureSet.Structures.Where(x => x.DicomType == "BOLUS"))
             {
                 var Bolus = new AsyncStructure(A, s, p.StructureSet.Id, p.StructureSet.UID);
                 Boluses.Add(Bolus);
             }
             return Boluses;
         }
         else
         {
             return new List <AsyncStructure>();
         }
     })));
 }