예제 #1
0
 public HierarchyBasedOrder(HierarchyBasedOrder order)
 {
     _dateFrom     = order._dateFrom;
     _dateTo       = order._dateTo;
     PlacementMode = order.PlacementMode;
     OrderLevel    = order.OrderLevel;
     Listener      = order.Listener;
     parent        = order;
 }
예제 #2
0
 public HierarchyBasedOrder(DateTime dateFrom, DateTime dateTo, PlacementMode placementMode, OrderLevel orderLevel, IDataLoadEventListener listener)
 {
     _dateFrom     = dateFrom;
     _dateTo       = dateTo;
     PlacementMode = placementMode;
     OrderLevel    = orderLevel;
     Listener      = listener;
     parent        = null;
 }
예제 #3
0
        //TODO Non-Elegant
        private Queue <HierarchyBasedPicker> Split()
        {
            var pickers = new Queue <HierarchyBasedPicker>();
            HierarchyBasedOrder  order  = null;
            HierarchyBasedPicker picker = null;

            foreach (var patient in _patients.Values)
            {
                if (OrderLevel == OrderLevel.Patient)
                {
                    order  = new HierarchyBasedOrder(this);
                    picker = new HierarchyBasedPicker(order);
                }
                foreach (var study in patient.Studies.Values)
                {
                    if (OrderLevel == OrderLevel.Study)
                    {
                        order  = new HierarchyBasedOrder(this);
                        picker = new HierarchyBasedPicker(order);
                    }
                    foreach (var series in study.Series.Values)
                    {
                        if (OrderLevel == OrderLevel.Series)
                        {
                            order  = new HierarchyBasedOrder(this);
                            picker = new HierarchyBasedPicker(order);
                        }
                        foreach (var image in series.Images.Values)
                        {
                            if (OrderLevel == OrderLevel.Image)
                            {
                                order  = new HierarchyBasedOrder(this);
                                picker = new HierarchyBasedPicker(order);
                            }
                            if (order != null)
                            {
                                order.Place(patient.PatientId, study.StudyInstanceUID, series.SeriesInstanceUID, image.SOPInstanceUID);
                            }
                            else
                            {
                                Listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Error, "Order.Split order is null"));
                            }
                            if (OrderLevel == OrderLevel.Image)
                            {
                                pickers.Enqueue(picker);
                            }
                        }
                        if (OrderLevel == OrderLevel.Series)
                        {
                            pickers.Enqueue(picker);
                        }
                    }
                    if (OrderLevel == OrderLevel.Study)
                    {
                        pickers.Enqueue(picker);
                    }
                }
                if (OrderLevel == OrderLevel.Patient)
                {
                    pickers.Enqueue(picker);
                }
            }
            return(pickers);
        }
예제 #4
0
 public HierarchyBasedPicker(HierarchyBasedOrder order)
 {
     _order = order;
 }